Metadata-Version: 2.4
Name: quick-publish
Version: 0.1.7
Summary: Shipped a standard `npm publish` workflow with one click for Python packages
Project-URL: Homepage, https://github.com/quick-publish/quick-publish-py
Project-URL: Repository, https://github.com/quick-publish/quick-publish-py
Project-URL: Issues, https://github.com/quick-publish/quick-publish-py/issues
Author: quick-publish contributors
License: MIT License
        
        Copyright (c) 2023 quick-publish contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: changelog,packaging,publish,release,semver
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: click>=8.0.0
Requires-Dist: gitpython>=3.1.0
Requires-Dist: packaging>=21.0
Requires-Dist: questionary>=1.10.0
Requires-Dist: rich>=12.0.0
Requires-Dist: toml>=0.10.2
Description-Content-Type: text/markdown

# quick-publish

[![PyPI version](https://badgen.net/pypi/v/quick-publish)](https://pypi.org/project/quick-publish/)
[![Python versions](https://badgen.net/pypi/python/quick-publish)](https://pypi.org/project/quick-publish/)
[![CI](https://github.com/quick-publish/quick-publish-py/workflows/CI/badge.svg)](https://github.com/quick-publish/quick-publish-py/actions)

Shipped a standard `publish` workflow with one click for Python packages.

> **Note**: This is the Python version of the popular [npm package](https://npm.im/quick-publish). It provides the same streamlined publishing experience for Python packages.

## Motivation

As a maintainer for a large number of Python packages, it will be very cumbersome if you manually input the semantic version, generate changelog, git and PyPI tag etc. This tooling is to help you do all these things with one click.

## Features

- Semantic version selection with interactive prompts
- Create git tag and push to remote
- Generate or update `CHANGELOG.md` from conventional commits
- Update version in `pyproject.toml`
- Build package for distribution
- Full integration with modern Python packaging standards (PEP 517/518/621)

## Install

### Using pip (recommended for users)

```bash
pip install quick-publish        # Global installation
pip install quick-publish -D     # Local development installation
```

### Using uv (recommended for developers)

```bash
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone and install from source
git clone https://github.com/quick-publish/quick-publish-py.git
cd quick-publish-py
uv sync --dev

# Run the CLI
uv run publish
```

## Usage

### For Python Projects

Create a one-click release flow:

```bash
publish
```

### For NPM Projects (Original Use Case)

If you're working with NPM projects and want to use the original version:

```bash
npm i quick-publish -g
publish
```

### Command Options

```bash
Usage: publish [OPTIONS]

  Shipped a standard `publish` workflow with one click.

Options:
  --depcost      Generate or update `DEPCOST.md`, defaults to `false`
  --push         Execute git push & tag push to remote git origin, defaults to `true`
  --dry-run      Show what would be done without making changes
  --version TEXT Specify version directly instead of interactive selection
  -v, --verbose  Enable verbose output
  -h, --help     Display this message
```

### Examples

#### Interactive version selection
```bash
$ publish
Current version: 1.2.3
Select next version:
❯ 1.2.4 (patch)
  1.3.0 (minor)
  2.0.0 (major)
  Custom version
```

#### Dry run to preview changes
```bash
publish --dry-run --verbose
```

#### Specify version directly
```bash
publish --version 2.0.0
```

#### Skip git push
```bash
publish --no-push
```

## How It Works

1. **Version Selection**: Interactively selects next semantic version or uses provided override
2. **Update Files**: Updates version in `pyproject.toml` and generates `CHANGELOG.md`
3. **Git Operations**: Commits changes, creates git tag, and pushes to remote
4. **Build**: Builds the package using modern Python build tools
5. **Publish Prep**: Prepares distribution files for PyPI upload

## Requirements

- Python 3.8+
- Git repository initialized
- `pyproject.toml` with `[project]` section (PEP 621 compliant)

## Integration with NPM Projects

This Python version maintains compatibility with the original npm workflow. If you're managing mixed Python/NPM projects:

```bash
# For Python packages
pip install quick-publish
publish

# For NPM packages  
npm i quick-publish -g
publish
```

Both versions provide the same streamlined experience with language-specific optimizations.

## Development

### Quick Start with uv

```bash
# Clone repository
git clone https://github.com/quick-publish/quick-publish-py.git
cd quick-publish-py

# Install dependencies and set up development environment
uv sync --dev

# Run tests
uv run pytest

# Run all quality checks
make check

# Or run individual checks
uv run ruff check src tests
uv run black --check src tests
uv run mypy src
```

### Using Makefile

```bash
# Install dependencies and run tests
make dev-setup

# Run all quality checks
make check

# Build the package
make build

# See all available commands
make help
```

## Contributing

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.

## Credits

`quick-publish` wouldn't exist without the inspirations from following projects:

- [quick-publish (npm)](https://github.com/ulivz/quick-publish) - Original npm version
- [conventional-changelog-cli](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli)

## License

MIT © [quick-publish contributors](https://github.com/quick-publish/quick-publish-py/graphs/contributors)