Skip to main content

python-codacy-coverage

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

Release files for codacy-coverage 1.3.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codacy-coverage 1.3.11
File Size Uploaded
codacy-coverage-1.3.11.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for codacy-coverage 1.3.11
File Interpreter ABI Platform
codacy_coverage-1.3.11-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 12.7 kB

Release files / codacy-coverage-1.3.11.tar.gz

Download URL codacy-coverage-1.3.11.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b94651934745c638a980ad8d67494077e60f71e19e29aad1c275b66e0a070cbc
BLAKE2b-256 checksum
How to use checksums
c329e3181fed33f4274727060feb6f08bc65b5242ade01c0b84e359232d8a83f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / codacy_coverage-1.3.11-py2.py3-none-any.whl

Download URL codacy_coverage-1.3.11-py2.py3-none-any.whl
Size 7.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d8a1ce56b0dd156d6b1de14fa6217d32ec86097902f08a17ff2f95ba27264474
BLAKE2b-256 checksum
How to use checksums
582c5542d0ad47fafca9cc19315dbacfec389afaad9c383aed3ea138a263d777
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.3.11 This release

2 release files

1.3.10

2 release files

1.3.9

2 release files

1.3.8

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

1 release file

1.2.18

2 release files

1.2.12

1 release file

1.2.11

1 release file

1.2.10

1 release file

1.2.9

1 release file

1.2.8

2 release files

1.2.7

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page