iiegn's picture
Add RELEASE.md for framework version releases
ada57a8 verified

Framework Release Guide

This guide documents how to release a new framework version for the Universal Dependencies dataset (e.g., v2.0 → v2.1).

Important: This is different from adding a new UD data version (e.g., UD 2.17 → 2.18). For that, see ADDING_NEW_UD_VERSION.md.

Framework vs. Data Versioning

Framework Version (e.g., v2.0, v2.1):

  • The tooling, templates, and architecture used to generate datasets
  • Includes: generation scripts, templates, documentation, architecture decisions
  • Lives in: tools/, templates/, root documentation files
  • Applies to: All UD data versions (2.7, 2.8, ..., 2.17, 2.18, ...)

UD Data Version (e.g., 2.17, 2.18):

  • The actual Universal Dependencies linguistic data
  • Released by the UD project ~annually
  • Each gets its own git branch
  • Can use the latest framework version

Example: "UD 2.17 data using framework v2.0 architecture"

When to Release a New Framework Version

Use semantic versioning: MAJOR.MINOR.PATCH

Major Version (v2.0 → v3.0)

Breaking changes that require user code modifications:

  • Schema changes (adding/removing/renaming fields)
  • Changed data format (e.g., v1.x script loader → v2.0 Parquet)
  • Incompatible API changes
  • Removing deprecated features

Example: v1.x → v2.0 moved to Parquet format and removed Python script loader

Minor Version (v2.0 → v2.1)

New features that are backwards compatible:

  • New optional fields in schema
  • New tools or scripts
  • Enhanced functionality (e.g., better MWT handling)
  • Performance improvements
  • New documentation

Example: Adding empty_nodes field to schema while keeping all existing fields

Patch Version (v2.0.0 → v2.0.1)

Bug fixes that don't change functionality:

  • Fixing parsing errors
  • Correcting metadata extraction
  • Documentation typos
  • Template rendering issues
  • Validation improvements

Example: Fixing double-equals parsing in FEATS fields

Release Checklist

1. Decide Version Number

# Current version
CURRENT_VER="2.0.0"

# New version (update based on changes)
NEW_VER="2.1.0"  # or "2.0.1" for patch, "3.0.0" for major

Determine type:

  • Breaking changes? → Major
  • New features? → Minor
  • Bug fixes only? → Patch

2. Update Version Numbers

File: pyproject.toml

[project]
name = "universal-dependencies"
version = "2.1.0"  # Update this

File: MIGRATION.md (if major/minor) Update the version references in examples:

# Migration Guide: v2.0 → v2.1

This guide helps you migrate from v2.0 to v2.1...

3. Update CHANGELOG.md

Create entry for new version:

## [2.1.0] - 2026-01-XX

### Added
- New feature X
- Enhanced functionality Y

### Changed
- Improved Z

### Fixed
- Bug fix for A

### Removed
- Deprecated feature B (if major version)

For breaking changes (major version):

### Breaking Changes
- **Description**: Clear explanation
- **Impact**: Who is affected
- **Migration**: How to update code

4. Update Documentation

Files to review and update:

  • README.md (root) - Update version badges, examples
  • MIGRATION.md - Add new section if breaking changes
  • ADDING_NEW_UD_VERSION.md - Update if workflow changes
  • tools/README.md - Update if scripts change
  • templates/README.tmpl - Update if dataset card needs changes

Version-specific updates:

# Search for old version references
grep -r "v2\.0" --include="*.md"
grep -r "2\.0\.0" --include="*.md"

# Update as needed

5. Update Templates (if applicable)

If schema or architecture changed:

File: tools/templates/README.tmpl

  • Update schema documentation
  • Update code examples
  • Add new field descriptions

Test template rendering:

cd tools
./03_generate_README.py -o
# Review generated README-2.17 for correctness

6. Test Changes Thoroughly

Test on sample UD version (e.g., 2.17):

cd tools

# Test metadata generation
./02_generate_metadata.py -o

# Test README generation
./03_generate_README.py -o

# Test Parquet generation (small subset)
uv run ./04_generate_parquet.py --test

