Development¶
Setup¶
git clone https://github.com/CNNC-Lab/labflow.git
cd labflow
pip install -e ".[dev,docs,snakemake]"
pre-commit install # optional
Testing¶
pytest # all tests
pytest tests/unit/ -v # unit only
pytest tests/integration/ -v # integration
pytest --cov=labflow # coverage
Linting¶
Docs¶
Adding a new resolver¶
- Create
src/labflow/resolvers/<name>.pysubclassingEnvResolver - Decorate the class with
@register_resolver - Set
backend = "<name>"class attribute - Implement
activate_command,install_command,lock_file_path,verify - Import it in
resolvers/__init__.py - Add a test in
tests/unit/test_resolvers.py - Document it under
docs/guides/backends/<name>.md
Adding a new HPC system¶
Edit ~/.claude/contexts/hpc-systems.yaml (or the test fixture). The schema is self-documenting.
Adding a new experiment template¶
- Create
src/labflow/templates/<name>/run.pywith anEXPERIMENT_NAMEplaceholder for the function name - Create
src/labflow/templates/<name>/README.md - Add an entry in
tests/integration/test_cli.py::test_labflow_new - Document under
docs/concepts/experiments.md