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.

Features

  • 🤖 AI-powered changelog generation
  • 🔄 Automated version bumping (semantic versioning)
  • 📦 PyPI publishing
  • 🏷️ Git tag and release creation
  • 🎯 Smart version bump suggestions

Installation

# Install from PyPI
pip install python-release-master

# Verify installation
release-master --version

Quick Start

  1. Create a .release-master.yaml configuration file in your project root:
version:
  files:
    - pyproject.toml  # Files containing version strings
  pattern: '\d+\.\d+\.\d+'

changelog:
  ai:
    enabled: true
    model: gpt-4-1106-preview
  sections:
    - Features
    - Bug Fixes
    - Documentation
    - Internal Changes

git:
  push: true
  tag_prefix: v
  release:
    enabled: true

pypi:
  publish: true
  1. Set required environment variables:
export OPENAI_API_KEY=your-openai-api-key
export PYPI_TOKEN=your-pypi-token
  1. Run the release command from your project directory:
release-master release-package

How It Works

  1. Analyzes git history to determine version bump type (major, minor, patch)
  2. Updates version in specified files
  3. Generates changelog using OpenAI
  4. Builds Python package
  5. Publishes to PyPI
  6. Creates Git tag and release

Configuration

Key configuration options in .release-master.yaml:

  • version.files: List of files containing version strings
  • changelog.ai.enabled: Enable/disable AI-powered changelog
  • git.push: Whether to push changes to remote
  • pypi.publish: Whether to publish to PyPI

CLI Commands

# Create a new release
release-master release-package

# Show help
release-master --help

# Show version
release-master --version

Requirements

  • Python 3.8+
  • OpenAI API key
  • PyPI token
  • Git repository

Development

If you want to contribute or develop the package:

  1. Clone the repository:
git clone https://github.com/kareemaly/python-release-master.git
cd python-release-master
  1. Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install in development mode with dev dependencies:
pip install -e ".[dev]"
  1. Run the development version:
# Use python -m when running from source
python -m python_release_master release-package

License

MIT License

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.2.tar.gz (16.4 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.2-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_release_master-0.4.2.tar.gz
  • Upload date:
  • Size: 16.4 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.2.tar.gz
Algorithm Hash digest
SHA256 836b41963e2b1d23e856678a0b4f0fcc52127922d87e1ede278a7e1c09fd6f23
MD5 6085c5026f5afb316ab6db477ca21294
BLAKE2b-256 9e2848d28f8471d1c980d405022e34ec90ae89340e08d8c55fd75088054b0b84

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_release_master-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1f025784a0d5469c31915652f33eae01f26a2a1ab1c561107da2a111192b825f
MD5 b055d54e282af30d5618545ba7619cac
BLAKE2b-256 2c1d76bb0b1696f17cbf80e3afd17ee6d7245abf5aad31b3c6cc26270c65ad0f

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