Skip to content

Contributing

  1. Install uv
  2. Clone the repository:
Terminal window
git clone https://github.com/opencitations/time-agnostic-library
cd time-agnostic-library
  1. Install all dependencies:
Terminal window
uv sync --dev
  1. Build the package (output: dist/):
Terminal window
uv build

Tests require Docker to be running. The test suite runs against multiple SPARQL triplestores using a matrix strategy. Set the TRIPLESTORE environment variable to select the backend:

ValueTriplestorePortEndpoint
virtuoso (default)OpenLink Virtuoso41720http://127.0.0.1:41720/sparql
blazegraphBlazegraph41730http://127.0.0.1:41730/bigdata/namespace/tal/sparql
fusekiApache Jena Fuseki41740http://127.0.0.1:41740/tal
graphdbGraphDB Free Edition41750http://127.0.0.1:41750/repositories/tal
qleverQLever41760http://127.0.0.1:41760
Terminal window
TRIPLESTORE=virtuoso ./tests/setup-triplestore.sh

The setup script starts the Docker container, creates the dataset or repository, and loads test data.

Terminal window
TRIPLESTORE=virtuoso uv run coverage run --rcfile=tests/coverage/.coveragerc
uv run coverage report
Terminal window
uv run coverage html -d htmlcov
Terminal window
TRIPLESTORE=virtuoso ./tests/teardown-triplestore.sh

GitHub Actions runs a matrix of 4 Python versions (3.10, 3.11, 3.12, 3.13) x 5 triplestores = 20 parallel jobs.

Terminal window
cd docs
npm install

Start a local preview server:

Terminal window
npm run dev

Build for production:

Terminal window
npm run build

The project uses semantic-release for automated releases.

Commit messages follow the Conventional Commits specification:

  • fix: ... triggers a PATCH version bump
  • feat: ... triggers a MINOR version bump
  • feat!: ... / fix!: ... / refactor!: ... triggers a MAJOR version bump

Include [release] in the commit message:

Terminal window
git commit -m "feat: add new feature [release]"
git push origin main

The release workflow will:

  1. Run tests via GitHub Actions
  2. Update CHANGELOG.md and pyproject.toml
  3. Create a GitHub release with release notes
  4. Publish the package to PyPI
  1. Fork the repository
  2. Create a new branch for your feature or bugfix
  3. Make your changes
  4. Submit a pull request