Captain's Log: ML-powered Sensor Telemetry Analysis module for pytest that identifies high-impact, low-complexity areas to test first.
Scanning the planetary surface (codebase) to determine sensor coverage (test coverage) and identify critical impact zones for the fleet.
Features
- Coverage Impact Analysis: Builds call graphs to identify high-impact functions
- ML Complexity Estimation: Predicts test complexity with confidence intervals
- Prioritization: Suggests what to test first based on impact and complexity
- Refitted Out of the Box: Includes pre-trained model, no console calibration required
- Warp Speed Performance: Optimized for speed (analyzes 1700+ functions in ~1.5 seconds)
- Real-time Telemetry: Visual progress bars and step-by-step timing
Docking Procedures
pip install pytest-coverage-impact
Flight Manual
# Run sensor telemetry analysis (--cov-report=json automatically added)
pytest --cov=your_project --coverage-impact
# Show top 10 functions by priority
pytest --cov=your_project --coverage-impact --coverage-impact-top=10
# Generate Telemetry Data (JSON report)
pytest --cov=your_project --coverage-impact --coverage-impact-json=report.json
Example Telemetry Output
Top Functions by Priority (Impact / Complexity)
┏━━━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Priority ┃ Score ┃ Impact ┃ Complexity ┃ Function ┃
┡━━━━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ 1 │ 2.45 │ 12.5 │ 0.65 [±0.15] │ module.py │
How It Works
- Call Graph Analysis: Parses AST to build function call relationships
- Impact Calculation:
impact = call_frequency × (1 - coverage_pct) - Complexity Estimation: Uses Random Forest ML model (0-1 scale)
- Prioritization:
priority = (impact × confidence) / (complexity × effort) - Reporting: Generates formatted sensor reports showing what to test first
Model Training (Optional)
Module includes pre-trained model - no training required. To recalibrate:
# Combined command - collects telemetry and recalibrates model
pytest --coverage-impact-train
See docs/TRAINING_COMMANDS.md for details.
Requirements
- Python 3.8+
- pytest 7.0+
- coverage 6.0+
- scikit-learn 1.0+
- numpy 1.20+
- rich 13.0+ (terminal formatting)
Mission Log
- CHANGELOG.md - Mission history and sector updates
Documentation
- docs/USAGE.md - Complete Flight Manual with examples
- docs/CONFIGURATION.md - Console Calibration settings and model paths
- docs/TRAINING_COMMANDS.md - Recalibrate custom ML models
- docs/FORMULA_EXPLANATION.md - How telemetry scores are calculated
- docs/CONFIDENCE_AND_PRIORITY.md - How confidence affects prioritization
- docs/RELEASE_PROCESS.md - Launch procedures and publishing to sector PyPI
- docs/PERFORMANCE.md - Warp speed optimizations explained
Development
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest tests/
# Format code
black pytest_coverage_impact tests/
ruff check pytest_coverage_impact tests/
License
MIT License
Release files for pytest-coverage-impact 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest_coverage_impact-1.5.0.tar.gz | 249.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_coverage_impact-1.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 500.8 kB
Release files / pytest_coverage_impact-1.5.0.tar.gz
| Download URL | pytest_coverage_impact-1.5.0.tar.gz |
|---|---|
| Size | 249.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
944304c19bc474a7374cf06f0e0df153cba4b7780052038cf30767beb8797638
|
|
BLAKE2b-256 checksum How to use checksums |
afd0d6fb054ade1ae6c8bc55f67d22122a52156cb8b00a406e63cf8fa30902be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 16, 2026.
Transparency logRelease files / pytest_coverage_impact-1.5.0-py3-none-any.whl
| Download URL | pytest_coverage_impact-1.5.0-py3-none-any.whl |
|---|---|
| Size | 251.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de2b541bc531acae1f6faf27e831817ee8c794689f083b5c4e0c73f8808363b3
|
|
BLAKE2b-256 checksum How to use checksums |
b4ebc92acea8c603e6f615ed708698d4f7f1e11cde5b987b560608e758b78bb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 16, 2026.
Transparency log