python-coveralls is a Python interface to the coveralls.io API, enabling continuous integration services to send test coverage reports for Python projects. It integrates with `coverage.py` to process coverage data and send it to Coveralls.io. The current version is 2.9.3, and releases are generally made to address `coverage.py` compatibility, Python version support, or minor bug fixes, rather than on a fixed cadence.
pip install python-coverallsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the typical workflow: first, generate coverage data using `coverage.py` after running your tests, and then use the `coveralls` command-line tool to send the `.coverage` report to Coveralls.io. Ensure the `COVERALLS_REPO_TOKEN` is set, especially in CI environments.
Always run your tests with `coverage run` (e.g., `coverage run --source=your_package -m pytest`) before invoking `coveralls`. Verify a `.coverage` file is created and contains data.
Set `COVERALLS_REPO_TOKEN` in your CI environment or locally (e.g., `export COVERALLS_REPO_TOKEN=YOUR_TOKEN`). For CI services, sometimes `CI` environment variables are sufficient, but providing the token is the most robust approach.
Upgrade your project to Python 3 or pin `python-coveralls` to a version less than 2.0.0 (e.g., `pip install python-coveralls==1.11.0`).
Ensure the command runs in a Git repository context, or explicitly provide git details via environment variables (e.g., `COVERALLS_BRANCH`) or a `.coveralls.yml` configuration file.