Contributing¶
Prerequisites¶
- Python >= 3.10
- hatch (
pipx install hatch) - pre-commit (
pip install pre-commit)
Setup¶
Running Tests¶
Code Quality¶
# Lint
ruff check mongomock_ng/ tests/
# Auto-fix
ruff check --fix mongomock_ng/ tests/
# Format
ruff format mongomock_ng/ tests/
# Type check
python -m mypy -p mongomock_ng
Pre-commit Hooks¶
The project uses pre-commit hooks (ruff, ruff-format, mypy). To run manually:
Branching Model¶
We use gitflow workflow.
PRs should be issued against the develop branch.
Releasing¶
- Update
__version__inmongomock_ng/__version__.py - Update
CHANGELOG.mdwith the same version - Open a PR against
develop— on merge, a tagv<version>is created automatically - The tag push triggers a build and publish to PyPI
Container Engine¶
The Makefile uses a configurable container engine via .container-engine: