Skip to content

Latest commit

 

History

History
96 lines (71 loc) · 1.99 KB

File metadata and controls

96 lines (71 loc) · 1.99 KB

Deployment Instructions

This document describes how to build and deploy the interactive-sort package to PyPI.

Prerequisites

  1. Install build tools:

    pip install build twine
  2. Make sure you have PyPI account credentials configured:

Building the Package

  1. Clean any previous builds:

    rm -rf dist/ build/ *.egg-info
  2. Build the distribution files:

    python -m build

    This creates:

    • dist/interactive-sort-X.X.X.tar.gz (source distribution)
    • dist/interactive_sort-X.X.X-py3-none-any.whl (wheel distribution)

Testing the Build

  1. Install in a test environment:

    pip install dist/interactive-sort-*.whl
  2. Test both commands:

    interactive-sort --help
    is --help
  3. Test functionality:

    echo -e "cherry\napple\nbanana" | interactive-sort
    echo -e "cherry\napple\nbanana" | is

Uploading to PyPI

Test PyPI (recommended first)

  1. Upload to Test PyPI:

    python -m twine upload --repository testpypi dist/*
  2. Test installation from Test PyPI:

    pip install --index-url https://test.pypi.org/simple/ interactive-sort

Production PyPI

  1. Upload to production PyPI:

    python -m twine upload dist/*
  2. Verify installation:

    pip install interactive-sort

Version Management

Before deploying:

  1. Update version in src/interactive_sort/__init__.py
  2. Update version in pyproject.toml (should match)
  3. Create a git tag:
    git tag v1.0.0
    git push origin v1.0.0

Commands Available After Installation

The package provides two equivalent commands:

  • interactive-sort - Full command name
  • is - Short alias for convenience

Both commands have identical functionality and options.