Prerequisites
Before you start, make sure you have the following installed:- Python 3.12
- uv package manager
- Git
- Modal account (for running integration tests remotely) or Apptainer (for local testing)
Setup
Clone the repository and set up your environment:Running tests
Tests use pytest with pytest-xdist for parallel execution. Run the full test suite:Running the full suite requires Modal credentials. Set the
MODAL_TOKEN_ID and MODAL_TOKEN_SECRET environment variables before running.Code quality
Boileroom uses pre-commit hooks that run automatically when you commit. You can also run them manually:- ruff for linting and formatting (line length: 120 characters)
- mypy for type checking
PR process
- Create a branch from
main(or the current development branch if one exists). - Make focused changes. Prefer small, reviewable PRs over large ones.
- Ensure all CI checks pass (lint, format, tests).
- Bump the version in
pyproject.toml. This is required by CI and your pipeline will fail without it. - Write a PR description that explains what you changed and why.
Project structure
Key conventions
- Core algorithms are backend-agnostic. They must not import Modal, Apptainer, or any other backend-specific library.
- Modal imports go at the top of wrapper files (they are needed at import time for decorators).
- Apptainer imports are lazy (inside
elifbranches) to avoid requiring Apptainer as a dependency. - Output types are dataclasses defined in
types.py. - Test reference data goes in
tests/data/{model}/.
Further reading
- Architecture — how the system is structured and why.
- Adding a Model — step-by-step guide for integrating a new model.
- Adding a Backend — how to implement a new execution backend.
