Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions DEPLOY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Deployment Instructions

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

## Prerequisites

1. Install build tools:
```bash
pip install build twine
```

2. Make sure you have PyPI account credentials configured:
- Create account at https://pypi.org/account/register/
- Get API token from https://pypi.org/manage/account/token/
- Configure credentials with `keyring` or `.pypirc` file

## Building the Package

1. Clean any previous builds:
```bash
rm -rf dist/ build/ *.egg-info
```

2. Build the distribution files:
```bash
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:
```bash
pip install dist/interactive-sort-*.whl
```

2. Test both commands:
```bash
interactive-sort --help
is --help
```

3. Test functionality:
```bash
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:
```bash
python -m twine upload --repository testpypi dist/*
```

2. Test installation from Test PyPI:
```bash
pip install --index-url https://test.pypi.org/simple/ interactive-sort
```

### Production PyPI

1. Upload to production PyPI:
```bash
python -m twine upload dist/*
```

2. Verify installation:
```bash
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:
```bash
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.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ keywords = ["sorting", "interactive", "text", "command-line", "utility"]

[project.scripts]
interactive-sort = "interactive_sort.main:main"
is = "interactive_sort.main:main"

[tool.setuptools.packages.find]
where = ["src"]
Expand Down