iiegn Claude Sonnet 4.5 commited on
Commit
ada57a8
·
verified ·
1 Parent(s): c8f1b06

Add RELEASE.md for framework version releases

Browse files

Created comprehensive guide for releasing new framework versions (e.g., v2.0 → v2.1),
distinct from adding new UD data versions (e.g., UD 2.17 → 2.18).

**Key Sections:**

1. **Framework vs. Data Versioning**
- Clear distinction between framework versions and UD data versions
- Framework applies to all UD data branches

2. **When to Release** (Semantic Versioning)
- Major: Breaking changes (v2.0 → v3.0)
- Minor: New features (v2.0 → v2.1)
- Patch: Bug fixes (v2.0.0 → v2.0.1)

3. **Release Checklist** (12 steps)
- Update version numbers (pyproject.toml)
- Update CHANGELOG.md
- Update documentation
- Test thoroughly
- Apply to all UD data branches
- Create git tags
- Create GitHub release
- Update HuggingFace Hub
- Announce release

4. **Testing Strategy**
- Test matrix for multiple UD versions
- Schema validation
- Data integrity checks
- Backwards compatibility
- Rollback plan

5. **Common Scenarios**
- Bug fix release (patch)
- Feature release (minor)
- Breaking release (major)

6. **Best Practices**
- Semantic versioning
- Thorough testing
- Clear documentation
- Batch branch updates

7. **Troubleshooting**
- Merge conflicts
- Test failures
- Documentation sync

