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.4.0.tar.gz (16.6 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.4.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_release_master-0.4.0.tar.gz
  • Upload date:
  • Size: 16.6 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.4.0.tar.gz
Algorithm Hash digest
SHA256 0d1a764b364d15e2215d9e0ec8199a6b2a2721112c4b0386974403874264bd4f
MD5 09d4f6a9d9df859ecfda0dc179590a7d
BLAKE2b-256 b985444c43b0c6d16fe26cf0c555522ec6dd846db0a3766a069cbae00761aab6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_release_master-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc4705d28f6d921d8b585835c884b71f934f65352c7c27ece47eaef46911d69f
MD5 ea416d6211ed5ee25f82c33cb3e401d4
BLAKE2b-256 1e2a084e6e56cd2b48a1ab2d7a5e0486af33599bcd5b6f7d25173858507cd7d2

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