Contributing

Setting up a development environment

This project uses uv for dependency management.

git clone https://github.com/uk-lisa-gs/lisa-noise.git
cd lisa-noise
make dev

make dev runs uv sync --extra dev and installs the pre-commit hooks. The package is installed in editable mode, so changes to source files take effect immediately without reinstalling.


Pre-commit hooks

The following hooks run automatically on every git commit:

Hook

Purpose

ruff

Lints and auto-fixes Python code

ruff-format

Formats Python code

nbstripout

Strips output from Jupyter notebooks before committing

uv-lock

Keeps uv.lock in sync with pyproject.toml

To run them manually across all files:

make lint

Running the test suite

make test

This runs pytest with coverage reporting. Unit tests live in tests/unit/, the end-to-end run in tests/integration/.


Building the docs

make docs

The built HTML is written to docs/_build/html/; open index.html there to view it. Warnings are errors, so a broken link or reference fails the build. CI builds the pages on every pull request and publishes them to GitHub Pages on a merge to main. The API reference is generated from the docstrings.


Branch and PR conventions

  • Open an issue on GitHub to discuss changes prior to starting work.

  • When approved, open a new branch for the issue and link it to the issue number, e.g. 45-build-io-for-samples. This can be done for you on GitHub when you click “Create pull request” from the issue page.

  • Open a pull request against main when your branch is ready for review.

  • Do not push to the main branch, it is protected.