Skip to main content

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

  1. Create a configuration file .release-master.yml in 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
  1. Set up your PyPI token:
export PYPI_TOKEN=your_pypi_token
  1. 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 bumping
  • changelog: Skip changelog generation
  • verify: Skip package verification
  • publish: Skip PyPI publishing
  • github: Skip GitHub release creation

Package Verification

By default, the tool verifies your package in a clean Docker environment before publishing:

  1. Creates a fresh Docker container
  2. Installs your package
  3. Runs basic validation tests
  4. 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:

  1. Analyzes your git commits since the last release
  2. Uses AI to categorize and summarize changes
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_release_master-0.3.0.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_release_master-0.3.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file python_release_master-0.3.0.tar.gz.

File metadata

  • Download URL: python_release_master-0.3.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

Hashes for python_release_master-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d4e7b80e1f09b5a4f0f1b822ce101693284ee8c9ae4049482cea3bdbc5cd329b
MD5 d2df7d2218b9c3c94a9c8abcf83fcd46
BLAKE2b-256 23c0156e4cfb1d9cffa1f41befa7fa3a4d87d369da67ede18cae875da1444edf

See more details on using hashes here.

File details

Details for the file python_release_master-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_release_master-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44deb06a630c554e904b22da276ab9bcf0f7ee7b92137d1f1ba05cefa09ec047
MD5 fcb961681f9d3e3662d63d100e03eb25
BLAKE2b-256 d7e9e50a688d2e9fc646ab0b060ce90ce7e027beb5b11ebca778748f585ed1b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page