Semantic Versioning
Version numbers follow the formatMAJOR.MINOR.PATCH:
Version Types
Patch
0.3.1 → 0.3.2
- Bug fixes
- Documentation updates
- Performance improvements
- Internal refactoring
- No breaking changes
- No new features
Minor
0.3.1 → 0.4.0
- New features
- New functionality
- Backward compatible
- Deprecations (with warnings)
- No breaking changes
Major
0.3.1 → 1.0.0
- Breaking changes
- API changes
- Removed deprecated features
- Not backward compatible
- Significant architectural changes
Version Bumping
Use thejust bump command to increment versions:
What Happens During a Version Bump
When you runjust bump <type>, the following occurs:
Commitizen updates version
Uses Commitizen to:
- Calculate the new version number
- Update version in all configured files
- Create a git commit with the version change
- Create a git tag (e.g.,
v0.5.1)
Lock file updates
- Updates main project’s
uv.lockfile - Updates notebook
pyproject.tomldependency versions - Amends changes into the version bump commit
Version Files
Version numbers are automatically updated in these files:pyproject.toml
pyproject.toml
Main project version:
src/syft_flwr/__init__.py
src/syft_flwr/__init__.py
Package
__version__ variable:notebooks/*/pyproject.toml
notebooks/*/pyproject.toml
Notebook dependencies:
Conventional Commits
Syft-Flwr uses Conventional Commits for commit messages. This enables automated version bumping and changelog generation.Commit Message Format
Commit Types
feat
New featureTriggers: MINOR version bump
fix
Bug fixTriggers: PATCH version bump
docs
DocumentationNo version bump
refactor
Code refactoringNo version bump
test
TestsNo version bump
chore
MaintenanceNo version bump
perf
PerformanceTriggers: PATCH version bump
build
Build systemNo version bump
Breaking Changes
Breaking changes trigger a MAJOR version bump:Examples
Feature with scope
Feature with scope
Bug fix with issue reference
Bug fix with issue reference
Breaking change
Breaking change
Documentation update
Documentation update
Commitizen Configuration
Commitizen is configured inpyproject.toml:
pyproject.toml
Configuration Options
name: Uses conventional commits specificationversion_provider: Reads version frompyproject.toml(PEP 621)tag_format: Creates git tags likev0.5.0update_changelog_on_bump: Disabled (can be enabled for automated changelogs)version_files: List of files to update during version bump
Pre-release Versions
For alpha, beta, or release candidate versions:Pre-release versions are not currently automated. They require manual version editing and tagging.
Version History
View version history using git:Best Practices
When to bump versions
When to bump versions
- Patch: Bug fixes, documentation updates, performance improvements
- Minor: New features that don’t break existing code
- Major: Breaking changes, API redesigns, removed features
Commit message guidelines
Commit message guidelines
- Use present tense: “add feature” not “added feature”
- Be concise but descriptive
- Reference issues when applicable: “Fixes #123”
- Add body for complex changes
- Always mark breaking changes clearly
Release timing
Release timing
- Don’t release too frequently (batch related changes)
- Don’t wait too long (get fixes out quickly)
- Consider impact on downstream users
- Coordinate major releases with documentation updates
Version zero (0.x.x)
Version zero (0.x.x)
During 0.x.x versions:
- Minor version bumps may include breaking changes
- API is not yet stable
- Major version 1.0.0 indicates stable API
Next Steps
- Learn the Release Process
- Understand Testing before releases
- Review Code Quality standards