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¶
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:
The pre-commit hooks run ruff, codespell, Prettier (YAML) and mdformat (Markdown) on every commit. To run them on all files:
Pull requests¶
- Update the documentation for any change to the interface, including installation, configuration and command-line options; see Documentation.
- Keep
pyproject.tomlanduv.lockin sync: after changing dependencies, runuv lockand commit both. CI installs withuv sync --locked. - Use SemVer for version changes.
- A pull request can be merged once it has the required reviewer approval.
Libraries¶
YAIB builds on:
- Polars and pandas for data handling.
- ReciPys for the preprocessing recipes.
- PyTorch, PyTorch Lightning, PyTorch Ignite and TorchMetrics for deep learning.
- scikit-learn, LightGBM, XGBoost, CatBoost and imbalanced-learn for classical models.
- Optuna for hyperparameter tuning.
- gin-config for configuration.
- SHAP for feature explanations.
- Weights & Biases for experiment tracking.
- HyperImpute and PyPOTS for
imputation baselines (optional
imputationextra). - pytest for testing.