Skip to main content

Codacy coverage reporter for Python

Project description

Credits to Ryan for creating this! Python coverage reporter for Codacy https://www.codacy.com

Codacy Badge Codacy Badge Build Status PyPI version

Setup

Codacy assumes that coverage is previously configured for your project.

To generate the required coverage XML file, calculate coverage for your project as normal, by running:

coverage xml

Install codacy-coverage

You can install the coverage reporter by running:

pip install codacy-coverage

Updating Codacy

To update Codacy, you will need your project API token. You can create the token in Project -> Settings -> Integrations -> Add Integration -> Project API

Then set it in your terminal, replacing %Project_Token% with your own token:

export CODACY_PROJECT_TOKEN=%Project_Token%

Enterprise only (Skip this step if you are using https://www.codacy.com)

To send coverage in the enterprise version you should:

export CODACY_API_BASE_URL=<Codacy_instance_URL>:16006

Upload Coverage

Next, simply run the Codacy reporter. It will find the current commit and send all details to your project dashboard:

python-codacy-coverage -r coverage.xml

Note: You should keep your API token well protected, as it grants owner permissions to your projects.

Troubleshoot

If you are using any CI that does not have .git information, you can specify the commit with -c and the clone directory with -d. For example if you are using AppVeyor you can:

python-codacy-coverage -c $APPVEYOR_REPO_COMMIT -d $APPVEYOR_BUILD_FOLDER -r coverage.xml

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codacy-coverage-1.3.8.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codacy_coverage-1.3.8-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file codacy-coverage-1.3.8.tar.gz.

File metadata

File hashes

Hashes for codacy-coverage-1.3.8.tar.gz
Algorithm Hash digest
SHA256 8d6e7b7bcb14ca3371cb2afacb703b36af7e215a1bd27685c6607f1250ed484a
MD5 670a4d0b678967d890127d43364929bb
BLAKE2b-256 1abef90c36ed84286bb5de72f531daab7173a78eda386b67c9173b28e7e19584

See more details on using hashes here.

File details

Details for the file codacy_coverage-1.3.8-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for codacy_coverage-1.3.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 97673932bebc77b7c2dd87c8be6d542981c28aa0e9b535bb586f78aca8efeeb5
MD5 58781f87506a6ef95cd4cc8e63e71203
BLAKE2b-256 b8c7791e8af5af4aa0e68bbfb649d7c285fe509a50316a3d500f5b2e90f7a466

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page