Release Management Guide for datason¶
๐ท๏ธ Overview¶
datason uses a comprehensive release management system with automated workflows, semantic versioning, and strict quality controls. This guide covers the entire process from development to release.
๐ Table of Contents¶
- Branch Strategy
- Version Management
- Pull Request Workflow
- Release Process
- Automation Features
- Troubleshooting
๐ฒ Branch Strategy¶
Main Branch (main
)¶
- Purpose: Production-ready code
- Protection: Fully protected, requires PRs
- CI/CD: Full pipeline runs on every push
- Deploy: Triggers documentation updates
Feature Branches¶
- Naming:
feature/description
,fix/issue-number
,docs/update-name
- Lifecycle: Created โ PR โ Review โ Merge โ Delete
- Requirements: Must pass all CI checks
Branch Protection Rules¶
Required status checks:
โ
๐ Code Quality & Security
โ
๐งช CI / test (ubuntu-latest, 3.11)
โ
๐ Build Documentation
Restrictions:
โ
Require PR reviews (1 minimum)
โ
Dismiss stale reviews
โ
Require conversation resolution
โ
Include administrators
โ
Linear history preferred
๐ฆ Version Management¶
Semantic Versioning¶
datason follows Semantic Versioning 2.0.0:
v{MAJOR}.{MINOR}.{PATCH}[-{PRERELEASE}]
Examples:
โ
v0.1.0 - Initial release
โ
v0.1.1 - Patch release (bug fixes)
โ
v0.2.0 - Minor release (new features)
โ
v1.0.0 - Major release (breaking changes)
โ
v1.0.0-rc.1 - Release candidate
โ
v1.0.0-beta.2 - Beta release
Version Increment Guidelines¶
Change Type | Version | Example |
---|---|---|
๐ Bug fixes | PATCH | v0.1.0 โ v0.1.1 |
โจ New features | MINOR | v0.1.1 โ v0.2.0 |
๐ฅ Breaking changes | MAJOR | v0.2.0 โ v1.0.0 |
๐งช Pre-releases | PRERELEASE | v1.0.0-beta.1 |
Release Schedule¶
- Patch releases: Weekly (bug fixes, docs)
- Minor releases: Monthly (new features)
- Major releases: Quarterly (breaking changes)
- Security releases: As needed (critical fixes)
๐ Pull Request Workflow¶
Creating a PR¶
-
Create feature branch:
-
Follow PR template: Our template guides you through all requirements
-
Ensure quality:
PR Requirements¶
Automatic Checks¶
- โ Quality Pipeline: Ruff linting, formatting, security scanning
- โ CI Pipeline: Tests across Python 3.8-3.13, coverage analysis
- โ Documentation: MkDocs builds successfully
- โ Pre-commit: All hooks pass
Manual Review Checklist¶
- โ Code follows project guidelines
- โ Tests added for new functionality
- โ Documentation updated
- โ CHANGELOG.md updated
- โ Backward compatibility maintained
- โ Performance impact assessed
Auto-merge Eligibility¶
โ
Automatically merged when:
- All CI checks pass
- PR has auto-merge
label
- Minor/patch dependency updates
- Documentation-only changes
- Non-breaking CI improvements
โ Manual review required for: - Breaking changes - Major version updates - Core functionality changes - Security-related changes
PR Labels System¶
Type Labels¶
bug
- Bug fixesenhancement
- New featuresdocumentation
- Documentation updatessecurity
- Security improvementsperformance
- Performance optimizations
Priority Labels¶
priority:critical
- Immediate attention requiredpriority:high
- High prioritypriority:medium
- Medium prioritypriority:low
- Low priority
Status Labels¶
status:needs-review
- Awaiting code reviewstatus:ready-to-merge
- Approved and readyauto-merge
- Auto-merge when checks pass
Component Labels¶
component:core
- Core serializationcomponent:ml
- ML integrationscomponent:docs
- Documentationcomponent:ci
- CI/CD changes
๐ Release Process¶
Automated Release Workflow¶
Method 1: Tag-based Release¶
# Create and push tag
git tag v0.1.2
git push origin v0.1.2
# This triggers:
# 1. โ
Version validation
# 2. ๐ Changelog generation
# 3. ๐ท๏ธ GitHub release creation
# 4. ๐ฆ PyPI publication
Method 2: Manual Release¶
Method 3: GitHub UI¶
- Go to Actions โ ๐ท๏ธ Release Management
- Click Run workflow
- Enter version (e.g.,
v0.1.2
) - Select if pre-release
- Click Run workflow
Release Checklist¶
Pre-release¶
- All tests pass on main branch
- Documentation is up to date
- CHANGELOG.md reflects all changes
- Version number follows semantic versioning
- Breaking changes are documented
During Release¶
- Automated release workflow completes
- GitHub release is created with notes
- PyPI package is published successfully
- Documentation is updated
Post-release¶
- Release announcement (if major/minor)
- Social media updates (if significant)
- Community discussions created
- Monitor for issues
Release Notes Format¶
Our automated system generates release notes like:
## ๐ What's New in v0.1.2
- โจ Added support for TensorFlow 2.15
- ๐ Fixed circular reference detection
- ๐ Updated API documentation
- โก Improved serialization performance by 15%
## ๐ฆ Installation
pip install datason==v0.1.2
## ๐ Links
- ๐ Documentation: https://datason.readthedocs.io
- ๐ Issues: https://github.com/danielendler/datason/issues
- ๐ฌ Discussions: https://github.com/danielendler/datason/discussions
๐ค Automation Features¶
Dependabot Integration¶
- Weekly dev dependency updates (pytest, ruff, mypy)
- Monthly core dependency updates (pandas, numpy)
- Conservative ML library updates (manual review required)
- Automatic labeling and categorization
Auto-merge Criteria¶
Automatically merged:
โ
Dependabot minor/patch updates
โ
Documentation-only changes
โ
CI configuration improvements
โ
Test additions/improvements
โ
Code formatting changes
Manual review required:
โ Major version updates
โ Breaking changes
โ Core functionality changes
โ Security-related changes
Quality Gates¶
Every PR must pass: 1. ๐ Code Quality: Ruff linting, formatting, security scanning 2. ๐งช Testing: All tests across Python 3.8-3.13 3. ๐ Coverage: Maintain 80%+ code coverage 4. ๐ Documentation: MkDocs builds without errors 5. ๐ Security: No high/medium severity issues
๐ ๏ธ Setup Instructions¶
For Repository Administrators¶
-
Set up branch protection:
-
Configure repository settings:
- Enable Discussions
- Set up security alerts
-
Configure merge options (squash preferred)
-
Set up secrets (for PyPI publishing):
For Contributors¶
-
Install development dependencies:
-
Configure Git:
-
Follow the workflow:
- Create feature branch
- Make changes
- Run tests locally
- Create PR using template
- Address review feedback
๐ง Troubleshooting¶
Common Issues¶
PR Auto-merge Not Working¶
# Check if PR has auto-merge label
gh pr view --json labels
# Check CI status
gh pr checks
# Manually trigger auto-merge
gh pr merge --auto --squash
Release Failed to Publish¶
# Check workflow status
gh run list --workflow=release.yml
# View specific run logs
gh run view <run-id>
# Manual PyPI publish (if needed)
python -m build
twine upload dist/*
Version Tag Issues¶
# List existing tags
git tag -l
# Delete incorrect tag (locally and remote)
git tag -d v0.1.2
git push origin :refs/tags/v0.1.2
# Create correct tag
git tag v0.1.2
git push origin v0.1.2
Emergency Procedures¶
Hotfix Release¶
# Create hotfix branch from main
git checkout main
git pull origin main
git checkout -b hotfix/critical-fix
# Make minimal fix
# Test thoroughly
# Create PR with priority:critical label
# Emergency merge after review
# Tag and release immediately
Rollback Release¶
# Mark GitHub release as pre-release
gh release edit v0.1.2 --prerelease
# Yank from PyPI if needed (contact maintainers)
# Create fixed version immediately
๐ Additional Resources¶
- Contributing Guide
- CI/CD Pipeline Guide
- CI Performance Optimization
- Pipeline Audit Report
- Plugin Testing Strategy
- Tooling Guide
- Dependabot Setup
- GitHub Pages Setup
- Security Policy
- GitHub Flow Documentation
- Semantic Versioning Specification
๐ก Questions? Create a discussion or check existing issues.