All Projects → codeclimate → python-test-reporter

codeclimate / python-test-reporter

Licence: other
DEPRECATED Uploads Python test coverage data to Code Climate

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to python-test-reporter

javascript-test-reporter
DEPRECATED Code Climate test reporter client for JavaScript projects
Stars: ✭ 68 (+277.78%)
Mutual labels:  quality, continuous-integration, coverage-report, test-coverage, code-quality, codeclimate
codeclimate-duplication
Code Climate engine for code duplication analysis
Stars: ✭ 96 (+433.33%)
Mutual labels:  quality, code-quality, codeclimate
qodana-action
⚙️ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (+522.22%)
Mutual labels:  continuous-integration, ci, code-quality
Simplecov
Code coverage for Ruby with a powerful configuration library and automatic merging of coverage across test suites
Stars: ✭ 4,362 (+24133.33%)
Mutual labels:  coverage-report, test-coverage, code-quality
Xcov
Nice code coverage reporting without hassle
Stars: ✭ 467 (+2494.44%)
Mutual labels:  continuous-integration, ci, coverage-report
codeclimate-phpcodesniffer
Code Climate Engine for PHP Code Sniffer
Stars: ✭ 27 (+50%)
Mutual labels:  quality, code-quality, codeclimate
codeclimate-eslint
Code Climate Engine for ESLint
Stars: ✭ 86 (+377.78%)
Mutual labels:  quality, code-quality, codeclimate
Codeclimate
Code Climate CLI
Stars: ✭ 2,273 (+12527.78%)
Mutual labels:  quality, code-quality, codeclimate
changed-files
Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
Stars: ✭ 733 (+3972.22%)
Mutual labels:  continuous-integration, ci
codeclimate-action
GitHub Action to send your code coverage to CodeClimate
Stars: ✭ 145 (+705.56%)
Mutual labels:  quality, codeclimate
kahoy
Simple Kubernetes raw manifests deployment tool
Stars: ✭ 33 (+83.33%)
Mutual labels:  continuous-integration, ci
landkid
Your friendly neighborhood async merging robot goat.
Stars: ✭ 80 (+344.44%)
Mutual labels:  continuous-integration, ci
continuous-integration-with-python
How to test your python code. How to automatically run your tests for your Python code. How to get reports of the tests coverage
Stars: ✭ 25 (+38.89%)
Mutual labels:  continuous-integration, coverage-report
ofcourse
A Concourse resource generator
Stars: ✭ 41 (+127.78%)
Mutual labels:  continuous-integration, ci
code-assert
Assert that the java code of a project satisfies certain checks.
Stars: ✭ 94 (+422.22%)
Mutual labels:  test-coverage, code-quality
flagsmith-java-client
Java Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
Stars: ✭ 16 (-11.11%)
Mutual labels:  continuous-integration, ci
build-plugin-template
Template repository to create new Netlify Build plugins.
Stars: ✭ 26 (+44.44%)
Mutual labels:  continuous-integration, ci
gitavscan
Git Anti-Virus Scan Action - Detect trojans, viruses, malware & other malicious threats.
Stars: ✭ 23 (+27.78%)
Mutual labels:  continuous-integration, ci
flow-platform-x
Continuous Integration Platform
Stars: ✭ 21 (+16.67%)
Mutual labels:  continuous-integration, ci
jenkinsapi
A Python API for accessing resources and configuring Hudson & Jenkins continuous-integration servers
Stars: ✭ 790 (+4288.89%)
Mutual labels:  continuous-integration, ci

codeclimate-test-reporter - [DEPRECATED]

These configuration instructions refer to a language-specific test reporter which is now deprecated in favor of our new unified test reporter client. The new test reporter is faster, distributed as a static binary, has support for parallelized CI builds, and will receive ongoing support by the team here. The existing test reporters for Ruby, Python, PHP, and Javascript are now deprecated. Code Climate Test Coverage PyPI version

Collects test coverage data from your Python test suite and sends it to Code Climate's hosted, automated code review service.