# Test validation
uv run ./05_validate_parquet.py --local --test

Verify outputs:

  • metadata-2.17.json has correct structure
  • README-2.17 renders correctly
  • Parquet files load properly
  • No validation errors

7. Update ud-hf-parquet-tools Dependency (if needed)

If the framework requires a new version of the external library:

File: pyproject.toml

dependencies = [
    "ud-hf-parquet-tools>=1.2.0",  # Update minimum version
]

Update wrapper scripts:

# tools/04_generate_parquet.py
# tools/05_validate_parquet.py

8. Apply to All UD Data Branches

The framework update should be applied to all active UD data branches:

# List all UD data branches
git branch -r | grep -E "origin/[0-9]+"

# Example output:
# origin/2.7
# origin/2.8
# ...
# origin/2.17

# For each branch, merge the framework changes
for branch in 2.7 2.8 2.9 2.10 2.11 2.12 2.13 2.14 2.15 2.16 2.17; do
    echo "Updating branch ${branch}..."

    git checkout ${branch}
    git pull origin ${branch}

    # Cherry-pick framework changes (or merge from main)
    # Option A: Cherry-pick specific commits
    git cherry-pick <commit-hash>

    # Option B: Merge main (if no conflicts expected)
    git merge main --no-edit

    # Regenerate files with new framework
    cd tools
    ./02_generate_metadata.py -o
    ./03_generate_README.py -o
    cd ..

    # Copy to root
    cp tools/README-${branch} README.md
    cp tools/metadata-${branch}.json metadata.json

    # Commit
    git add README.md metadata.json tools/
    git commit -m "Update to framework v${NEW_VER}"

    # Push
    git push origin ${branch}
done

git checkout main

Caution: Review each branch carefully for conflicts or branch-specific issues.

9. Create Git Tag

# Tag the main branch
git checkout main
git tag -a v${NEW_VER} -m "Framework release v${NEW_VER}

Changes:
- Feature A
- Improvement B
- Fix C

See CHANGELOG.md for full details."

# Push tag
git push origin v${NEW_VER}

10. Create GitHub Release

  1. Go to: https://github.com/YOUR_ORG/universal_dependencies/releases/new

  2. Select tag: v2.1.0

  3. Release title: Framework v2.1.0

  4. Description:

    ## Framework v2.1.0
    
    This release updates the Universal Dependencies dataset **framework** to v2.1.0.
    
    **This is a framework release, not a UD data release.** It applies to all UD data versions (2.7-2.17).
    
    ### What's New
    
    - Feature X: Description
    - Enhancement Y: Description
    - Bug fix Z: Description
    
    ### Breaking Changes (if any)
    
    - Change A: Migration instructions
    
    ### Upgrade Instructions
    
    For users: See [MIGRATION.md](MIGRATION.md) if breaking changes exist.
    
    For maintainers: Framework has been applied to all UD data branches (2.7-2.17).
    
    ### Full Changelog
    
    See [CHANGELOG.md](CHANGELOG.md) for complete release notes.
    
  5. Mark as pre-release if not stable

  6. Publish release

11. Update HuggingFace Hub (Optional)

If this is a major release that affects the dataset card or user experience:

# For each UD version branch on HF Hub
for branch in 2.7 2.8 ... 2.17; do
    git checkout ${branch}
    git push hf ${branch}
done

12. Announce Release

Update dataset card (README.md):

## What's New in Framework v2.1

**Framework v2.1.0** brings the following improvements:
- New feature X
- Enhanced Y
- Bug fix Z

For full details, see [CHANGELOG.md](CHANGELOG.md).

Announce on:

  • HuggingFace Hub discussions
  • GitHub releases page
  • Relevant communities (if major release)

Testing Strategy

Automated Tests

If tests exist in the repository:

# Run all tests
pytest tests/

# Run specific test suites
pytest tests/test_parsing.py
pytest tests/test_conversion.py

Note: Tests have been moved to the external ud-hf-parquet-tools library.

Manual Testing

Test matrix:

