--- id: coverage-threshold version: "0.6.2" license: MIT license_treatment: permissive maintenance: aging --- # coverage-threshold — Tools for coverage threshold limits License: permissive · Maintenance: aging · Downloads: 110.8K/mo ## What it is and what it does coverage-threshold is a command-line tool that enforces code coverage standards by reading JSON reports from Python's coverage tool and comparing them against configurable minimum thresholds. It supports both global coverage minimums (line, branch, or combined) and per-file thresholds, with the ability to override defaults for specific modules or files via TOML configuration. The tool is designed to integrate into test workflows as a gating step—run your tests with coverage, generate a JSON report, then invoke coverage-threshold to verify the results meet your project's standards. Configuration lives in pyproject.toml by default, allowing thresholds to be version-controlled alongside your code. It has a single runtime dependency (toml) and supports Python 3.7 and later. Use it for: - Enforce minimum line coverage across a codebase in CI pipelines to prevent coverage regressions. - Set different per-file thresholds for critical modules while allowing lower coverage in less critical code. - Validate that coverage.json reports meet organizational standards before merging pull requests. - Configure module-specific coverage rules using path prefixes to handle varying quality requirements across a project. - Gate test suite completion on coverage thresholds without requiring external CI/CD platform features. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Validates Python code coverage against configurable minimum thresholds at both global and per-file levels, reading from coverage.json and configuration files. Yes, if you need to enforce coverage minimums in your test workflow. The tool is straightforward, has minimal dependencies, and integrates cleanly with the standard coverage tool. The aging maintenance status (446 days since last release) is a minor concern for a stable utility, but the repository remains active and the package supports current Python versions. No known vulnerabilities. ## Install pip install coverage-threshold uv add coverage-threshold poetry add coverage-threshold ## Installing coverage-threshold Before you install: Low install friction with a single lightweight dependency (toml). Repository is aging (446 days since last release) but not archived; last commit was recent. Supports Python 3.7 through 3.13. License in practice: MIT license is permissive and imposes no restrictions on use, modification, or distribution in proprietary or open-source projects. Quickstart: pip install coverage-threshold # After running coverage json: coverage-threshold --line-coverage-min 95 # Or with config file (pyproject.toml): coverage-threshold Requires a coverage.json file generated by the coverage tool; typically run after coverage json in a test workflow. Verify before relying: - Whether per-module threshold configuration supports glob patterns or only exact path prefixes as documented. - Whether the tool integrates with CI/CD systems or requires manual invocation in pipeline steps. - Performance characteristics when validating coverage for large codebases. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 110.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags coverage threshold validation, enforce minimum code coverage, coverage report checker, coverage quality gates, code coverage minimums, coverage compliance tool, coverage enforcement, testing, coverage-enforcement, ci-cd [View on SkillFed](https://skillfed.io/packages/coverage-threshold) · [View on PyPI](https://pypi.org/project/coverage-threshold/)