Development#
To work on DISCO-CMB, set up the repository as follows.
The repository uses uv:
git clone https://github.com/cosmo-sims/DISCO-CMB.git
cd DISCO-CMB && uv sync --extra cuda13 # or --extra cuda12
uv run pytest tests # needs a CUDA GPU
uv run ruff format && uv run ruff check --fix
uv run ty check
uv run pre-commit install # the checks above, and a commit-message check
The documentation (Sphinx with MyST and autodoc) builds in an environment of its own, the package plus the docs group:
export UV_PROJECT_ENVIRONMENT=.venv-docs
uv sync --no-default-groups --group docs
uv run --no-sync sphinx-autobuild docs docs/_build/html # live preview
uv run --no-sync sphinx-build -W docs docs/_build/html # what CI runs
Commit messages follow Conventional Commits, and the pre-commit hook checks them.