Contributing#
Thanks for your interest in contributing! Here’s how to get started.
Development Setup#
git clone https://github.com/EttoreRocchi/MaldiBatchKit.git
cd MaldiBatchKit
pip install -e ".[dev,viz]"
pre-commit install
Running Tests#
make test # fast subset (excludes slow tests)
make test-cov # full run with term coverage report
The coverage gate is 95%. Please add tests for any new public API.
Linting#
make lint # ruff check --fix
make format # ruff format
Pre-commit hooks run ruff-check --fix, ruff-format,
end-of-file-fixer, and trailing-whitespace. Make sure they are
installed (pre-commit install).
Style#
NumPy-style docstrings for all public API.
BaseBatchCorrectorsubclasses should implement_fit_impland_transform_impl. Store fitted attributes with trailing underscores (gamma_star_,batch_levels_, …).No side effects outside of
fit-transformmust be idempotent.Raise clear
ImportErrorwhen optional dependencies are missing (seeHarmony._require_harmonypyfor the reference style).
Submitting Changes#
Fork the repository and create a feature branch from
main.Add tests for any new functionality.
Run
make testandmake lint- both must be clean.Update
CHANGELOG.mdunder the next version heading.Open a pull request with a clear title and a body that motivates the design decision (not just what changed).
Reporting Issues#
Open an issue on GitHub with a minimal reproducer:
MaldiBatchKit version (
python -c "import maldibatchkit; print(maldibatchkit.__version__)")scikit-learn, combatlearn, and pandas versions
Feature matrix shape, batch labels, and the exception or wrong result