This document outlines the process for releasing new versions of the hokusai-ml-platform package.
Before creating a release, ensure:
- All tests pass locally and on CI
- Documentation is up to date
- CHANGELOG.md has been updated with release notes
- Version number in
pyproject.tomlhas been updated - Version number in
src/hokusai/__init__.pyhas been updated - Examples have been tested with the new version
Update the version in two places:
# In hokusai-ml-platform/pyproject.toml
version = "X.Y.Z"
# In hokusai-ml-platform/src/hokusai/__init__.py
__version__ = "X.Y.Z"Move items from "Unreleased" to a new version section:
## [X.Y.Z] - YYYY-MM-DD
### Added
- New features...
### Changed
- Changes...
### Fixed
- Bug fixes...git checkout -b release/vX.Y.Z
git add -A
git commit -m "chore: prepare release vX.Y.Z"
git push origin release/vX.Y.ZCreate a PR and ensure all checks pass.
After PR approval and merge:
git checkout main
git pull origin main
git tag -a vX.Y.Z -m "Release version X.Y.Z"
git push origin vX.Y.Z- Go to Releases
- Click "Draft a new release"
- Select the tag
vX.Y.Z - Title:
hokusai-ml-platform vX.Y.Z - Copy release notes from CHANGELOG.md
- Click "Publish release"
This will trigger the automated publishing workflow.
For TestPyPI releases:
- Check https://test.pypi.org/project/hokusai-ml-platform/
- Test installation:
pip install -i https://test.pypi.org/simple/ hokusai-ml-platform
For PyPI releases:
- Check https://pypi.org/project/hokusai-ml-platform/
- Test installation:
pip install hokusai-ml-platform
- Update installation instructions if needed
- Update any version-specific documentation
- Announce release in appropriate channels
git checkout -b chore/post-release-vX.Y.ZUpdate versions to next development version (e.g., X.Y.Z+1.dev0):
# In pyproject.toml and __init__.py
version = "X.Y.Z+1.dev0"Add new "Unreleased" section to CHANGELOG.md:
## [Unreleased]
### Added
### Changed
### FixedWe follow Semantic Versioning:
- MAJOR (X.0.0): Incompatible API changes
- MINOR (0.Y.0): Backwards-compatible functionality additions
- PATCH (0.0.Z): Backwards-compatible bug fixes
For critical fixes:
-
Create patch from the release tag:
git checkout -b hotfix/vX.Y.Z+1 vX.Y.Z
-
Apply fixes and follow abbreviated release process
-
Cherry-pick fixes back to main
If automated publishing fails:
cd hokusai-ml-platform
python -m build
python -m twine upload dist/*Ensure you have PyPI credentials configured.