Skip to content

Testing and local quality checks

Commands used in CI and recommended before opening a PR.


Terminal window
pip install -e ".[dev]"

Terminal window
python -m ruff check phenome tests
python -m ruff format phenome tests --check

Auto-fix (local only):

Terminal window
python -m ruff check phenome tests --fix
python -m ruff format phenome tests

Terminal window
python -m mypy phenome

Terminal window
interrogate phenome

The project targets ≥95% coverage (pyproject.toml → [tool.interrogate]).


Terminal window
codespell

Terminal window
cd docs
npm install
npm run build

Terminal window
python -m pytest

This matches the main CI workflow. The suite:

  • Runs pip check so conflicting installed packages fail
  • Imports the public PhenoMe API and every phenome.* module
  • Constructs PhenoMe on 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