This package uses uv for dependency management and hatch-vcs for automatic version detection from git tags.
The version is automatically detected from git tags.
Tags should follow the format: vX.Y.Z (e.g., v0.1.0)
The version must follow PEP 440 format: X.Y.Z with optional suffixes like
a1, b2, rc1, .post1, .dev0, etc.
When you tag a commit:
- The package version matches the tag (e.g., tag
v0.1.0→ version0.1.0) - After the tag, development versions are created automatically (e.g.,
0.1.1.dev5+gabc1234)
-
Create and push a tag:
git tag v0.1.0 -m "Release 0.1.0" git push origin v0.1.0 -
Build and publish:
# Build the package (version will be detected from tags) uv build # Publish to PyPI uv publish
-
Create a GitHub Release:
- Go to https://github.com/GalacticDynamics/phasecurvefit/releases/new
- Choose or create the tag
v0.1.0 - Fill in release notes
- Publish the release
# From repository root
uv build
uv publishNote: Publishing requires PyPI credentials configured.
Before creating a release:
-
Run all tests:
uv run nox -s test -
Check code quality:
uv run nox -s lint
-
Build documentation:
uv run nox -s docs
-
Update CHANGELOG (if you maintain one)
Follow Semantic Versioning:
- Patch (0.0.x): Bug fixes, documentation updates
- Minor (0.x.0): New features, backwards-compatible changes
- Major (x.0.0): Breaking changes
Ensure you have PyPI credentials configured:
# Set PyPI token (recommended)
export UV_PUBLISH_TOKEN=pypi-...
# Or configure in ~/.pypircThen publish:
uv publish- Version not detected: Ensure you've pushed the tag and it follows the
vX.Y.Zformat - Build fails: Check that all tests pass and dependencies are correctly specified
- Publish fails: Verify PyPI credentials and that the version doesn't already exist on PyPI