Development#
If you wish to contribute to DISCO-EB, please follow these instructions.
Setup#
The repository uses uv:
git clone https://github.com/cosmo-sims/DISCO-EB.git && cd DISCO-EB
uv sync --extra cuda13 # or --extra cuda12
uv run pytest tests -rs # needs a GPU, and -rs shows skipped CLASS comparisons
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’s CPU install 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
Conventions#
Commit messages follow Conventional Commits. The publish workflow reads them to choose the next version. The tests compare against CLASS, so install the dev group, which brings classy.