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.2.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.2.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

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

Hashes for python_release_master-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ddaa173ad3a661f2c5e67505053d761e29242bca22e87b262ade7b75f9443c6d
MD5 872cf1972ee76e30c24846e84b6c502e
BLAKE2b-256 64762d8de64503a8c599976043ef44aaae63ebc8b9396eb4f8a853f9be5f4187

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_release_master-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f7c98fd7d56d2433b1034cee0b059fcc520dfd5d1075f4ac2b1ad479c36e1d2
MD5 c2163a35b8fdc0ddf9165ef7908d7559
BLAKE2b-256 d5c55dc6ec9dd7d70fd76fdbc4374d7043ab84c57815ee8d80da84090f91bc4c

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