Contributing¶
Thank you for contributing to bib-checker!
Setup¶
git clone https://github.com/MeighenBergerS/bib-checker.git
cd bib-checker
python -m venv .venv
source .venv/bin/activate
pip install --pre -e ".[dev]"
Workflow¶
- Fork the repository and create a branch from
main. - Make your changes and add tests.
- Run the test suite:
bash pytest # With coverage: pytest --cov=bib_checker - Run the linter:
bash ruff check . ruff format . - Open a pull request against
main.
Code style¶
- Python 3.11+ with full type hints.
- Line length: 100 characters (enforced by
ruff format). - Linting rules:
E,W,F,I,UP,B(seepyproject.toml). - Docstrings: NumPy style for all public APIs. Private helpers need at least a one-line summary.
Testing¶
- Unit tests use
pytest. - HTTP calls to InspireHEP are mocked with the
responseslibrary — never make real network calls in tests. - Place shared fixtures in
tests/conftest.py. - New
.bibfixture files go intests/fixtures/.
Commit messages¶
Follow Conventional Commits:
<type>: <short summary>
[optional body]
Common types: feat, fix, docs, test, chore, refactor.
Building the docs¶
mkdocs serve # live-preview at http://127.0.0.1:8000
mkdocs build # static output in site/