Scrutinizer works well for Python code. We automatically infer a default build configuration for you, you can tweak this
default configuration via a
.scrutinizer.yml file that you place in your project?s root folder.
virtualenv to create an isolated Python environment. We either use Python
3.5 whatever seems better.
We have many Python versions pre-installed. You can set a specific version in your
build: environment: python: stackless-3.3.5
If you need a different Python version, let us know.
Scrutinizer automatically installs your dependencies using
distutils. You can also add
custom commands to your
build: dependencies: before: - pip install abc
We provide several databases and queues including MySQL, PostgreSQL, and RabbitMQ pre-installed, if you like you can also install custom software in your build environment.
Scrutinizer will automatically try to infer your test commands. We support running tests via
manage.py in case you are using Django.
You can override the default test commands in your
build: tests: override: - ./run-tests.sh
By default, we will automatically generate code coverage for your tests. If you change the test commands, you can also generate code-coverage manually. Your configuration could look like this:
build: tests: override: - command: './run-tests.sh' coverage: file: '.coverage' config_file: '.coveragerc' format: 'py-cc'
Scrutinizer will automatically process your coverage data and also merge it in case you run your tests in parallel, and also provide graphs that plot its evolution over time. See our code coverage overview page for other languages.
Scrutinizer provides first-class support for deployment. Once all your tests have passed, it will automatically trigger
deployment of your code. You can define deploy commands in your
build: deployment: - branch: master # you can use either the full branch name, branch: feature_* # an asterisc for e.g. any feature branches branch: /feature_.*/ # or the same as a regular expression commands: - cd deploy && fab deploy
Scrutinizer supports a wide-range of automated checks for Python code including code rating, code metrics, duplicate code detection, and many more. A basic configuration which enables code rating and duplicate code detection looks like this:
checks: python: code_rating: true duplicate_code: true
Learn more about configuring automated code reviews for Python.