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.
- Start the test database:
# On Linux/macOSchmod +x ./tests/start-test-database.sh./tests/start-test-database.sh
# On Windows (PowerShell)./tests/start-test-database.ps1- Run the tests with coverage:
uv run coverage run --rcfile=tests/coverage/.coveragercuv run coverage report- Generate an HTML coverage report:
uv run coverage html -d htmlcov- Stop the test database:
# On Linux/macOSchmod +x ./tests/stop-test-database.sh./tests/stop-test-database.sh
# On Windows (PowerShell)./tests/stop-test-database.ps1Building the documentation
Section titled “Building the documentation”cd docsnpm installnpm run dev # Local previewnpm run build # Production 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