Repository navigation
Hygiene, KPI boundary tests and mutation testing - #1
Merged
Merged
Conversation
- Remove committed local tool config and ignore it, plus secrets, coverage and IDE files - Add .env.example documenting the optional OPENAI_API_KEY - Add scripts/mutation_test.py, an AST mutation tester that runs on Windows - Add KPI boundary tests (zero/unit denominators, rounding precision); KPI mutation score 35% -> 92% - README: test count and mutation result
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small hygiene pass. The repo already had CI, Docker, docs, a license and a large test suite, so this only fills gaps.
Changes
.claude/launch.json)..gitignorenow covers.env*, coverage output, mutation output and IDE folders. Added.env.examplefor the optionalOPENAI_API_KEY.scripts/mutation_test.py, an AST-based mutation tester (mutmut doesn't run on Windows). It swaps comparison and arithmetic operators and nudges integer constants, one at a time, and restores the file afterwards.tests/test_kpis_edges.pywith 8 boundary tests: zero and unit denominators for fill rate, cancellation rate, mix, growth and target variance, a missing sales type, and rounding precision.Results
ruff check .: passespytest: 316 passed (308 existing + 8 new) locally on Windows> 0→>= 0where the count is never 0, or where 0/0 is already NaN).Not changed
ruff format: it would reformat 50 files for no functional gain.scripts/evaluate_forecasts.pyalready benchmarks five forecasting models.