Skip to content

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

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

  1. Create feature branch:

    git checkout -b feature/awesome-feature
    git push -u origin feature/awesome-feature
    

  2. Follow PR template: Our template guides you through all requirements

  3. Ensure quality:

    # Run locally before creating PR
    pre-commit run --all-files
    pytest --cov=datason
    mkdocs build --strict
    

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 fixes
  • enhancement - New features
  • documentation - Documentation updates
  • security - Security improvements
  • performance - Performance optimizations

Priority Labels

  • priority:critical - Immediate attention required
  • priority:high - High priority
  • priority:medium - Medium priority
  • priority:low - Low priority

Status Labels

  • status:needs-review - Awaiting code review
  • status:ready-to-merge - Approved and ready
  • auto-merge - Auto-merge when checks pass

Component Labels

  • component:core - Core serialization
  • component:ml - ML integrations
  • component:docs - Documentation
  • component: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

# Use GitHub CLI
gh workflow run release.yml \
  --field version=v0.1.2 \
  --field prerelease=false

Method 3: GitHub UI

  1. Go to Actions โ†’ ๐Ÿท๏ธ Release Management
  2. Click Run workflow
  3. Enter version (e.g., v0.1.2)
  4. Select if pre-release
  5. 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

  1. Set up branch protection:

    # Install GitHub CLI if needed
    gh auth login
    
    # Run our setup script
    python scripts/setup_github_labels.py
    

  2. Configure repository settings:

  3. Enable Discussions
  4. Set up security alerts
  5. Configure merge options (squash preferred)

  6. Set up secrets (for PyPI publishing):

    PYPI_API_TOKEN - PyPI API token for publishing
    

For Contributors

  1. Install development dependencies:

    pip install -e ".[dev]"
    pre-commit install
    

  2. Configure Git:

    git config --global user.name "Your Name"
    git config --global user.email "your.email@example.com"
    

  3. Follow the workflow:

  4. Create feature branch
  5. Make changes
  6. Run tests locally
  7. Create PR using template
  8. 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


๐Ÿ’ก Questions? Create a discussion or check existing issues.

Additional Documentation

Key Documentation

Critical Documentation Updates