Measure and enforce CODEOWNERS coverage
Project description
CODEOWNERS Coverage
A tool to measure and enforce CODEOWNERS coverage in your repository.
Installation
pip install codeowners-coverage
Usage
Check coverage
codeowners-coverage check
Generate baseline
codeowners-coverage baseline
Configuration
Create a .codeowners-config.yml file in your repository root:
# Path to CODEOWNERS file
codeowners_path: ".github/CODEOWNERS"
# Path to baseline file
baseline_path: ".github/codeowners-coverage-baseline.txt"
# File patterns to exclude from coverage checking
exclusions:
- "**/__pycache__/**"
- "**/*.pyc"
- "node_modules/**"
- "dist/**"
- ".venv/**"
GitHub Actions Integration
Add a workflow to check CODEOWNERS coverage on pull requests:
name: CODEOWNERS Coverage
on: [pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install codeowners-coverage
- run: codeowners-coverage check
Features
- Pattern Matching: Supports all CODEOWNERS patterns (wildcards, globstars, etc.)
- Baseline Support: Track progress incrementally with a baseline allowlist
- Configurable: Customize exclusions and paths via YAML config
- Fast: Uses
pathspeclibrary for efficient pattern matching - GitHub Actions Ready: Easy integration with CI/CD pipelines
Development
Using just (recommended)
This project includes a justfile with common development commands:
# Install package in development mode
just install
# Run all tests
just test
# Run tests with coverage report
just test-cov
# Run type checking
just typecheck
# Run linting
just lint
# Run all checks (tests, typecheck, lint)
just check
# Clean build artifacts
just clean
# Build the package
just build
# Or build with uv (faster)
just build-uv
# Format code
just format
# Publish to Test PyPI
just publish-test
# Publish to production PyPI
just publish
# Full release workflow
just release
Manual commands
# Install in development mode
uv pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Run with coverage
pytest tests/ -v --cov
# Build package
python -m build
# Publish to PyPI
twine upload dist/*
License
Apache-2.0
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codeowners_coverage-0.1.0.tar.gz.
File metadata
- Download URL: codeowners_coverage-0.1.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2201e8d6187546a61371d6e6876b03abd72482f9f945eb2eb63b521b4c6af3d
|
|
| MD5 |
47d77593df735decae79176ecb5bea68
|
|
| BLAKE2b-256 |
725ebca5c26cccde25547c31ad287910659808bfe4b88207209d1948e45c089f
|
File details
Details for the file codeowners_coverage-0.1.0-py3-none-any.whl.
File metadata
- Download URL: codeowners_coverage-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91426c4a0a74c176a03917e1ddfde4607e608f7e320605d3b0c1ee7701f38a1b
|
|
| MD5 |
cf31907eb64fc0669c97fdc1780b953e
|
|
| BLAKE2b-256 |
e832050f5a8a1970cfe1d3dec8e8b9a79884d44b4ba603e4915f121ffa8ecd72
|