From 714939bff3c1fb6c538ef104b600a5ec9e906b79 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Sep 2025 01:18:05 +0000 Subject: [PATCH 1/2] Initial plan From 4e25d1d3b6050cb0c7513465d1a82cc88a826c93 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Sep 2025 01:23:55 +0000 Subject: [PATCH 2/2] Add 'is' command alias and create DEPLOY.md with PyPI instructions Co-authored-by: MightyHelper <32612290+MightyHelper@users.noreply.github.com> --- DEPLOY.md | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 1 + 2 files changed, 97 insertions(+) create mode 100644 DEPLOY.md diff --git a/DEPLOY.md b/DEPLOY.md new file mode 100644 index 0000000..9e91bab --- /dev/null +++ b/DEPLOY.md @@ -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. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b850a98..d863210 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"]