diffron 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- diffron/__init__.py +26 -0
- diffron/__init__.pyi +28 -0
- diffron/cli.py +347 -0
- diffron/cli.pyi +30 -0
- diffron/client.py +175 -0
- diffron/client.pyi +80 -0
- diffron/commit_gen.py +151 -0
- diffron/commit_gen.pyi +41 -0
- diffron/git_hooks.py +292 -0
- diffron/git_hooks.pyi +52 -0
- diffron/lemonade.py +192 -0
- diffron/lemonade.pyi +66 -0
- diffron/pr_gen.py +224 -0
- diffron/pr_gen.pyi +56 -0
- diffron/py.typed +0 -0
- diffron/utils.py +236 -0
- diffron/utils.pyi +58 -0
- diffron-0.1.0.dist-info/METADATA +373 -0
- diffron-0.1.0.dist-info/RECORD +28 -0
- diffron-0.1.0.dist-info/WHEEL +5 -0
- diffron-0.1.0.dist-info/entry_points.txt +5 -0
- diffron-0.1.0.dist-info/licenses/LICENSE +21 -0
- diffron-0.1.0.dist-info/top_level.txt +2 -0
- docs/HOOKS.md +442 -0
- docs/PLAN.md +378 -0
- docs/PYPI_RELEASE.md +487 -0
- docs/SETUP.md +524 -0
- docs/USAGE.md +515 -0
docs/PYPI_RELEASE.md
ADDED
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
# PyPI Release Checklist
|
|
2
|
+
|
|
3
|
+
Complete guide for publishing Diffron to PyPI as an open source package.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
1. [Pre-Release Preparation](#pre-release-preparation)
|
|
10
|
+
2. [Build Package](#build-package)
|
|
11
|
+
3. [TestPyPI Upload](#testpypi-upload)
|
|
12
|
+
4. [Final Verification](#final-verification)
|
|
13
|
+
5. [PyPI Upload](#pypi-upload)
|
|
14
|
+
6. [Post-Release](#post-release)
|
|
15
|
+
7. [GitHub Release](#github-release)
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Pre-Release Preparation
|
|
20
|
+
|
|
21
|
+
### 1. Update Version Number
|
|
22
|
+
|
|
23
|
+
**Files to update:**
|
|
24
|
+
|
|
25
|
+
- `diffron/__init__.py`
|
|
26
|
+
- `setup.py`
|
|
27
|
+
- `pyproject.toml`
|
|
28
|
+
- `docs/SETUP.md` (version badges)
|
|
29
|
+
- `README.md` (version badges)
|
|
30
|
+
|
|
31
|
+
**Version format:** `MAJOR.MINOR.PATCH` (e.g., `0.1.0`)
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
# diffron/__init__.py
|
|
35
|
+
__version__ = "0.1.0"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 2. Update CHANGELOG.md
|
|
39
|
+
|
|
40
|
+
Document all changes since last release:
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
## [0.1.0] - 2026-03-28
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
- Initial release
|
|
47
|
+
- Lemonade integration with auto-detection
|
|
48
|
+
- Git hooks for automatic commit message generation
|
|
49
|
+
- PR description generator
|
|
50
|
+
- CLI commands
|
|
51
|
+
- Python API
|
|
52
|
+
- Windows support for GitHub Desktop 3.5.5+
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 3. Verify Requirements
|
|
56
|
+
|
|
57
|
+
**Check `requirements.txt`:**
|
|
58
|
+
```
|
|
59
|
+
openai>=1.0.0
|
|
60
|
+
psutil>=5.9.0
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Check `setup.py` classifiers:**
|
|
64
|
+
```python
|
|
65
|
+
classifiers=[
|
|
66
|
+
"Development Status :: 3 - Alpha",
|
|
67
|
+
"License :: OSI Approved :: MIT License",
|
|
68
|
+
"Programming Language :: Python :: 3",
|
|
69
|
+
"Programming Language :: Python :: 3.9",
|
|
70
|
+
"Programming Language :: Python :: 3.10",
|
|
71
|
+
"Programming Language :: Python :: 3.11",
|
|
72
|
+
"Programming Language :: Python :: 3.12",
|
|
73
|
+
]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 4. Run Tests
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Install test dependencies
|
|
80
|
+
pip install -e ".[dev]"
|
|
81
|
+
|
|
82
|
+
# Run all tests
|
|
83
|
+
pytest tests/ -v --cov=diffron
|
|
84
|
+
|
|
85
|
+
# Check coverage (target: >80%)
|
|
86
|
+
pytest --cov-report=html
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 5. Code Quality Checks
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Type checking
|
|
93
|
+
mypy diffron/
|
|
94
|
+
|
|
95
|
+
# Code formatting
|
|
96
|
+
black diffron/ tests/
|
|
97
|
+
|
|
98
|
+
# Import sorting
|
|
99
|
+
isort diffron/ tests/
|
|
100
|
+
|
|
101
|
+
# Linting (if configured)
|
|
102
|
+
flake8 diffron/
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 6. Verify Documentation
|
|
106
|
+
|
|
107
|
+
- [ ] README.md is complete and accurate
|
|
108
|
+
- [ ] SETUP.md has working instructions
|
|
109
|
+
- [ ] HOOKS.md explains architecture
|
|
110
|
+
- [ ] USAGE.md has examples
|
|
111
|
+
- [ ] All links work
|
|
112
|
+
- [ ] Code examples are tested
|
|
113
|
+
|
|
114
|
+
### 7. Clean Build Artifacts
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Remove old builds
|
|
118
|
+
rmdir /s /q build
|
|
119
|
+
rmdir /s /q dist
|
|
120
|
+
rmdir /s /q *.egg-info
|
|
121
|
+
|
|
122
|
+
# Clean Python cache
|
|
123
|
+
del /s /q *.pyc
|
|
124
|
+
rmdir /s /q __pycache__
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Build Package
|
|
130
|
+
|
|
131
|
+
### Install Build Tools
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
pip install build twine
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Create Distribution Packages
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# Build source distribution and wheel
|
|
141
|
+
python -m build
|
|
142
|
+
|
|
143
|
+
# Verify output
|
|
144
|
+
dir dist
|
|
145
|
+
# Should show:
|
|
146
|
+
# - diffron-0.1.0.tar.gz
|
|
147
|
+
# - diffron-0.1.0-py3-none-any.whl
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Inspect Package Metadata
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Check wheel contents
|
|
154
|
+
tar -tzf dist/diffron-0.1.0.tar.gz
|
|
155
|
+
|
|
156
|
+
# Verify metadata
|
|
157
|
+
twine check dist/*
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Expected output:
|
|
161
|
+
```
|
|
162
|
+
Checking dist/diffron-0.1.0.tar.gz: PASSED
|
|
163
|
+
Checking dist/diffron-0.1.0-py3-none-any.whl: PASSED
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## TestPyPI Upload
|
|
169
|
+
|
|
170
|
+
### Create TestPyPI Account
|
|
171
|
+
|
|
172
|
+
1. Go to https://test.pypi.org/account/register/
|
|
173
|
+
2. Create account
|
|
174
|
+
3. Verify email
|
|
175
|
+
|
|
176
|
+
### Generate API Token
|
|
177
|
+
|
|
178
|
+
1. Go to https://test.pypi.org/manage/account/token/
|
|
179
|
+
2. Create new API token
|
|
180
|
+
3. Copy token (starts with `pypi-`)
|
|
181
|
+
|
|
182
|
+
### Configure Twine
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
# Create/edit .pypirc in home directory
|
|
186
|
+
notepad %USERPROFILE%\.pypirc
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Content:**
|
|
190
|
+
```ini
|
|
191
|
+
[distutils]
|
|
192
|
+
index-servers =
|
|
193
|
+
testpypi
|
|
194
|
+
pypi
|
|
195
|
+
|
|
196
|
+
[testpypi]
|
|
197
|
+
repository = https://test.pypi.org/legacy/
|
|
198
|
+
username = __token__
|
|
199
|
+
password = pypi-<YOUR_TESTPYPI_TOKEN>
|
|
200
|
+
|
|
201
|
+
[pypi]
|
|
202
|
+
repository = https://upload.pypi.org/legacy/
|
|
203
|
+
username = __token__
|
|
204
|
+
password = pypi-<YOUR_PYPI_TOKEN>
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Upload to TestPyPI
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
twine upload --repository testpypi dist/*
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Enter your token when prompted.
|
|
214
|
+
|
|
215
|
+
### Test Installation from TestPyPI
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# Create fresh virtual environment
|
|
219
|
+
python -m venv test-env
|
|
220
|
+
test-env\Scripts\activate
|
|
221
|
+
|
|
222
|
+
# Install from TestPyPI
|
|
223
|
+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple diffron==0.1.0
|
|
224
|
+
|
|
225
|
+
# Verify installation
|
|
226
|
+
python -c "import diffron; print(diffron.__version__)"
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Test Functionality
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
# Test imports
|
|
233
|
+
python -c "from diffron import DiffronClient; print('OK')"
|
|
234
|
+
|
|
235
|
+
# Test Lemonade detection
|
|
236
|
+
python -c "from diffron import detect_lemonade_port; print(detect_lemonade_port())"
|
|
237
|
+
|
|
238
|
+
# Test hooks installation
|
|
239
|
+
python -c "from diffron.git_hooks import install_hooks; print('OK')"
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Final Verification
|
|
245
|
+
|
|
246
|
+
### Pre-Upload Checklist
|
|
247
|
+
|
|
248
|
+
- [ ] All tests pass
|
|
249
|
+
- [ ] Code quality checks pass
|
|
250
|
+
- [ ] Documentation is complete
|
|
251
|
+
- [ ] Version number is correct
|
|
252
|
+
- [ ] CHANGELOG.md is updated
|
|
253
|
+
- [ ] TestPyPI upload successful
|
|
254
|
+
- [ ] TestPyPI installation works
|
|
255
|
+
- [ ] All features tested
|
|
256
|
+
|
|
257
|
+
### Repository Cleanup
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Remove test artifacts
|
|
261
|
+
rmdir /s /q test-env
|
|
262
|
+
|
|
263
|
+
# Clean build directory (keep dist for PyPI upload)
|
|
264
|
+
rmdir /s /q build
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## PyPI Upload
|
|
270
|
+
|
|
271
|
+
### Create PyPI Account
|
|
272
|
+
|
|
273
|
+
1. Go to https://pypi.org/account/register/
|
|
274
|
+
2. Create account
|
|
275
|
+
3. Verify email
|
|
276
|
+
|
|
277
|
+
### Generate API Token
|
|
278
|
+
|
|
279
|
+
1. Go to https://pypi.org/manage/account/token/
|
|
280
|
+
2. Create new API token
|
|
281
|
+
3. Copy token (starts with `pypi-`)
|
|
282
|
+
|
|
283
|
+
### Update .pypirc
|
|
284
|
+
|
|
285
|
+
Add your PyPI token to `%USERPROFILE%\.pypirc`:
|
|
286
|
+
|
|
287
|
+
```ini
|
|
288
|
+
[pypi]
|
|
289
|
+
repository = https://upload.pypi.org/legacy/
|
|
290
|
+
username = __token__
|
|
291
|
+
password = pypi-<YOUR_PYPI_TOKEN>
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### Upload to PyPI
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
twine upload dist/*
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Enter your token when prompted.
|
|
301
|
+
|
|
302
|
+
### Verify Upload
|
|
303
|
+
|
|
304
|
+
1. Go to https://pypi.org/project/diffron/
|
|
305
|
+
2. Check package page
|
|
306
|
+
3. Verify version, description, links
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Post-Release
|
|
311
|
+
|
|
312
|
+
### Update GitHub Repository
|
|
313
|
+
|
|
314
|
+
1. **Push latest code:**
|
|
315
|
+
```bash
|
|
316
|
+
git add .
|
|
317
|
+
git commit -m "chore: release v0.1.0"
|
|
318
|
+
git tag v0.1.0
|
|
319
|
+
git push origin master --tags
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
2. **Update repository description:**
|
|
323
|
+
- Add PyPI badge to README
|
|
324
|
+
- Add installation instructions
|
|
325
|
+
|
|
326
|
+
### Announce Release
|
|
327
|
+
|
|
328
|
+
1. **GitHub Discussions:**
|
|
329
|
+
- Create release announcement
|
|
330
|
+
- Tag contributors
|
|
331
|
+
|
|
332
|
+
2. **Social Media:**
|
|
333
|
+
- Twitter/X
|
|
334
|
+
- LinkedIn
|
|
335
|
+
- Relevant subreddits (r/Python, r/MachineLearning)
|
|
336
|
+
|
|
337
|
+
3. **Community:**
|
|
338
|
+
- Python Discord
|
|
339
|
+
- Lemonade community channels
|
|
340
|
+
|
|
341
|
+
### Monitor Package
|
|
342
|
+
|
|
343
|
+
- Watch PyPI download stats: https://pypistats.org/packages/diffron
|
|
344
|
+
- Monitor GitHub issues
|
|
345
|
+
- Respond to user feedback
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## GitHub Release
|
|
350
|
+
|
|
351
|
+
### Create Release on GitHub
|
|
352
|
+
|
|
353
|
+
1. Go to https://github.com/diffron/diffron/releases
|
|
354
|
+
2. Click "Create a new release"
|
|
355
|
+
3. Tag version: `v0.1.0`
|
|
356
|
+
4. Release title: `Diffron v0.1.0`
|
|
357
|
+
5. Description: Copy from CHANGELOG.md
|
|
358
|
+
6. Click "Publish release"
|
|
359
|
+
|
|
360
|
+
### Release Template
|
|
361
|
+
|
|
362
|
+
```markdown
|
|
363
|
+
## Diffron v0.1.0
|
|
364
|
+
|
|
365
|
+
Initial release of Diffron - AI-powered Git automation with Lemonade.
|
|
366
|
+
|
|
367
|
+
### Features
|
|
368
|
+
|
|
369
|
+
- 🤖 Automatic commit message generation
|
|
370
|
+
- 📝 PR description generator
|
|
371
|
+
- 🔌 Lemonade integration (auto-detection)
|
|
372
|
+
- 🪟 Windows support (GitHub Desktop 3.5.5+)
|
|
373
|
+
- ⚡ Conventional Commits format
|
|
374
|
+
|
|
375
|
+
### Installation
|
|
376
|
+
|
|
377
|
+
```bash
|
|
378
|
+
pip install diffron
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### Quick Start
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
# Install hooks
|
|
385
|
+
python -c "from diffron.git_hooks import install_hooks; install_hooks(global_install=True)"
|
|
386
|
+
|
|
387
|
+
# Commit with AI-generated messages
|
|
388
|
+
git commit -m "auto"
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Documentation
|
|
392
|
+
|
|
393
|
+
- [Setup Guide](https://github.com/diffron/diffron/blob/main/docs/SETUP.md)
|
|
394
|
+
- [Usage Guide](https://github.com/diffron/diffron/blob/main/docs/USAGE.md)
|
|
395
|
+
- [Hooks Architecture](https://github.com/diffron/diffron/blob/main/docs/HOOKS.md)
|
|
396
|
+
|
|
397
|
+
### Contributors
|
|
398
|
+
|
|
399
|
+
Thanks to all contributors!
|
|
400
|
+
|
|
401
|
+
### License
|
|
402
|
+
|
|
403
|
+
MIT License
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## Future Releases
|
|
409
|
+
|
|
410
|
+
### Version Bumping
|
|
411
|
+
|
|
412
|
+
```bash
|
|
413
|
+
# Patch release (bug fixes)
|
|
414
|
+
0.1.0 → 0.1.1
|
|
415
|
+
|
|
416
|
+
# Minor release (new features, backward compatible)
|
|
417
|
+
0.1.0 → 0.2.0
|
|
418
|
+
|
|
419
|
+
# Major release (breaking changes)
|
|
420
|
+
0.1.0 → 1.0.0
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### Release Workflow
|
|
424
|
+
|
|
425
|
+
For each release:
|
|
426
|
+
|
|
427
|
+
1. Update version in all files
|
|
428
|
+
2. Update CHANGELOG.md
|
|
429
|
+
3. Run tests
|
|
430
|
+
4. Build package
|
|
431
|
+
5. Upload to TestPyPI
|
|
432
|
+
6. Test installation
|
|
433
|
+
7. Upload to PyPI
|
|
434
|
+
8. Create GitHub release
|
|
435
|
+
9. Announce release
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## Troubleshooting
|
|
440
|
+
|
|
441
|
+
### Upload Fails: "File already exists"
|
|
442
|
+
|
|
443
|
+
**Solution:** Bump version number and rebuild.
|
|
444
|
+
|
|
445
|
+
```bash
|
|
446
|
+
# Update version
|
|
447
|
+
# Edit __init__.py, setup.py, pyproject.toml
|
|
448
|
+
|
|
449
|
+
# Rebuild
|
|
450
|
+
rmdir /s /q build dist
|
|
451
|
+
python -m build
|
|
452
|
+
|
|
453
|
+
# Upload again
|
|
454
|
+
twine upload dist/*
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
### Metadata Validation Fails
|
|
458
|
+
|
|
459
|
+
**Solution:** Check `twine check` output for specific errors.
|
|
460
|
+
|
|
461
|
+
Common issues:
|
|
462
|
+
- Missing required fields in `setup.py`
|
|
463
|
+
- Invalid classifier values
|
|
464
|
+
- Malformed long_description
|
|
465
|
+
|
|
466
|
+
### Installation Test Fails
|
|
467
|
+
|
|
468
|
+
**Solution:** Ensure all dependencies are on PyPI.
|
|
469
|
+
|
|
470
|
+
```bash
|
|
471
|
+
# Check if dependencies are available
|
|
472
|
+
pip index versions <package-name>
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
## Resources
|
|
478
|
+
|
|
479
|
+
- [PyPI Documentation](https://packaging.python.org/)
|
|
480
|
+
- [TestPyPI](https://test.pypi.org/)
|
|
481
|
+
- [twine Documentation](https://twine.readthedocs.io/)
|
|
482
|
+
- [Semantic Versioning](https://semver.org/)
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
*Last updated: 2026-03-28*
|
|
487
|
+
*Version: 0.1.0*
|