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.

  1. Start the test database:
Terminal window
# On Linux/macOS
chmod +x ./tests/start-test-database.sh
./tests/start-test-database.sh
# On Windows (PowerShell)
./tests/start-test-database.ps1
  1. Run the tests with coverage:
Terminal window
uv run coverage run --rcfile=tests/coverage/.coveragerc
uv run coverage report
  1. Generate an HTML coverage report:
Terminal window
uv run coverage html -d htmlcov
  1. Stop the test database:
Terminal window
# On Linux/macOS
chmod +x ./tests/stop-test-database.sh
./tests/stop-test-database.sh
# On Windows (PowerShell)
./tests/stop-test-database.ps1
Terminal window
cd docs
npm install
npm run dev # Local preview
npm run build # Production 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