Contributing¶
What branch to work on¶
This project follows Semantic Versioning, and every release is tagged. There are also branches looking like version numbers except of they have only one period (instead of two), e.g., 0.6, 0.7. These are maintenance branches. The branch named main [1] is for preparing next major version.
If you send a patch to fix a bug your pull request usually should be based on the latest maintenance branch, not main.
If you send a patch to add a new feature it should be based on the main branch.
How to run tests¶
This project uses uv for dependency management and virtual environment handling. We support various Python interpreters (CPython and PyPy) and versions, and use tox for running tests across multiple environments.
First, install uv (see uv’s installation guide). Then, sync dependencies:
uv sync --extra tests
To run the test suite on all supported Python versions:
uv run tox
If you don’t want to install all Python interpreters, use
--skip-missing-interpreters option:
uv run tox --skip-missing-interpreters
To run tests on multiple interpreters at a time, use --parallel option:
uv run tox --parallel
To run a single test:
uv run pytest tests/client_test.py::test_client_get -v
For type checking:
uv run mypy -p wikidata
For linting:
uv run flake8