What problem does it solve?
Reduce brittle behavior, silent failures, and insufficient test coverage in Python ML and data-processing code by improving type safety, error handling, and test strength. Provide structured guidance to catch edge cases, surface untested logic, and make error modes actionable before deployment.
Core Features & Use Cases
- Type annotation checklist and advanced typing patterns to tighten public APIs and preserve type information.
- Contract docstring templates and exception-audit checklist to document pre/postconditions and harden error handling.
- Property-based testing patterns and Hypothesis strategy recipes for tensors, DataFrames, and nested configs.
- Mutation testing with mutmut including configuration, result interpretation, and CI integration to assess test suite strength.
- Ruff configuration guidance tailored for ML projects and pre-mortem prompts to discover fragility in pipelines.
- Use Case: Add Hypothesis tests and mutmut to a data-preprocessing pipeline to detect NaNs, shape errors, and logic gaps that unit tests miss.
Quick Start
Add Hypothesis property tests using the provided strategies, run mutmut to collect surviving mutants, and apply the exception audit checklist and contract docstrings to fix the highest-priority gaps.