Releasing OntoSQL¶
Checklist for publishing a new version.
Pre-release¶
- Ensure
versioninpyproject.tomlmatches the release tag. - Update
CHANGELOG.md(move items from[Unreleased]to a new version section). - Confirm README, SPECS.md, ARCHITECTURE.md, ECOSYSTEM.md, and CHANGELOG are aligned with the release scope.
- Run the full CI suite locally:
pip install -e ".[dev]"
ruff check src tests
ruff format --check src tests
ty check
pytest --cov=ontosql --cov-fail-under=90
mkdocs build --strict
- Build and smoke-test the wheel:
pip install build
python -m build
pip install dist/ontosql-*.whl
python -c "import ontosql; print(ontosql.__version__)"
GitHub release¶
Create a GitHub release from the tag and paste the relevant CHANGELOG.md section.
Pushing a semver tag (v*.*.*) triggers the Release workflow, which runs pre-release checks before publishing:
| Check | Purpose |
|---|---|
Tag ↔ pyproject.toml version |
Prevents mismatched releases |
CHANGELOG.md section |
Ensures release notes exist for the tag |
| Ruff lint + format | Code style |
ty check |
Static types |
| Pytest (≥90% coverage) | Test suite |
mkdocs build --strict |
Documentation |
| Postgres integration tests | Dialect smoke tests |
twine check + wheel import |
Distribution metadata and installability |
Publish to PyPI runs only when all checks pass.
PyPI¶
The PyPI distribution name is ontosql.
Automated publish (recommended)¶
- Create a PyPI API token at pypi.org/manage/account/token/ scoped to the
ontosqlproject (or the whole account for the first upload). - Add it as a GitHub repository secret named
PYPI_API_TOKEN(Settings→Secrets and variables→Actions). - Tag and push — the Release workflow runs on tags matching
v*.*.*:
Manual publish¶
Requires PyPI credentials configured (~/.pypirc or TWINE_USERNAME=__token__ / TWINE_PASSWORD).
PyPI description and readme come from pyproject.toml — update them in the same release PR as README.md.
Documentation hosting¶
Docs are built with MkDocs (mkdocs build --strict) from mkdocs.yml.
| Host | Role | Trigger |
|---|---|---|
| Read the Docs | Canonical public documentation | RTD webhook on push/tags — .readthedocs.yaml |
| GitHub Pages | Optional mirror | Push to main — pages workflow |
Use Read the Docs URLs in README, PyPI Documentation field, and external links. GitHub Pages is a convenience mirror only.
One-time RTD setup: create a project named ontosql, point at this repository, enable builds for main and tags. .readthedocs.yaml installs pip install ".[docs]" and runs MkDocs with fail_on_warning: true.