UD Version Test Type Expected Result
2.17 (latest) Full generation All files generated correctly
2.17 Validation 100% fidelity
2.17 Load from HF Dataset loads without errors
2.10 (mid) Regeneration Framework updates apply cleanly
2.7 (oldest) Regeneration Framework updates apply cleanly

Specific tests:

  1. Schema validation:

    from datasets import load_dataset
    ds = load_dataset("commul/universal_dependencies", "en_ewt", revision="2.17")
    assert "mwt" in ds["train"].features
    assert "empty_nodes" in ds["train"].features
    
  2. Data integrity:

    uv run tools/05_validate_parquet.py --local --test
    # Should report 0 errors
    
  3. Backwards compatibility (if minor/patch):

    # Old code should still work
    ds = load_dataset("commul/universal_dependencies", "fr_gsd", revision="2.17")
    tokens = ds["train"][0]["tokens"]
    # No errors
    

Rollback Plan

If critical issues are discovered:

# Revert to previous version
git checkout v2.0.0

# Or revert specific commits
git revert <commit-hash>

# Update version back
# Edit pyproject.toml, CHANGELOG.md

# Tag rollback
git tag -a v2.1.1 -m "Rollback v2.1.0 due to critical bug"
git push origin v2.1.1

Common Scenarios

Scenario 1: Bug Fix Release (v2.0.0 → v2.0.1)

Example: Fix metadata parsing bug

# 1. Fix the bug in code
# 2. Update version in pyproject.toml
# 3. Update CHANGELOG.md
# 4. Test on sample branch (2.17)
# 5. Apply to all branches
# 6. Tag and release

Skip: No migration guide needed, no schema changes

Scenario 2: Minor Feature Release (v2.0 → v2.1)

Example: Add empty_nodes field to schema

# 1. Update templates/README.tmpl with new field docs
# 2. Update version in pyproject.toml
# 3. Update CHANGELOG.md
# 4. Test on sample branch
# 5. Apply to all branches
# 6. Update MIGRATION.md (optional, if users need guidance)
# 7. Tag and release

Impact: Users can optionally use new field, old code still works

Scenario 3: Major Breaking Release (v2.0 → v3.0)

Example: Change schema significantly

# 1. Update all templates and scripts
# 2. Update version in pyproject.toml
# 3. Create detailed MIGRATION.md section
# 4. Update CHANGELOG.md with breaking changes
# 5. Test extensively on all branches
# 6. Apply to all branches (may require regeneration)
# 7. Tag and release
# 8. Announce with migration guide

Impact: Users may need to update code, provide clear migration path

Version History

Version Date Type Highlights
v2.0.0 2025-01 Major Parquet format, no Python script, external helpers
v1.0.0 2024-XX Major Initial Python script loader

Best Practices

  1. Semantic Versioning: Always follow semver strictly
  2. Test Thoroughly: Test on oldest and newest UD versions
  3. Document Changes: Update all relevant documentation
  4. Communicate Clearly: Explain impact to users
  5. Batch Branches: Update all UD branches together for consistency
  6. Keep Changelog: Maintain detailed CHANGELOG.md
  7. Tag Consistently: Use v{MAJOR}.{MINOR}.{PATCH} format

Troubleshooting

Issue: Merge conflicts when applying to branches

Solution:

# If conflicts occur:
git checkout ${branch}
git merge main

# Resolve conflicts manually
# Prioritize branch-specific data (metadata, stats)
# Take framework changes from main (templates, scripts)

git add .
git commit -m "Merge framework v${NEW_VER} into ${branch}"

Issue: Tests fail after framework update

Solution:

  1. Identify which test is failing
  2. Determine if it's a legitimate bug or test needs updating
  3. Fix code or update test
  4. Don't proceed with release until all tests pass

Issue: Documentation out of sync

Solution:

# Systematically check all docs
grep -r "v2\.0" --include="*.md" | grep -v CHANGELOG

# Update each file
# Commit separately for clarity
git commit -m "Update docs to reference v2.1"

Reference

Support

For questions about framework releases:

  • Check existing release notes in CHANGELOG.md
  • Review past release PRs/commits
  • Open an issue in the repository