An automated Python package release management tool with AI-powered changelog generation
Project description
Python Release Master
An automated Python package release management tool with AI-powered changelog generation. Streamline your Python package releases with automated version bumping, changelog generation, and PyPI publishing.
Features
- 🚀 Automated version bumping (major, minor, patch)
- 📝 AI-powered changelog generation
- 🔍 Package validation in clean Docker environment
- 📦 PyPI publishing
- 🏷️ GitHub release creation
- ✨ Modern CLI interface
Installation
pip install python-release-master
Quick Start
- Create a configuration file
.release-master.ymlin your project root:
version_files:
- pyproject.toml # Files containing version strings to update
- src/your_package/__init__.py
changelog:
ai_powered: true # Set to false to use simple commit list
sections:
- Features
- Bug Fixes
- Documentation
- Internal Changes
git:
push: true # Whether to push changes automatically
tag: true # Whether to create git tags
pypi:
publish: true # Whether to publish to PyPI
- Set up your PyPI token:
export PYPI_TOKEN=your_pypi_token
- Run the release command:
# Create a patch release
python-release-master release create --version-bump patch
# Create a minor release with custom title
python-release-master release create --version-bump minor --title "New Features Release"
# Create a major release with description
python-release-master release create --version-bump major --title "v2.0 Release" --description "Complete rewrite with new features"
Advanced Usage
Skipping Steps
You can skip specific steps in the release process:
python-release-master release create --version-bump patch --skip version,changelog,publish
Available skip options:
version: Skip version bumpingchangelog: Skip changelog generationverify: Skip package verificationpublish: Skip PyPI publishinggithub: Skip GitHub release creation
Package Verification
By default, the tool verifies your package in a clean Docker environment before publishing:
- Creates a fresh Docker container
- Installs your package
- Runs basic validation tests
- Ensures all dependencies are properly specified
To skip verification:
python-release-master release create --version-bump patch --skip verify
AI-Powered Changelog
When changelog.ai_powered is enabled, the tool:
- Analyzes your git commits since the last release
- Uses AI to categorize and summarize changes
- Generates a human-readable changelog
To disable AI-powered changelog:
changelog:
ai_powered: false
Configuration Reference
Full configuration options in .release-master.yml:
version_files:
- pyproject.toml
- src/your_package/__init__.py
changelog:
ai_powered: true
sections:
- Features
- Bug Fixes
- Documentation
- Internal Changes
commit_types: # Optional: map commit prefixes to sections
feat: Features
fix: Bug Fixes
docs: Documentation
chore: Internal Changes
git:
push: true
tag: true
remote: origin
main_branch: main
pypi:
publish: true
repository: pypi # Use 'testpypi' for testing
github:
create_release: true
draft: false
prerelease: false
Requirements
- Python 3.8+
- Docker (for package verification)
- Git
- PyPI account and token
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_release_master-0.2.0.tar.gz.
File metadata
- Download URL: python_release_master-0.2.0.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddaa173ad3a661f2c5e67505053d761e29242bca22e87b262ade7b75f9443c6d
|
|
| MD5 |
872cf1972ee76e30c24846e84b6c502e
|
|
| BLAKE2b-256 |
64762d8de64503a8c599976043ef44aaae63ebc8b9396eb4f8a853f9be5f4187
|
File details
Details for the file python_release_master-0.2.0-py3-none-any.whl.
File metadata
- Download URL: python_release_master-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f7c98fd7d56d2433b1034cee0b059fcc520dfd5d1075f4ac2b1ad479c36e1d2
|
|
| MD5 |
c2163a35b8fdc0ddf9165ef7908d7559
|
|
| BLAKE2b-256 |
d5c55dc6ec9dd7d70fd76fdbc4374d7043ab84c57815ee8d80da84090f91bc4c
|