deploy
Deploy dimtensor to PyPI. Use when releasing a new version.
When & Why to Use This Skill
This Claude skill automates the end-to-end deployment workflow for the dimtensor Python package to PyPI. It streamlines the release process by integrating pre-deployment quality checks, semantic versioning management, package building, and secure uploading, ensuring a consistent and error-free publication cycle.
Use Cases
- Automating Python Package Releases: Simplifies the multi-step process of publishing new versions to the Python Package Index (PyPI) using tools like build and twine.
- Enforcing Release Quality Gates: Automatically executes pytest and mypy checks before deployment to ensure only stable, tested code reaches production.
- Synchronized Version Management: Updates version strings across multiple project files (pyproject.toml and __init__.py) simultaneously to maintain consistency and prevent version mismatch.
- Post-Deployment Documentation & Git Sync: Handles the updates of CHANGELOG.md and CONTINUITY.md, performs git commits, and pushes releases to the main repository to keep the development history aligned.
| name | deploy |
|---|---|
| description | Deploy dimtensor to PyPI. Use when releasing a new version. |
| allowed-tools | Read, Edit, Bash |
Deploy Skill
Steps to deploy a new dimtensor version to PyPI.
Pre-Deploy Checklist
- All tests pass:
pytest - mypy passes:
mypy src/dimtensor --ignore-missing-imports - CHANGELOG.md updated with version changes
- README.md updated if needed
Version Update
Update version in BOTH locations:
pyproject.toml(line ~7):
version = "X.Y.Z"
src/dimtensor/__init__.py(line ~35):
__version__ = "X.Y.Z"
Deploy Commands
# Working directory
cd "/Users/marcsperzel/Local Documents/Projects/Packages/dimtensor"
# Clean previous builds
rm -rf dist/ build/
# Build
python -m build
# Upload to PyPI
twine upload dist/*
Post-Deploy
Update CONTINUITY.md:
- Mark deploy task as DONE
- Add session log entry with PyPI URL
- Update CURRENT STATE version
Git commit:
git add -A
git commit -m "Release vX.Y.Z: Description"
git push origin main
- Verify on PyPI:
Version Numbering
- X.Y.Z (SemVer)
- X: Major breaking changes
- Y: New features (backward compatible)
- Z: Bug fixes, patches
Troubleshooting
twine upload fails: Check ~/.pypirc credentials
Build fails: Ensure build dependencies: pip install build twine