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.
Features
- Automated version management
- AI-powered changelog generation from commits and PRs
- Smart commit message generation for uncommitted changes
- Comprehensive testing (unit, integration, docker)
- Documentation generation and validation
- PyPI publishing with verification
- GitHub Actions integration
Installation
pip install python-release-master
Quick Start
- Add to your GitHub workflow:
- name: Release
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
python-release-master publish \
--bump ${{ github.event.inputs.version_bump }} \
--title "Release ${{ github.event.inputs.version_bump }} version" \
--description "${{ github.event.inputs.release_notes }}"
- Configure release settings:
# .release-master.yaml
version_files:
- pyproject.toml
- src/mypackage/__init__.py
changelog:
ai_powered: true
openai_model: gpt-4-0125-preview # Default model, can also use gpt-3.5-turbo
sections:
- Features
- Bug Fixes
- Documentation
- Internal Changes
skip_steps:
- docker_tests # Skip docker testing if needed
AI Features
Smart Changelog Generation
The tool uses OpenAI's GPT models to analyze your commits and pull requests, generating a structured changelog that:
- Determines the appropriate version bump (major, minor, patch)
- Categorizes changes into meaningful sections
- Provides detailed descriptions for each change
- Identifies breaking changes
- Maintains consistent formatting
Example output:
## Features
- Add AI-powered changelog generation
- Implement smart commit message handling
## Bug Fixes
- Fix version detection in pyproject.toml
- Resolve GitHub API pagination issues
## Documentation
- Update installation instructions
- Add AI configuration guide
Intelligent Commit Messages
When uncommitted changes are detected, the tool can:
- Analyze file changes to understand the context
- Generate conventional commit messages
- Add appropriate scope and description
- Include detailed body explaining the changes
- Handle breaking changes correctly
Example commit message:
feat(changelog): add AI-powered generation
Implement OpenAI integration for generating changelogs from commits and PRs.
This change adds intelligent analysis of code changes to provide better
release notes.
Configuration
OpenAI Settings
changelog:
ai_powered: true
openai_model: gpt-4-0125-preview # Default model
sections:
- Features
- Bug Fixes
- Documentation
- Internal Changes
- Breaking Changes
Environment Variables
OPENAI_API_KEY: Your OpenAI API key (required for AI features)PYPI_TOKEN: PyPI token for publishingGITHUB_TOKEN: GitHub token for release creation
Documentation
For detailed documentation, visit docs/.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE 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.1.1.tar.gz.
File metadata
- Download URL: python_release_master-0.1.1.tar.gz
- Upload date:
- Size: 8.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a91bac8bee3bd4039b15f51475115f9bdb0d4d41f9837cee0ca79e32299c7e88
|
|
| MD5 |
c2886e13cf5224bb338ca4ff877a0918
|
|
| BLAKE2b-256 |
44032435cc6f298f254e3a3929205226074567b0109eaeb2083c8b194bdd33f0
|
File details
Details for the file python_release_master-0.1.1-py3-none-any.whl.
File metadata
- Download URL: python_release_master-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.6 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 |
1e58bcb37214a491eca8515ef3500a4b8f3f1848a6ecad2dee0424b1d239c704
|
|
| MD5 |
b2eb9d22f5020cb09bda43773475ff17
|
|
| BLAKE2b-256 |
beceaf639cf22ba5e6801cce5061a6109b25f5ea3f94e52434e58dae285da087
|