Follow these steps to release a new version of the package:
-
Update the Version Number
- Modify the version number in
pyproject.toml
file according to semantic versioning (e.g.,1.0.1
).
- Modify the version number in
-
Run Tests
- Ensure all tests pass
pytest
-
Build the Package
- Create the distribution packages (source and wheel).
python -m build
-
Tag the Release in Git
- Create a git tag for the release to track the version in the repository.
git tag -a v1.0.1 -m "Release version 1.0.1" git push origin v1.0.1
-
Push Changes to Remote
- Push your changes and tags to the remote repository.
git push origin main
-
Upload to PyPI
- Use
twine
to upload the package to PyPI.
python -m twine upload dist/* --verbose
- Use
-
Create a GitHub Release (Optional)
- Create a release with the tag and include release notes.