Skip to content

Commit de7d866

Browse files
authored
Merge pull request #8 from MightyHelper/copilot/convert-to-command-line-tool
Add 'is' command alias and PyPI deployment instructions
2 parents 2166764 + 4e25d1d commit de7d866

2 files changed

Lines changed: 97 additions & 0 deletions

File tree

DEPLOY.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Deployment Instructions
2+
3+
This document describes how to build and deploy the `interactive-sort` package to PyPI.
4+
5+
## Prerequisites
6+
7+
1. Install build tools:
8+
```bash
9+
pip install build twine
10+
```
11+
12+
2. Make sure you have PyPI account credentials configured:
13+
- Create account at https://pypi.org/account/register/
14+
- Get API token from https://pypi.org/manage/account/token/
15+
- Configure credentials with `keyring` or `.pypirc` file
16+
17+
## Building the Package
18+
19+
1. Clean any previous builds:
20+
```bash
21+
rm -rf dist/ build/ *.egg-info
22+
```
23+
24+
2. Build the distribution files:
25+
```bash
26+
python -m build
27+
```
28+
29+
This creates:
30+
- `dist/interactive-sort-X.X.X.tar.gz` (source distribution)
31+
- `dist/interactive_sort-X.X.X-py3-none-any.whl` (wheel distribution)
32+
33+
## Testing the Build
34+
35+
1. Install in a test environment:
36+
```bash
37+
pip install dist/interactive-sort-*.whl
38+
```
39+
40+
2. Test both commands:
41+
```bash
42+
interactive-sort --help
43+
is --help
44+
```
45+
46+
3. Test functionality:
47+
```bash
48+
echo -e "cherry\napple\nbanana" | interactive-sort
49+
echo -e "cherry\napple\nbanana" | is
50+
```
51+
52+
## Uploading to PyPI
53+
54+
### Test PyPI (recommended first)
55+
56+
1. Upload to Test PyPI:
57+
```bash
58+
python -m twine upload --repository testpypi dist/*
59+
```
60+
61+
2. Test installation from Test PyPI:
62+
```bash
63+
pip install --index-url https://test.pypi.org/simple/ interactive-sort
64+
```
65+
66+
### Production PyPI
67+
68+
1. Upload to production PyPI:
69+
```bash
70+
python -m twine upload dist/*
71+
```
72+
73+
2. Verify installation:
74+
```bash
75+
pip install interactive-sort
76+
```
77+
78+
## Version Management
79+
80+
Before deploying:
81+
82+
1. Update version in `src/interactive_sort/__init__.py`
83+
2. Update version in `pyproject.toml` (should match)
84+
3. Create a git tag:
85+
```bash
86+
git tag v1.0.0
87+
git push origin v1.0.0
88+
```
89+
90+
## Commands Available After Installation
91+
92+
The package provides two equivalent commands:
93+
- `interactive-sort` - Full command name
94+
- `is` - Short alias for convenience
95+
96+
Both commands have identical functionality and options.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ keywords = ["sorting", "interactive", "text", "command-line", "utility"]
3434

3535
[project.scripts]
3636
interactive-sort = "interactive_sort.main:main"
37+
is = "interactive_sort.main:main"
3738

3839
[tool.setuptools.packages.find]
3940
where = ["src"]

0 commit comments

Comments
 (0)