|
| 1 | +# example-python |
| 2 | + |
| 3 | +[](https://demo.coveragetracker.dev/CoverageTracker/example-python?metric=coverage) |
| 4 | +[](https://demo.coveragetracker.dev/CoverageTracker/example-python?metric=complexity) |
| 5 | + |
| 6 | +A small, idiomatic Python text-analysis toolkit used as the Python reference |
| 7 | +example for [Coverage Tracker](https://coveragetracker.dev). It exists to |
| 8 | +give the Python row in the |
| 9 | +[coverage report generation guide](https://coveragetracker.dev/docs/generating-coverage-reports) |
| 10 | +a live, working reference, and to populate the |
| 11 | +[demo dashboard](https://demo.coveragetracker.dev) with real trend data. |
| 12 | + |
| 13 | +**This is a demo/marketing repo, not a test suite for Coverage Tracker |
| 14 | +itself.** |
| 15 | + |
| 16 | +## What's here |
| 17 | + |
| 18 | +- `textkit/` — readability scoring, slug generation, and word-frequency |
| 19 | + helpers, each with real branching logic. |
| 20 | +- `tests/` — a [pytest](https://pytest.org) suite with a few deliberately |
| 21 | + uncovered branches, so `branch_coverage < line_coverage` shows up on the |
| 22 | + dashboard. |
| 23 | +- `.github/workflows/coverage.yml` — runs tests under |
| 24 | + [coverage.py](https://coverage.readthedocs.io), generates a |
| 25 | + [Radon](https://radon.readthedocs.io) complexity report, then reports both |
| 26 | + to the demo instance via the `coverage-tracker` reporting Action. |
| 27 | + |
| 28 | +## Running locally |
| 29 | + |
| 30 | +```sh |
| 31 | +pip install -e ".[dev]" |
| 32 | +coverage run -m pytest && coverage lcov -o coverage.lcov # writes coverage.lcov |
| 33 | +radon cc -j textkit > radon.json |
| 34 | +``` |
0 commit comments