Testing and local quality checks
Commands used in CI and recommended before opening a PR.
Install dev tools
Section titled “Install dev tools”pip install -e ".[dev]"Lint and format
Section titled “Lint and format”python -m ruff check phenome testspython -m ruff format phenome tests --checkAuto-fix (local only):
python -m ruff check phenome tests --fixpython -m ruff format phenome testsType checking
Section titled “Type checking”python -m mypy phenomeDocstring coverage
Section titled “Docstring coverage”interrogate phenomeThe project targets ≥95% coverage (pyproject.toml → [tool.interrogate]).
Spell check
Section titled “Spell check”codespellDocumentation build
Section titled “Documentation build”cd docsnpm installnpm run buildDependency compatibility smoke
Section titled “Dependency compatibility smoke”python -m pytestThis matches the main CI workflow. The suite:
- Runs
pip checkso conflicting installed packages fail - Imports the public PhenoMe API and every
phenome.*module - Constructs
PhenoMeon CPU, reads PNG/NPY images, and runs a tiny find → embed → properties → clustering loop - Reloads embeddings from an HDF5 checkpoint and checks that advertised property presets resolve
