Thank you for your interest in contributing to gherkin-official, the official Python parser implementation for Gherkin! This guide will help you get set up and understand our development workflow. Make sure to read the language-agnostic contributing guidelines before proceeding.
Using uv is recommended for contributing with this project, though you can also install dependencies via pip (use pip install . --group dev with v25.1+) or your preferred tool.
First change to the directory containing the Python implementation and install development dependencies.
cd python
uv syncAt the root of the repository, install pre-commit hooks to automatically validate linting and formatting of your Python code with every commit.
cd ..
uv run pre-commit installUnit tests can run via pytest.
uv run pytestTests and linting can be validating across supported Python versions through tox - preferably via tox-uv.
# Run unit tests on all supported Python versions
tox
# Test on a specific Python version
tox -e py312
# Run test coverage
tox -e coverage
# Run linting and formatting
tox -e lint