Code Climate - https://codeclimate.com

Uploading Your Test Coverage Report

The codeclimate-test-reporter is compatible with coverage.py coverage reports. By default, coverage.py will generate a .coverage file in the current directory. codeclimate-test-reporter, run without arguments, will look for a coverage report at this default location.

Note: The codeclimate-test-reporter requires a repo token from codeclimate.com, so if you don't have one, the first step is to signup and configure your repo. Then:

You can place the repo token in the environment under the key CODECLIMATE_REPO_TOKEN or pass the token as a CLI argument:

$ CODECLIMATE_REPO_TOKEN=[token] codeclimate-test-reporter
Submitting payload to https://codeclimate.com... done!
$ codeclimate-test-reporter --token [token]
Submitting payload to https://codeclimate.com... done!

We recommend configuring the repo token in the environment through your CI settings which will hide the value during runs. The token should be considered a scoped password. Anyone with the token can submit test coverage data to your Code Climate repo.

# CODECLIMATE_REPO_TOKEN already set in env
$ codeclimate-test-reporter
Submitting payload to https://codeclimate.com... done!

Generating Coverage Reports

To generate a coverage report with pytest, you can use the pytest-cov plugin:

$ py.test --cov=your_package tests/
TOTAL                                                     284     27    90%

======================== 14 passed in 0.75 seconds ========================

To generate a coverage report with nose, you can use the nose cover plugin:

$ nosetests --with-coverage --cover-erase --cover-package=your_package
TOTAL                                                284     27    90%
----------------------------------------------------------------------
Ran 14 tests in 0.743s

OK

By default, coverage.py will create the test coverage report at ./.coverage. If you configure coverage.py to generate a coverage report at an alternate location, pass that to the codeclimate-test-reporter:

$ codeclimate-test-reporter --file ./alternate/location/.coverage
Submitting payload to https://codeclimate.com... done!

Installation

You can install the codeclimate-test-reporter using pip:

$ pip install codeclimate-test-reporter
Successfully installed codeclimate-test-reporter-[version]

Or you can add the reporter to your requirements.txt file and install it along with other project dependencies:

# requirements.txt
codeclimate-test-reporter
$ pip install -r requirements.txt
Successfully installed codeclimate-test-reporter-[version]

Important FYIs

Across the many different testing frameworks, setups, and environments, there are lots of variables at play. Before setting up test coverage, it's important to understand what we do and do not currently support:

  • Single payload: We currently only support a single test coverage payload per commit. If you run your tests in multiple steps, or via parallel tests, Code Climate will only process the first payload that we receive. If you are using a CI, be sure to check if you are running your tests in a parallel mode.

    Note: If you've configured Code Climate to analyze multiple languages in the same repository (e.g., Python and JavaScript), we can nonetheless only process test coverage information for one of these languages. We'll process the first payload that we receive.

  • Invalid File Paths: By default, our test reporters expect your application to exist at the root of your repository. If this is not the case, the file paths in your test coverage payload will not match the file paths that Code Climate expects.

Troubleshooting

If you're having trouble setting up or working with our test coverage feature, see our detailed help doc, which covers the most common issues encountered.

If the issue persists, feel free to open up an issue here or contact help with debug information from the reporter:

$ codeclimate-test-reporter --debug
codeclimate-test-reporter [version]
Requests 2.9.1
Python 3.5.1 (default, Jan 22 2016, 08:54:32)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]
/usr/local/opt/python3/bin/python3.5
Darwin 15.4.0

Contributions

Patches, bug fixes, feature requests, and pull requests are welcome.

Development

A Dockerfile is included for developer convenience. Simply run make test to run the test suite and coverage report.

To release a new version, first run ./bin/prep-release [version] to bump the version and open a PR on GitHub.

Once the PR is merged, run make release to publish the new version to pypy and create a tag on GitHub. This step requires pypy credentials at ~/.pypirc. You can copy this repo's .pypirc.sample file as a starting point.

Copyright

See LICENSE.txt

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].