This document describes the versioning strategy and processes for the ZipTax Python SDK.
The ZipTax Python SDK follows Semantic Versioning 2.0.0 with pre-release labels for beta versions.
MAJOR.MINOR.PATCH[-PRERELEASE]
Examples:
1.0.0 # Stable release
0.1.4-beta # Beta pre-release
2.1.0-rc1 # Release candidate
- MAJOR: Incremented for breaking changes
- MINOR: Incremented for new features (backward compatible)
- PATCH: Incremented for bug fixes (backward compatible)
- PRERELEASE: Optional label like
beta,alpha,rc1
Bump the major version when making breaking changes:
- Removing public APIs or functions
- Changing function signatures in non-backward-compatible ways
- Changing response model structures
- Removing or renaming model fields
- Changing default behavior that breaks existing code
Example: Removing GetSalesTaxByAddress() or changing its required parameters.
Bump the minor version when adding new features:
- Adding new API endpoints
- Adding new optional parameters
- Adding new models or fields (backward compatible)
- Adding new exception types
- Enhancing existing features without breaking changes
Example: Adding TaxCloud order management features (0.1.3 → 0.2.0).
Bump the patch version for bug fixes and minor improvements:
- Fixing bugs in existing functionality
- Improving error messages
- Documentation updates
- Performance improvements
- Dependency updates (non-breaking)
Example: Fixing a validation bug (0.1.4 → 0.1.5).
Use pre-release labels for unstable versions:
- alpha: Early testing, features incomplete or unstable
- beta: Feature complete, but may have bugs
- rc1, rc2, ...: Release candidates, nearly ready for production
Examples:
0.2.0-alpha→0.2.0-beta→0.2.0-rc1→0.2.0
We provide a helper script to maintain version consistency across all files.
python scripts/bump_version.py --checkOutput:
📋 Version Check:
pyproject.toml: 0.1.4-beta
__init__.py: 0.1.4-beta
CLAUDE.md: 0.1.4-beta
✅ All versions match!
For bug fixes and minor improvements:
python scripts/bump_version.py patchOutput:
🔄 Version Bump: 0.1.4-beta → 0.1.5-beta
✅ Updated pyproject.toml
✅ Updated src/ziptax/__init__.py
✅ Updated CLAUDE.md
📋 Version Check:
pyproject.toml: 0.1.5-beta
__init__.py: 0.1.5-beta
CLAUDE.md: 0.1.5-beta
✅ All versions match!
✨ Version bump complete!
📝 Next steps:
1. Update CHANGELOG.md with your changes
2. Commit changes: git add -A && git commit -m 'Bump version to 0.1.5-beta'
3. Create PR with version bump
For new features:
python scripts/bump_version.py minorThis will bump 0.1.4-beta → 0.2.0-beta
For breaking changes:
python scripts/bump_version.py majorThis will bump 0.1.4-beta → 1.0.0-beta
python scripts/bump_version.py 1.0.0
python scripts/bump_version.py 0.2.0-betaPreview changes without modifying files:
python scripts/bump_version.py patch --dry-runIf you prefer to update versions manually, ensure consistency across these files:
-
pyproject.toml (line 7):
version = "0.1.5-beta"
-
src/ziptax/init.py (line 47):
__version__ = "0.1.5-beta"
-
CLAUDE.md (near end):
**SDK Version**: 0.1.5-beta
-
CHANGELOG.md: Update the
[Unreleased]section with your changes.
Every pull request triggers the Version Bump Check workflow (.github/workflows/version-check.yml) which:
- ✅ Verifies version was bumped compared to base branch
- ✅ Checks version consistency across all files
- ✅ Validates semantic versioning format (PEP 440)
⚠️ Warns if CHANGELOG.md wasn't updated- 💬 Posts a comment on the PR with version info
┌─────────────────────────────────────────┐
│ Pull Request #123 │
├─────────────────────────────────────────┤
│ Base: main (0.1.4-beta) │
│ PR: feature-branch (0.1.5-beta) │
└─────────────────────────────────────────┘
│
▼
┌──────────────────┐
│ Version Checks │
└──────────────────┘
│
┌─────────┴─────────┐
▼ ▼
┌─────────┐ ┌──────────┐
│ Bumped? │ │Consistent?│
│ 0.1.4 │ │pyproject │
│ → │ │__init__ │
│ 0.1.5 │ │CLAUDE.md │
└─────────┘ └──────────┘
│ │
└─────────┬─────────┘
▼
┌──────────────┐
│ Valid Format?│
│ PEP 440 │
└──────────────┘
│
▼
┌──────────────┐
│CHANGELOG.md? │
│ (warning) │
└──────────────┘
│
▼
┌──────────────┐
│ PR Comment │
│ with info │
└──────────────┘
The workflow posts this comment on your PR:
## Version Bump Check
| Item | Status |
|------|--------|
| Base version | `0.1.4-beta` |
| PR version | `0.1.5-beta` |
| Version bumped | ✅ Yes |
| Version consistent | ✅ Yes |
| CHANGELOG updated | ⚠️ No |
> ⚠️ **Reminder**: Please update CHANGELOG.md with your changes.
---
Version bump: `0.1.4-beta` → `0.1.5-beta`If the version check fails, the workflow will:
- ❌ Fail the PR check
- 💬 Comment explaining the issue
- 🚫 Block merging (if branch protection is enabled)
Common failure scenarios:
-
Version not bumped:
❌ ERROR: Version not bumped! Current version (0.1.4-beta) must be greater than base version (0.1.4-beta) -
Version mismatch:
❌ ERROR: Version mismatch! pyproject.toml has 0.1.5-beta __init__.py has 0.1.4-beta Both files must have the same version. -
Invalid format:
❌ ERROR: Invalid version format: 0.1.beta Error: Invalid version: '0.1.beta'
-
Create feature branch:
git checkout -b feature/new-feature
-
Implement changes and write tests
-
Bump version:
python scripts/bump_version.py minor # or patch/major -
Update CHANGELOG.md:
## [Unreleased] ### Added - New feature description
-
Commit and push:
git add -A git commit -m "feat: Add new feature Bump version to 0.2.0-beta" git push origin feature/new-feature
-
Create Pull Request
- Automated checks will validate version bump
- Review and merge when approved
-
Tag the release (after merge):
git checkout main git pull origin main git tag v0.2.0-beta git push origin v0.2.0-beta
-
Remove pre-release label:
python scripts/bump_version.py 1.0.0
-
Update CHANGELOG.md:
## [1.0.0] - 2024-03-01 ### Added - Feature A - Feature B ### Changed - Improvement X
-
Create release PR:
git checkout -b release/v1.0.0 git add -A git commit -m "chore: Release v1.0.0" git push origin release/v1.0.0 -
Merge and tag:
git checkout main git pull origin main git tag v1.0.0 git push origin v1.0.0
-
Publish to PyPI:
python -m build python -m twine upload dist/*
- Always bump version for every PR that changes code
- Use the helper script to maintain consistency
- Update CHANGELOG.md with clear descriptions
- Follow semantic versioning rules strictly
- Test thoroughly before releasing
- Tag releases in git with
vX.Y.Zformat
- Don't merge PRs without version bumps
- Don't update versions manually without checking consistency
- Don't skip CHANGELOG updates
- Don't use arbitrary version numbers
- Don't make breaking changes in patch versions
- Don't release without testing
A: The GitHub Actions workflow will fail and block the merge. Simply run the bump script and push the changes.
A: No. All PRs require version bumps to maintain a clear history. Use patch bumps for documentation-only changes.
A:
- Rebase your branch on latest main
- Run
python scripts/bump_version.py --checkto see current version - Bump to the next version
- Commit and push
A: Remove pre-release labels when:
- All planned features are complete
- Test coverage is ≥80%
- No critical bugs exist
- Documentation is complete
- The release is stable enough for production use
A: This is rare, but if it happens:
- Check that all three files have the same version
- Verify the version format is valid (X.Y.Z or X.Y.Z-label)
- Ensure the PR version is greater than the base branch version
- If still failing, check the workflow logs for details
Questions? Open an issue or contact the maintainers.