๐Ÿ› ๏ธ Contributing

July 23, 2026 ยท View on GitHub

This section is for if you want to run the package in development, and get involved by making a code contribution.

Requirements: uv to easily handle scripts and virtual environments.

๐Ÿ“ฅ๏ธ Clone

Clone the repository:

git clone https://github.com/vemonet/rdflib-endpoint
cd rdflib-endpoint

๐Ÿช Install pre-commit hooks

uv run --all-extras pre-commit install

๐Ÿš€ Run example API

Run the example SPARQL endpoint with YASGUI on http://localhost:8000, it will be automatically reloaded when the code is changed:

./scripts/dev.sh

โ˜‘๏ธ Run tests

Make sure the existing tests still work by running the test suite and linting checks. Note that any pull requests to the fairworkflows repository on github will automatically trigger running of the test suite:

uv run --all-extras pytest

To display all print():

uv run --all-extras pytest -s

Warning

To run test of federated queries docker needs to be installed, and $DOCKER_HOST environment variable needs to be set, otherwise they will be skipped. On macOS with orbstack you can add this to your ~/.zshrc:

export DOCKER_HOST=unix:///Users/$(whoami)/.orbstack/run/docker.sock

To stop and delete all running containers you can run:

docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)

๐Ÿงน Code formatting

The code will be automatically formatted when you commit your changes using pre-commit. But you can also run the script to format the code yourself:

./scripts/fmt.sh

โ™ป๏ธ Reset the environment

Upgrade dependencies in lock file:

uv sync --all-extras --upgrade

Upgrade uv:

uv self update

Clean uv cache:

uv cache clean

๐Ÿท๏ธ Release process

Important

Get a PyPI API token at pypi.org/manage/account.

Run the release script providing the version bump: fix, minor, or major

./scripts/release.sh fix

Note

This will generate the changelog, commit the new version and changelog, create a tag and push the tag, which will trigger the creation of a new release on GitHub.