Skip to content

Contributing

YAIB is in active development and we welcome contributions. Please discuss the change you want to make in an issue first, and follow the code of conduct.

Development setup

git clone https://github.com/rvandewater/YAIB.git
cd YAIB
git checkout development
uv python install 3.12
uv sync --dev --extra imputation
uv run pre-commit install

Branch from development and open pull requests against it.

Tests

uv run pytest tests/

With coverage of the icu_benchmarks package:

uv run coverage run -m pytest tests/
uv run coverage report
uv run coverage html  # writes htmlcov/index.html

CI runs the test suite with coverage on Python 3.10 to 3.13, uploads the coverage to Codecov, and trains a model on the demo data end to end. New code should come with tests; a bug fix should come with a test that fails without it.

Formatting and linting

ruff formats and lints the code, with a line length of 127:

uv run ruff format --line-length 127
uv run ruff check --line-length 127 --statistics

The pre-commit hooks run ruff, codespell, Prettier (YAML) and mdformat (Markdown) on every commit. To run them on all files:

uv run pre-commit run --all-files

Pull requests

  1. Update the documentation for any change to the interface, including installation, configuration and command-line options; see Documentation.
  2. Keep pyproject.toml and uv.lock in sync: after changing dependencies, run uv lock and commit both. CI installs with uv sync --locked.
  3. Use SemVer for version changes.
  4. A pull request can be merged once it has the required reviewer approval.

Libraries

YAIB builds on: