Contributing
Development setup
Section titled “Development setup”- Install uv
- Clone the repository:
git clone https://github.com/opencitations/time-agnostic-librarycd time-agnostic-library- Install all dependencies:
uv sync --dev- Build the package (output:
dist/):
uv buildRunning the tests
Section titled “Running the tests”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:
| Value | Triplestore | Port | Endpoint |
|---|---|---|---|
virtuoso (default) | OpenLink Virtuoso | 41720 | http://127.0.0.1:41720/sparql |
blazegraph | Blazegraph | 41730 | http://127.0.0.1:41730/bigdata/namespace/tal/sparql |
fuseki | Apache Jena Fuseki | 41740 | http://127.0.0.1:41740/tal |
graphdb | GraphDB Free Edition | 41750 | http://127.0.0.1:41750/repositories/tal |
qlever | QLever | 41760 | http://127.0.0.1:41760 |
Start a triplestore
Section titled “Start a triplestore”TRIPLESTORE=virtuoso ./tests/setup-triplestore.shThe setup script starts the Docker container, creates the dataset or repository, and loads test data.
Run the tests
Section titled “Run the tests”TRIPLESTORE=virtuoso uv run coverage run --rcfile=tests/coverage/.coveragercuv run coverage reportGenerate an HTML coverage report
Section titled “Generate an HTML coverage report”uv run coverage html -d htmlcovStop the triplestore
Section titled “Stop the triplestore”TRIPLESTORE=virtuoso ./tests/teardown-triplestore.shCI matrix
Section titled “CI matrix”GitHub Actions runs a matrix of 4 Python versions (3.10, 3.11, 3.12, 3.13) x 5 triplestores = 20 parallel jobs.
Building the documentation
Section titled “Building the documentation”cd docsnpm installStart a local preview server:
npm run devBuild for production:
npm run buildRelease process
Section titled “Release process”The project uses semantic-release for automated releases.
Commit message format
Section titled “Commit message format”Commit messages follow the Conventional Commits specification:
fix: ...triggers a PATCH version bumpfeat: ...triggers a MINOR version bumpfeat!: .../fix!: .../refactor!: ...triggers a MAJOR version bump
Triggering a release
Section titled “Triggering a release”Include [release] in the commit message:
git commit -m "feat: add new feature [release]"git push origin mainThe release workflow will:
- Run tests via GitHub Actions
- Update
CHANGELOG.mdandpyproject.toml - Create a GitHub release with release notes
- Publish the package to PyPI
How to contribute
Section titled “How to contribute”- Fork the repository
- Create a new branch for your feature or bugfix
- Make your changes
- Submit a pull request