Development
This guide covers development setup and contributing to otava-test-data.
Development Setup
Clone the repository and install development dependencies:
git clone https://github.com/your-username/otava-test-data.git
cd otava-test-data
pip install -e ".[all]"
Running Tests
Run the test suite with pytest:
pytest
With coverage:
pytest --cov=otava_test_data --cov-report=html
Code Style
This project uses ruff for linting and formatting:
ruff check .
ruff format .
Building Documentation
Build the Sphinx documentation:
cd docs
make html
Or using invoke:
invoke docs
Releasing
Releases are automated via GitHub Actions. The workflow publishes to PyPI when a release is created.
Release Process
Update the version in
pyproject.tomlCommit the version change
Create and push a git tag:
git tag v0.1.0 git push origin v0.1.0
Create a GitHub Release from the tag
The GitHub Action will automatically build and publish to PyPI
PyPI Trusted Publishing Setup
The publish workflow uses PyPI trusted publishing (OIDC). To enable this:
Go to your PyPI project settings
Add a new trusted publisher with:
Owner: your GitHub username or organization
Repository: otava-test-data
Workflow name: publish.yml
Environment: pypi
For TestPyPI, create a similar trusted publisher with environment: testpypi
Manual Testing with TestPyPI
You can manually trigger the workflow to publish to TestPyPI for testing:
Go to Actions > Publish to PyPI
Click “Run workflow”
This will build and publish to TestPyPI only
Install from TestPyPI to verify:
pip install --index-url https://test.pypi.org/simple/ otava-test-data