**Complements existing docs:**
- ADDING_NEW_UD_VERSION.md - For UD data releases
- MIGRATION.md - For user migrations
- CHANGELOG.md - For version history

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. RELEASE.md +530 -0
RELEASE.md ADDED
@@ -0,0 +1,530 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Framework Release Guide
2
+
3
+ This guide documents how to release a new **framework version** for the Universal Dependencies dataset (e.g., v2.0 → v2.1).
4
+
5
+ **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](ADDING_NEW_UD_VERSION.md).
6
+
7
+ ## Framework vs. Data Versioning
8
+
9
+ **Framework Version** (e.g., v2.0, v2.1):
10
+ - The tooling, templates, and architecture used to generate datasets
11
+ - Includes: generation scripts, templates, documentation, architecture decisions
12
+ - Lives in: `tools/`, `templates/`, root documentation files
13
+ - Applies to: All UD data versions (2.7, 2.8, ..., 2.17, 2.18, ...)
14
+
15
+ **UD Data Version** (e.g., 2.17, 2.18):
16
+ - The actual Universal Dependencies linguistic data
17
+ - Released by the UD project ~annually
18
+ - Each gets its own git branch
19
+ - Can use the latest framework version
20
+
21
+ **Example:** "UD 2.17 data using framework v2.0 architecture"
22
+
23
+ ## When to Release a New Framework Version
24
+
25
+ Use [semantic versioning](https://semver.org/): `MAJOR.MINOR.PATCH`
26
+
27
+ ### Major Version (v2.0 → v3.0)
28
+
29
+ **Breaking changes** that require user code modifications:
30
+
31
+ - Schema changes (adding/removing/renaming fields)
32
+ - Changed data format (e.g., v1.x script loader → v2.0 Parquet)
33
+ - Incompatible API changes
34
+ - Removing deprecated features
35
+
36
+ **Example:** v1.x → v2.0 moved to Parquet format and removed Python script loader
37
+
38
+ ### Minor Version (v2.0 → v2.1)
39
+
40
+ **New features** that are backwards compatible:
41
+
42
+ - New optional fields in schema
43
+ - New tools or scripts
44
+ - Enhanced functionality (e.g., better MWT handling)
45
+ - Performance improvements
46
+ - New documentation
47
+
48
+ **Example:** Adding empty_nodes field to schema while keeping all existing fields
49
+
50
+ ### Patch Version (v2.0.0 → v2.0.1)
51
+
52
+ **Bug fixes** that don't change functionality:
53
+
54
+ - Fixing parsing errors
55
+ - Correcting metadata extraction
56
+ - Documentation typos
57
+ - Template rendering issues
58
+ - Validation improvements
59
+
60
+ **Example:** Fixing double-equals parsing in FEATS fields
61
+
62
+ ## Release Checklist
63
+
64
+ ### 1. Decide Version Number
65
+
66
+ ```bash
67
+ # Current version
68
+ CURRENT_VER="2.0.0"
69
+
70
+ # New version (update based on changes)
71
+ NEW_VER="2.1.0" # or "2.0.1" for patch, "3.0.0" for major
72
+ ```
73
+
74
+ **Determine type:**
75
+ - Breaking changes? → Major
76
+ - New features? → Minor
77
+ - Bug fixes only? → Patch
78
+
79
+ ### 2. Update Version Numbers
80
+
81
+ **File: pyproject.toml**
82
+ ```toml
83
+ [project]
84
+ name = "universal-dependencies"
85
+ version = "2.1.0" # Update this
86
+ ```
87
+
88
+ **File: MIGRATION.md** (if major/minor)
89
+ Update the version references in examples:
90
+ ```markdown
91
+ # Migration Guide: v2.0 → v2.1
92
+
93
+ This guide helps you migrate from v2.0 to v2.1...
94
+ ```
95
+
96
+ ### 3. Update CHANGELOG.md
97
+
98
+ Create entry for new version:
99
+
100
+ ```markdown
101
+ ## [2.1.0] - 2026-01-XX
102
+
103
+ ### Added
104
+ - New feature X
105
+ - Enhanced functionality Y
106
+
107
+ ### Changed
108
+ - Improved Z
109
+
110
+ ### Fixed
111
+ - Bug fix for A
112
+
113
+ ### Removed
114
+ - Deprecated feature B (if major version)
115
+ ```
116
+
117
+ **For breaking changes (major version):**
118
+ ```markdown
119
+ ### Breaking Changes
120
+ - **Description**: Clear explanation
121
+ - **Impact**: Who is affected
122
+ - **Migration**: How to update code
123
+ ```
124
+
125
+ ### 4. Update Documentation
126
+
127
+ **Files to review and update:**
128
+
129
+ - **README.md** (root) - Update version badges, examples
130
+ - **MIGRATION.md** - Add new section if breaking changes
131
+ - **ADDING_NEW_UD_VERSION.md** - Update if workflow changes
132
+ - **tools/README.md** - Update if scripts change
133
+ - **templates/README.tmpl** - Update if dataset card needs changes
134
+
135
+ **Version-specific updates:**
136
+ ```bash
137
+ # Search for old version references
138
+ grep -r "v2\.0" --include="*.md"
139
+ grep -r "2\.0\.0" --include="*.md"
140
+
141
+ # Update as needed
142
+ ```
143
+
144
+ ### 5. Update Templates (if applicable)
145
+
146
+ If schema or architecture changed:
147
+
148
+ **File: tools/templates/README.tmpl**
149
+ - Update schema documentation
150
+ - Update code examples
151
+ - Add new field descriptions
152
+
153
+ **Test template rendering:**
154
+ ```bash
155
+ cd tools
156
+ ./03_generate_README.py -o
157
+ # Review generated README-2.17 for correctness
158
+ ```
159
+
160
+ ### 6. Test Changes Thoroughly
161
+
162
+ **Test on sample UD version (e.g., 2.17):**
163
+
164
+ ```bash
165
+ cd tools
166
+
167
+ # Test metadata generation
168
+ ./02_generate_metadata.py -o
169
+
170
+ # Test README generation
171
+ ./03_generate_README.py -o
172
+
173
+ # Test Parquet generation (small subset)
174
+ uv run ./04_generate_parquet.py --test
175
+
176
+ # Test validation
177
+ uv run ./05_validate_parquet.py --local --test
178
+ ```
179
+
180
+ **Verify outputs:**
181
+ - `metadata-2.17.json` has correct structure
182
+ - `README-2.17` renders correctly
183
+ - Parquet files load properly
184
+ - No validation errors
185
+
186
+ ### 7. Update ud-hf-parquet-tools Dependency (if needed)
187
+
188
+ If the framework requires a new version of the external library:
189
+
190
+ **File: pyproject.toml**
191
+ ```toml
192
+ dependencies = [
193
+ "ud-hf-parquet-tools>=1.2.0", # Update minimum version
194
+ ]
195
+ ```
196
+
197
+ **Update wrapper scripts:**
198
+ ```bash
199
+ # tools/04_generate_parquet.py
200
+ # tools/05_validate_parquet.py
201
+ ```
202
+
203
+ ### 8. Apply to All UD Data Branches
204
+
205
+ The framework update should be applied to all active UD data branches:
206
+
207
+ ```bash
208
+ # List all UD data branches
209
+ git branch -r | grep -E "origin/[0-9]+"
210
+
211
+ # Example output:
212
+ # origin/2.7
213
+ # origin/2.8
214
+ # ...
215
+ # origin/2.17
216
+
217
+ # For each branch, merge the framework changes
218
+ 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
219
+ echo "Updating branch ${branch}..."
220
+
221
+ git checkout ${branch}
222
+ git pull origin ${branch}
223
+
224
+ # Cherry-pick framework changes (or merge from main)
225
+ # Option A: Cherry-pick specific commits
226
+ git cherry-pick <commit-hash>
227
+
228
+ # Option B: Merge main (if no conflicts expected)
229
+ git merge main --no-edit
230
+
231
+ # Regenerate files with new framework
232
+ cd tools
233
+ ./02_generate_metadata.py -o
234
+ ./03_generate_README.py -o
235
+ cd ..
236
+
237
+ # Copy to root
238
+ cp tools/README-${branch} README.md
239
+ cp tools/metadata-${branch}.json metadata.json
240
+
241
+ # Commit
242
+ git add README.md metadata.json tools/
243
+ git commit -m "Update to framework v${NEW_VER}"
244
+
245
+ # Push
246
+ git push origin ${branch}
247
+ done
248
+
249
+ git checkout main
250
+ ```
251
+
252
+ **Caution:** Review each branch carefully for conflicts or branch-specific issues.
253
+
254
+ ### 9. Create Git Tag
255
+
256
+ ```bash
257
+ # Tag the main branch
258
+ git checkout main
259
+ git tag -a v${NEW_VER} -m "Framework release v${NEW_VER}
260
+
261
+ Changes:
262
+ - Feature A
263
+ - Improvement B
264
+ - Fix C
265
+
266
+ See CHANGELOG.md for full details."
267
+
268
+ # Push tag
269
+ git push origin v${NEW_VER}
270
+ ```
271
+
272
+ ### 10. Create GitHub Release
273
+
274
+ 1. Go to: https://github.com/YOUR_ORG/universal_dependencies/releases/new
275
+ 2. Select tag: `v2.1.0`
276
+ 3. Release title: `Framework v2.1.0`
277
+ 4. Description:
278
+ ```markdown
279
+ ## Framework v2.1.0
280
+
281
+ This release updates the Universal Dependencies dataset **framework** to v2.1.0.
282
+
283
+ **This is a framework release, not a UD data release.** It applies to all UD data versions (2.7-2.17).
284
+
285
+ ### What's New
286
+
287
+ - Feature X: Description
288
+ - Enhancement Y: Description
289
+ - Bug fix Z: Description
290
+
291
+ ### Breaking Changes (if any)
292
+
293
+ - Change A: Migration instructions
294
+
295
+ ### Upgrade Instructions
296
+
297
+ For users: See [MIGRATION.md](MIGRATION.md) if breaking changes exist.
298
+
299
+ For maintainers: Framework has been applied to all UD data branches (2.7-2.17).
300
+
301
+ ### Full Changelog
302
+
303
+ See [CHANGELOG.md](CHANGELOG.md) for complete release notes.
304
+ ```
305
+
306
+ 5. Mark as pre-release if not stable
307
+ 6. Publish release
308
+
309
+ ### 11. Update HuggingFace Hub (Optional)
310
+
311
+ If this is a major release that affects the dataset card or user experience:
312
+
313
+ ```bash
314
+ # For each UD version branch on HF Hub
315
+ for branch in 2.7 2.8 ... 2.17; do
316
+ git checkout ${branch}
317
+ git push hf ${branch}
318
+ done
319
+ ```
320
+
321
+ ### 12. Announce Release
322
+
323
+ **Update dataset card (README.md):**
324
+ ```markdown
325
+ ## What's New in Framework v2.1
326
+
327
+ **Framework v2.1.0** brings the following improvements:
328
+ - New feature X
329
+ - Enhanced Y
330
+ - Bug fix Z
331
+
332
+ For full details, see [CHANGELOG.md](CHANGELOG.md).
333
+ ```
334
+
335
+ **Announce on:**
336
+ - HuggingFace Hub discussions
337
+ - GitHub releases page
338
+ - Relevant communities (if major release)
339
+
340
+ ## Testing Strategy
341
+
342
+ ### Automated Tests
343
+
344
+ If tests exist in the repository:
345
+
346
+ ```bash
347
+ # Run all tests
348
+ pytest tests/
349
+
350
+ # Run specific test suites
351
+ pytest tests/test_parsing.py
352
+ pytest tests/test_conversion.py
353
+ ```
354
+
355
+ **Note:** Tests have been moved to the external `ud-hf-parquet-tools` library.
356
+
357
+ ### Manual Testing
358
+
359
+ **Test matrix:**
360
+
361
+ | UD Version | Test Type | Expected Result |
362
+ |------------|-----------|-----------------|
363
+ | 2.17 (latest) | Full generation | All files generated correctly |
364
+ | 2.17 | Validation | 100% fidelity |
365
+ | 2.17 | Load from HF | Dataset loads without errors |
366
+ | 2.10 (mid) | Regeneration | Framework updates apply cleanly |
367
+ | 2.7 (oldest) | Regeneration | Framework updates apply cleanly |
368
+
369
+ **Specific tests:**
370
+
371
+ 1. **Schema validation:**
372
+ ```python
373
+ from datasets import load_dataset
374
+ ds = load_dataset("commul/universal_dependencies", "en_ewt", revision="2.17")
375
+ assert "mwt" in ds["train"].features
376
+ assert "empty_nodes" in ds["train"].features
377
+ ```
378
+
379
+ 2. **Data integrity:**
380
+ ```bash
381
+ uv run tools/05_validate_parquet.py --local --test
382
+ # Should report 0 errors
383
+ ```
384
+
385
+ 3. **Backwards compatibility (if minor/patch):**
386
+ ```python
387
+ # Old code should still work
388
+ ds = load_dataset("commul/universal_dependencies", "fr_gsd", revision="2.17")
389
+ tokens = ds["train"][0]["tokens"]
390
+ # No errors
391
+ ```
392
+
393
+ ### Rollback Plan
394
+
395
+ If critical issues are discovered:
396
+
397
+ ```bash
398
+ # Revert to previous version
399
+ git checkout v2.0.0
400
+
401
+ # Or revert specific commits
402
+ git revert <commit-hash>
403
+
404
+ # Update version back
405
+ # Edit pyproject.toml, CHANGELOG.md
406
+
407
+ # Tag rollback
408
+ git tag -a v2.1.1 -m "Rollback v2.1.0 due to critical bug"
409
+ git push origin v2.1.1
410
+ ```
411
+
412
+ ## Common Scenarios
413
+
414
+ ### Scenario 1: Bug Fix Release (v2.0.0 → v2.0.1)
415
+
416
+ **Example:** Fix metadata parsing bug
417
+
418
+ ```bash
419
+ # 1. Fix the bug in code
420
+ # 2. Update version in pyproject.toml
421
+ # 3. Update CHANGELOG.md
422
+ # 4. Test on sample branch (2.17)
423
+ # 5. Apply to all branches
424
+ # 6. Tag and release
425
+ ```
426
+
427
+ **Skip:** No migration guide needed, no schema changes
428
+
429
+ ### Scenario 2: Minor Feature Release (v2.0 → v2.1)
430
+
431
+ **Example:** Add empty_nodes field to schema
432
+
433
+ ```bash
434
+ # 1. Update templates/README.tmpl with new field docs
435
+ # 2. Update version in pyproject.toml
436
+ # 3. Update CHANGELOG.md
437
+ # 4. Test on sample branch
438
+ # 5. Apply to all branches
439
+ # 6. Update MIGRATION.md (optional, if users need guidance)
440
+ # 7. Tag and release
441
+ ```
442
+
443
+ **Impact:** Users can optionally use new field, old code still works
444
+
445
+ ### Scenario 3: Major Breaking Release (v2.0 → v3.0)
446
+
447
+ **Example:** Change schema significantly
448
+
449
+ ```bash
450
+ # 1. Update all templates and scripts
451
+ # 2. Update version in pyproject.toml
452
+ # 3. Create detailed MIGRATION.md section
453
+ # 4. Update CHANGELOG.md with breaking changes
454
+ # 5. Test extensively on all branches
455
+ # 6. Apply to all branches (may require regeneration)
456
+ # 7. Tag and release
457
+ # 8. Announce with migration guide
458
+ ```
459
+
460
+ **Impact:** Users may need to update code, provide clear migration path
461
+
462
+ ## Version History
463
+
464
+ | Version | Date | Type | Highlights |
465
+ |---------|------|------|------------|
466
+ | v2.0.0 | 2025-01 | Major | Parquet format, no Python script, external helpers |
467
+ | v1.0.0 | 2024-XX | Major | Initial Python script loader |
468
+
469
+ ## Best Practices
470
+
471
+ 1. **Semantic Versioning:** Always follow semver strictly
472
+ 2. **Test Thoroughly:** Test on oldest and newest UD versions
473
+ 3. **Document Changes:** Update all relevant documentation
474
+ 4. **Communicate Clearly:** Explain impact to users
475
+ 5. **Batch Branches:** Update all UD branches together for consistency
476
+ 6. **Keep Changelog:** Maintain detailed CHANGELOG.md
477
+ 7. **Tag Consistently:** Use `v{MAJOR}.{MINOR}.{PATCH}` format
478
+
479
+ ## Troubleshooting
480
+
481
+ ### Issue: Merge conflicts when applying to branches
482
+
483
+ **Solution:**
484
+ ```bash
485
+ # If conflicts occur:
486
+ git checkout ${branch}
487
+ git merge main
488
+
489
+ # Resolve conflicts manually
490
+ # Prioritize branch-specific data (metadata, stats)
491
+ # Take framework changes from main (templates, scripts)
492
+
493
+ git add .
494
+ git commit -m "Merge framework v${NEW_VER} into ${branch}"
495
+ ```
496
+
497
+ ### Issue: Tests fail after framework update
498
+
499
+ **Solution:**
500
+ 1. Identify which test is failing
501
+ 2. Determine if it's a legitimate bug or test needs updating
502
+ 3. Fix code or update test
503
+ 4. Don't proceed with release until all tests pass
504
+
505
+ ### Issue: Documentation out of sync
506
+
507
+ **Solution:**
508
+ ```bash
509
+ # Systematically check all docs
510
+ grep -r "v2\.0" --include="*.md" | grep -v CHANGELOG
511
+
512
+ # Update each file
513
+ # Commit separately for clarity
514
+ git commit -m "Update docs to reference v2.1"
515
+ ```
516
+
517
+ ## Reference
518
+
519
+ - **Framework documentation:** [tools/README.md](tools/README.md)
520
+ - **UD data releases:** [ADDING_NEW_UD_VERSION.md](ADDING_NEW_UD_VERSION.md)
521
+ - **User migration:** [MIGRATION.md](MIGRATION.md)
522
+ - **External library:** https://github.com/bot-zen/ud-hf-parquet-tools
523
+ - **Semantic versioning:** https://semver.org/
524
+
525
+ ## Support
526
+
527
+ For questions about framework releases:
528
+ - Check existing release notes in CHANGELOG.md
529
+ - Review past release PRs/commits
530
+ - Open an issue in the repository