Automated release versioning and structured PyPI/TestPyPI workflow #308
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request updates the build and publishing workflow for the Python package and modernizes the packaging configuration to use Hatch instead of setuptools. The changes improve version management, streamline release automation, and enhance compatibility with PyPI and TestPyPI.
Build & Release Workflow Modernization
.github/workflows/pypi.yml
to use Hatch for building (hatchling
,hatch-vcs
), added concurrency controls, and improved artifact handling for more reliable releases.Version Management Improvements
pyproject.toml
, automatically deriving the package version from git tags and generating a_version.py
file.src/agentlab/__init__.py
to import__version__
from_version.py
, with a fallback for development environments.Packaging Configuration Updates
pyproject.toml
, and updated Python version requirements to>=3.11,<3.13
. [1] [2]_version.py
file from formatting tools like Black.Description by Korbit AI
What change is being made?
Automate release versioning and restructure the PyPI/TestPyPI workflow to build once, publish to PyPI for stable tags and to TestPyPI for dev/rc/alpha/beta tags, sign artifacts, and create a GitHub Release with artifacts uploaded.
Why are these changes being made?
Simplify and harden the release process by centralizing versioning via git tags (using Hatch) and separating production vs. development publishing paths, including automated signing and release notes. Reduces manual steps and ensures consistent, auditable release artifacts.