half-orm-dev 0.17.2a6__tar.gz → 0.17.2a8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {half_orm_dev-0.17.2a6/half_orm_dev.egg-info → half_orm_dev-0.17.2a8}/PKG-INFO +51 -107
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/README.md +50 -106
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/patch.py +12 -12
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/release.py +11 -15
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/main.py +69 -5
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/decorators.py +9 -1
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/patch_manager.py +3 -3
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/release_manager.py +3 -3
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/repo.py +163 -9
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/git-hooks/pre-commit +37 -0
- half_orm_dev-0.17.2a8/half_orm_dev/version.txt +1 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8/half_orm_dev.egg-info}/PKG-INFO +51 -107
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev.egg-info/SOURCES.txt +0 -1
- half_orm_dev-0.17.2a6/half_orm_dev/cli/commands/new.py +0 -15
- half_orm_dev-0.17.2a6/half_orm_dev/version.txt +0 -1
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/AUTHORS +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/LICENSE +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/__init__.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/__init__.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/__init__.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/apply.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/check.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/clone.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/init.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/migrate.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/restore.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/sync.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/todo.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/undo.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/update.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli/commands/upgrade.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/cli_extension.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/database.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/hgit.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/migration_manager.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/migrations/0/17/1/00_move_to_hop.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/migrations/0/17/1/01_txt_to_toml.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/modules.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/patch_validator.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/patches/0/1/0/00_half_orm_meta.database.sql +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/patches/0/1/0/01_alter_half_orm_meta.hop_release.sql +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/patches/0/1/0/02_half_orm_meta.view.hop_penultimate_release.sql +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/patches/log +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/patches/sql/half_orm_meta.sql +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/release_file.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/.gitignore +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/MANIFEST.in +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/Pipfile +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/README +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/conftest_template +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/git-hooks/prepare-commit-msg +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/init_module_template +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/module_template_1 +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/module_template_2 +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/module_template_3 +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/pyproject.toml +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/relation_test +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/sql_adapter +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/templates/warning +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev/utils.py +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev.egg-info/dependency_links.txt +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev.egg-info/requires.txt +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/half_orm_dev.egg-info/top_level.txt +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/pyproject.toml +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/setup.cfg +0 -0
- {half_orm_dev-0.17.2a6 → half_orm_dev-0.17.2a8}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: half_orm_dev
|
|
3
|
-
Version: 0.17.
|
|
3
|
+
Version: 0.17.2a8
|
|
4
4
|
Summary: half_orm development Framework.
|
|
5
5
|
Author-email: Joël Maïzi <joel.maizi@collorg.org>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -31,7 +31,7 @@ Dynamic: requires-dist
|
|
|
31
31
|
|
|
32
32
|
# half-orm-dev
|
|
33
33
|
|
|
34
|
-
## **WARNING!** half-orm-dev is
|
|
34
|
+
## **WARNING!** half-orm-dev is in alpha development phase!
|
|
35
35
|
|
|
36
36
|
**Git-centric patch management and database versioning for half-orm projects**
|
|
37
37
|
|
|
@@ -44,62 +44,6 @@ Modern development workflow for PostgreSQL databases with automatic code generat
|
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
-
## ⚠️ Breaking Changes (v0.17.0)
|
|
48
|
-
|
|
49
|
-
**This version introduces major architectural changes that completely transform how you use half-orm-dev.**
|
|
50
|
-
|
|
51
|
-
### What Changed
|
|
52
|
-
|
|
53
|
-
**1. Complete Command Reorganization**
|
|
54
|
-
- **OLD**: `half_orm patch new`, `half_orm patch add`, `half_orm release new`
|
|
55
|
-
- **NEW**: `half_orm dev patch new`, `half_orm dev patch close`, `half_orm dev release new`
|
|
56
|
-
- All commands now under `half_orm dev` namespace for better organization
|
|
57
|
-
- Note: `patch close` must be run from the `ho-patch/*` branch (no arguments)
|
|
58
|
-
|
|
59
|
-
**2. New Branch Strategy**
|
|
60
|
-
- **OLD**: Various branch naming conventions
|
|
61
|
-
- **NEW**: Strict `ho-prod`, `ho-patch/*`, `ho-release/*` hierarchy
|
|
62
|
-
- Previous branch structures are not compatible
|
|
63
|
-
|
|
64
|
-
**3. Unified Promotion Command**
|
|
65
|
-
- **OLD**: `half_orm release promote-to-rc`, `half_orm release promote-to-prod`
|
|
66
|
-
- **NEW**: `half_orm dev release promote rc`, `half_orm dev release promote prod`
|
|
67
|
-
- Single `promote` command with explicit target argument
|
|
68
|
-
|
|
69
|
-
**4. TOML-Based Patch Tracking (v0.17.0)**
|
|
70
|
-
- **OLD**: Separate `X.Y.Z-candidates.txt` and `X.Y.Z-stage.txt` files
|
|
71
|
-
- **NEW**: Single `X.Y.Z-patches.toml` file with candidate/staged status
|
|
72
|
-
- **Structure**: `[patches]` section with `patch-id = "candidate"` or `patch-id = "staged"`
|
|
73
|
-
- Order preserved in TOML file (insertion order)
|
|
74
|
-
- RC/prod/hotfix still use `.txt` format (immutable snapshots)
|
|
75
|
-
|
|
76
|
-
**5. Test Organization and Validation**
|
|
77
|
-
- **NEW**: Systematic test validation before ANY integration
|
|
78
|
-
- **NEW**: Temporary validation branches (`temp-valid-X.Y.Z`) for safe testing
|
|
79
|
-
- Tests must pass before patches are added to releases
|
|
80
|
-
|
|
81
|
-
### What Stayed the Same
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
- ✅ **Business Logic Code**: Your database schemas, models, and application code remain unchanged
|
|
85
|
-
- ✅ **Database Structure**: PostgreSQL schemas and data are not affected
|
|
86
|
-
- ✅ **half-orm Integration**: Code generation and ORM features work identically
|
|
87
|
-
- ✅ **Semantic Versioning**: MAJOR.MINOR.PATCH logic is preserved
|
|
88
|
-
- ✅ **SQL Patch Files**: Format and execution order unchanged
|
|
89
|
-
|
|
90
|
-
### Migration Guide
|
|
91
|
-
|
|
92
|
-
**If migrating from previous versions:**
|
|
93
|
-
|
|
94
|
-
1. **Backup your repository** before upgrading
|
|
95
|
-
2. **Update all scripts** to use `half_orm dev` prefix
|
|
96
|
-
3. **Reorganize branches** to match new `ho-prod`/`ho-patch/*` structure
|
|
97
|
-
4. **Convert release files** from CHANGELOG.py to releases/*.txt format
|
|
98
|
-
5. **Update CI/CD pipelines** with new command syntax
|
|
99
|
-
|
|
100
|
-
**For new projects:** Just follow the Quick Start guide below!
|
|
101
|
-
|
|
102
|
-
---
|
|
103
47
|
|
|
104
48
|
## 📖 Description
|
|
105
49
|
|
|
@@ -132,13 +76,13 @@ Perfect for teams managing evolving PostgreSQL schemas with Python applications.
|
|
|
132
76
|
# When closing a patch, tests run FIRST
|
|
133
77
|
# You must be on the patch branch
|
|
134
78
|
git checkout ho-patch/456-user-auth
|
|
135
|
-
half_orm dev patch
|
|
79
|
+
half_orm dev patch merge
|
|
136
80
|
|
|
137
81
|
# What happens behind the scenes:
|
|
138
82
|
# 1. Creates temp-valid-1.3.6 branch
|
|
139
83
|
# 2. Merges ALL release patches + new patch
|
|
140
84
|
# 3. Runs pytest tests/
|
|
141
|
-
# 4. If merge and tests PASS → changes patch status to "staged" in TOML and commits
|
|
85
|
+
# 4. If merge and tests PASS → merges patch branch into release branch; changes patch status to "staged" in TOML and commits
|
|
142
86
|
# 5. If anything FAILS → nothing committed (temp branch is deleted)
|
|
143
87
|
```
|
|
144
88
|
|
|
@@ -278,7 +222,7 @@ cd project
|
|
|
278
222
|
half_orm dev release new minor # Creates ho-release/0.1.0
|
|
279
223
|
|
|
280
224
|
# Now create patch (automatically added to candidates)
|
|
281
|
-
half_orm dev patch
|
|
225
|
+
half_orm dev patch create 1-users
|
|
282
226
|
# → Auto-added to 0.1.0-patches.toml as "candidate"
|
|
283
227
|
|
|
284
228
|
# Add schema changes
|
|
@@ -331,7 +275,7 @@ git commit -m "Add users table with business logic and tests"
|
|
|
331
275
|
# Close patch - integrate to release (automatic validation runs here!)
|
|
332
276
|
# You must be on the patch branch
|
|
333
277
|
git checkout ho-patch/1-users
|
|
334
|
-
half_orm dev patch
|
|
278
|
+
half_orm dev patch merge
|
|
335
279
|
# → Status changed to "staged" in TOML
|
|
336
280
|
# → Tests validated automatically
|
|
337
281
|
```
|
|
@@ -355,9 +299,9 @@ The workflow follows a **Git-Flow** approach with dedicated integration branches
|
|
|
355
299
|
│ DEVELOPMENT (ho-release/X.Y.Z branch) │
|
|
356
300
|
├─────────────────────────────────────────────────────────────────┤
|
|
357
301
|
│ 1. release new <level> Create ho-release/X.Y.Z │
|
|
358
|
-
│ 2. patch
|
|
302
|
+
│ 2. patch create <id> Create patch (auto in candidates) │
|
|
359
303
|
│ 3. patch apply Apply & test changes │
|
|
360
|
-
│ 4. patch
|
|
304
|
+
│ 4. patch merge Merge into ho-release (TESTS!) │
|
|
361
305
|
│ (run from ho-patch/<id> branch) │
|
|
362
306
|
│ │
|
|
363
307
|
│ RELEASE PROMOTION │
|
|
@@ -370,7 +314,7 @@ The workflow follows a **Git-Flow** approach with dedicated integration branches
|
|
|
370
314
|
│ │
|
|
371
315
|
│ HOTFIX WORKFLOW (urgent fixes) │
|
|
372
316
|
│ 9. release hotfix Reopen production version │
|
|
373
|
-
│ 10. patch
|
|
317
|
+
│ 10. patch create/close Same workflow on hotfix branch │
|
|
374
318
|
│ 11. release promote hotfix Deploy as vX.Y.Z-hotfixN │
|
|
375
319
|
└─────────────────────────────────────────────────────────────────┘
|
|
376
320
|
```
|
|
@@ -409,9 +353,9 @@ The workflow follows a **Git-Flow** approach with dedicated integration branches
|
|
|
409
353
|
| half-orm state | File | GitLab/GitHub |
|
|
410
354
|
|----------------|------|---------------|
|
|
411
355
|
| `release new` | Creates `-patches.toml` | Create milestone |
|
|
412
|
-
| `patch
|
|
356
|
+
| `patch create` (on ho-release) | Adds to TOML as "candidate" | Create issue assigned to milestone |
|
|
413
357
|
| Candidate | `"patch-id" = "candidate"` in TOML | Open issue assigned to milestone |
|
|
414
|
-
| `patch
|
|
358
|
+
| `patch merge` | Changes to `"staged"` in TOML | Merge MR and close issue |
|
|
415
359
|
| Stage | `"patch-id" = "staged"` in TOML | Closed issue in milestone |
|
|
416
360
|
| `release promote rc` | Creates `-rcN.txt` snapshot | Create pre-release |
|
|
417
361
|
| RC | `-rcN.txt` | GitHub pre-release |
|
|
@@ -439,8 +383,8 @@ half_orm dev release new minor
|
|
|
439
383
|
Patches file: .hop/releases/0.17.0-patches.toml
|
|
440
384
|
|
|
441
385
|
📝 Next steps:
|
|
442
|
-
1. Create patches: half_orm dev patch
|
|
443
|
-
2. Close patches: git checkout ho-patch/<patch_id> && half_orm dev patch
|
|
386
|
+
1. Create patches: half_orm dev patch create <patch_id>
|
|
387
|
+
2. Close patches: git checkout ho-patch/<patch_id> && half_orm dev patch merge
|
|
444
388
|
3. Promote to RC: half_orm dev release promote rc
|
|
445
389
|
|
|
446
390
|
ℹ️ Patches will be merged into ho-release/0.17.0 for integration testing
|
|
@@ -452,7 +396,7 @@ half_orm dev release new minor
|
|
|
452
396
|
|
|
453
397
|
```bash
|
|
454
398
|
git checkout ho-release/0.17.0
|
|
455
|
-
half_orm dev patch
|
|
399
|
+
half_orm dev patch create 6-feature-x
|
|
456
400
|
# → Auto-detects version 0.17.0 from current branch
|
|
457
401
|
# → Creates ho-patch/6-feature-x from ho-release/0.17.0
|
|
458
402
|
# → Adds 6-feature-x to 0.17.0-patches.toml as "candidate"
|
|
@@ -470,7 +414,7 @@ half_orm dev patch new 6-feature-x
|
|
|
470
414
|
1. Add SQL/Python files to Patches/6-feature-x/
|
|
471
415
|
2. Run: half_orm dev patch apply
|
|
472
416
|
3. Test your changes
|
|
473
|
-
4. Run: half_orm dev patch
|
|
417
|
+
4. Run: half_orm dev patch merge (already on ho-patch/6-feature-x)
|
|
474
418
|
```
|
|
475
419
|
|
|
476
420
|
#### Step 3: Develop and Test (TDD Approach)
|
|
@@ -504,7 +448,7 @@ git commit -m "Implement feature with tests"
|
|
|
504
448
|
# Ensure you're on the patch branch
|
|
505
449
|
git checkout ho-patch/6-feature-x
|
|
506
450
|
|
|
507
|
-
half_orm dev patch
|
|
451
|
+
half_orm dev patch merge
|
|
508
452
|
# Complete workflow:
|
|
509
453
|
# → Detects version from 0.17.0-patches.toml
|
|
510
454
|
# → Validates ho-patch/6-feature-x exists
|
|
@@ -530,13 +474,13 @@ half_orm dev patch close
|
|
|
530
474
|
|
|
531
475
|
📝 Next steps:
|
|
532
476
|
• Other developers: git pull && git merge ho-release/0.17.0
|
|
533
|
-
• Continue development: half_orm dev patch
|
|
477
|
+
• Continue development: half_orm dev patch create <next_patch_id>
|
|
534
478
|
• Promote to RC: half_orm dev release promote rc
|
|
535
479
|
```
|
|
536
480
|
|
|
537
|
-
**Important:** `patch
|
|
481
|
+
**Important:** `patch merge` replaces the old `patch add` command. The semantics are different:
|
|
538
482
|
- **OLD**: `patch add` = "I add my validated patch to release" (from ho-prod)
|
|
539
|
-
- **NEW**: `patch
|
|
483
|
+
- **NEW**: `patch merge` = "I close my work, it's integrated in release" (merge into ho-release)
|
|
540
484
|
|
|
541
485
|
#### Step 5: Synchronize with Other Integrated Patches
|
|
542
486
|
|
|
@@ -658,8 +602,8 @@ half_orm dev release hotfix
|
|
|
658
602
|
✓ Ready for hotfix patches
|
|
659
603
|
|
|
660
604
|
📝 Next steps:
|
|
661
|
-
1. half_orm dev patch
|
|
662
|
-
2. git checkout ho-patch/<patch_id> && half_orm dev patch
|
|
605
|
+
1. half_orm dev patch create <patch_id>
|
|
606
|
+
2. git checkout ho-patch/<patch_id> && half_orm dev patch merge
|
|
663
607
|
3. half_orm dev release promote hotfix
|
|
664
608
|
```
|
|
665
609
|
|
|
@@ -671,12 +615,12 @@ The workflow is **identical** to normal workflow:
|
|
|
671
615
|
|
|
672
616
|
```bash
|
|
673
617
|
# On ho-release/0.17.0
|
|
674
|
-
half_orm dev patch
|
|
618
|
+
half_orm dev patch create 999-critical-security-fix
|
|
675
619
|
# ... develop ...
|
|
676
620
|
half_orm dev patch apply
|
|
677
621
|
# ... test ...
|
|
678
622
|
git checkout ho-patch/999-critical-security-fix
|
|
679
|
-
half_orm dev patch
|
|
623
|
+
half_orm dev patch merge
|
|
680
624
|
```
|
|
681
625
|
|
|
682
626
|
**Step 3: Promote Hotfix to Production**
|
|
@@ -742,7 +686,7 @@ half_orm dev clone <git_origin>
|
|
|
742
686
|
|
|
743
687
|
```bash
|
|
744
688
|
# Create new patch (must be on ho-release/* branch)
|
|
745
|
-
half_orm dev patch
|
|
689
|
+
half_orm dev patch create <patch_id> [-d "description"] [--before <other_patch_id>]
|
|
746
690
|
# → Patches are ordered in the TOML file (insertion order = application order)
|
|
747
691
|
# → Use --before to insert a patch before an existing one
|
|
748
692
|
# → Order matters: patches are applied sequentially
|
|
@@ -752,7 +696,7 @@ half_orm dev patch apply
|
|
|
752
696
|
|
|
753
697
|
# Close patch - integrate to release (AUTOMATIC VALIDATION!)
|
|
754
698
|
# Must be on ho-patch/* branch
|
|
755
|
-
half_orm dev patch
|
|
699
|
+
half_orm dev patch merge
|
|
756
700
|
```
|
|
757
701
|
|
|
758
702
|
**Patch Ordering:**
|
|
@@ -807,7 +751,7 @@ half_orm dev upgrade --dry-run
|
|
|
807
751
|
half_orm dev release new minor # Creates ho-release/0.17.0
|
|
808
752
|
|
|
809
753
|
# Now on ho-release/0.17.0, create patch
|
|
810
|
-
half_orm dev patch
|
|
754
|
+
half_orm dev patch create 123-add-users
|
|
811
755
|
# → Auto-added to 0.17.0-candidates.txt
|
|
812
756
|
|
|
813
757
|
# Add SQL/Python files
|
|
@@ -830,7 +774,7 @@ git commit -m "Implement users table with tests"
|
|
|
830
774
|
|
|
831
775
|
# Close patch - integrate to release (tests validated automatically!)
|
|
832
776
|
git checkout ho-patch/123-add-users
|
|
833
|
-
half_orm dev patch
|
|
777
|
+
half_orm dev patch merge
|
|
834
778
|
# → Status changed to "staged" in TOML
|
|
835
779
|
# → Tests run automatically before integration
|
|
836
780
|
```
|
|
@@ -843,11 +787,11 @@ half_orm dev release new minor # Creates ho-release/0.17.0
|
|
|
843
787
|
|
|
844
788
|
# Developer A: Working on feature
|
|
845
789
|
git checkout ho-release/0.17.0
|
|
846
|
-
half_orm dev patch
|
|
790
|
+
half_orm dev patch create 456-dashboard
|
|
847
791
|
# → Added to 0.17.0-patches.toml as candidate
|
|
848
792
|
# ... develop and test ...
|
|
849
793
|
git checkout ho-patch/456-dashboard
|
|
850
|
-
half_orm dev patch
|
|
794
|
+
half_orm dev patch merge
|
|
851
795
|
# → Status changed to "staged" in TOML
|
|
852
796
|
|
|
853
797
|
# Developer B: Must sync with A's changes first
|
|
@@ -855,12 +799,12 @@ git checkout ho-release/0.17.0
|
|
|
855
799
|
git pull origin ho-release/0.17.0 # Get A's integrated changes
|
|
856
800
|
|
|
857
801
|
# Then create patch
|
|
858
|
-
half_orm dev patch
|
|
802
|
+
half_orm dev patch create 789-reports
|
|
859
803
|
# → Added to 0.17.0-patches.toml as candidate
|
|
860
804
|
# ... develop and test ...
|
|
861
805
|
git merge origin/ho-release/0.17.0 # Sync again before closing
|
|
862
806
|
git checkout ho-patch/789-reports
|
|
863
|
-
half_orm dev patch
|
|
807
|
+
half_orm dev patch merge
|
|
864
808
|
# → Tests run with 456 + 789 together!
|
|
865
809
|
|
|
866
810
|
# All patches validated together in stage
|
|
@@ -876,14 +820,14 @@ half_orm dev release new patch # Creates 0.17.1
|
|
|
876
820
|
|
|
877
821
|
# 2. Add patches to specific versions
|
|
878
822
|
git checkout ho-release/0.17.1
|
|
879
|
-
half_orm dev patch
|
|
823
|
+
half_orm dev patch create 123-hotfix
|
|
880
824
|
git checkout ho-patch/123-hotfix
|
|
881
|
-
half_orm dev patch
|
|
825
|
+
half_orm dev patch merge
|
|
882
826
|
|
|
883
827
|
git checkout ho-release/0.18.0
|
|
884
|
-
half_orm dev patch
|
|
828
|
+
half_orm dev patch create 456-feature
|
|
885
829
|
git checkout ho-patch/456-feature
|
|
886
|
-
half_orm dev patch
|
|
830
|
+
half_orm dev patch merge
|
|
887
831
|
|
|
888
832
|
# 3. Sequential promotion (must promote 0.17.1 before 0.18.0)
|
|
889
833
|
half_orm dev release promote rc # Auto-promotes 0.17.1 (smallest)
|
|
@@ -903,14 +847,14 @@ half_orm dev release promote rc # Creates 0.17.0-rc1
|
|
|
903
847
|
|
|
904
848
|
# Found bug in testing, create fix patch
|
|
905
849
|
git checkout ho-release/0.17.0 # Back to integration branch
|
|
906
|
-
half_orm dev patch
|
|
850
|
+
half_orm dev patch create 999-rc1-fix
|
|
907
851
|
# → Added to 0.17.0-patches.toml as candidate
|
|
908
852
|
half_orm dev patch apply
|
|
909
853
|
# ... fix and test ...
|
|
910
854
|
|
|
911
855
|
# Close patch - changes status to staged
|
|
912
856
|
git checkout ho-patch/999-rc1-fix
|
|
913
|
-
half_orm dev patch
|
|
857
|
+
half_orm dev patch merge
|
|
914
858
|
# → Status changed to "staged" in TOML
|
|
915
859
|
# → Validated automatically
|
|
916
860
|
|
|
@@ -934,12 +878,12 @@ half_orm dev release hotfix
|
|
|
934
878
|
# → Creates 0.17.0-patches.toml for hotfix patches
|
|
935
879
|
|
|
936
880
|
# Same workflow as normal patch
|
|
937
|
-
half_orm dev patch
|
|
881
|
+
half_orm dev patch create 999-critical-fix
|
|
938
882
|
# → Added to 0.17.0-patches.toml as candidate (with # HOTFIX marker)
|
|
939
883
|
half_orm dev patch apply
|
|
940
884
|
# ... fix and test ...
|
|
941
885
|
git checkout ho-patch/999-critical-fix
|
|
942
|
-
half_orm dev patch
|
|
886
|
+
half_orm dev patch merge
|
|
943
887
|
# → Status changed to "staged" in TOML
|
|
944
888
|
|
|
945
889
|
# Promote as hotfix
|
|
@@ -995,8 +939,8 @@ ho-prod (main production)
|
|
|
995
939
|
|
|
996
940
|
**Branch Lifecycle:**
|
|
997
941
|
1. `release new` creates `ho-release/X.Y.Z` from `ho-prod`
|
|
998
|
-
2. `patch
|
|
999
|
-
3. `patch
|
|
942
|
+
2. `patch create` creates `ho-patch/ID` from `ho-release/X.Y.Z`
|
|
943
|
+
3. `patch merge` merges `ho-patch/ID` into `ho-release/X.Y.Z` and deletes `ho-patch/ID`
|
|
1000
944
|
4. `release promote prod` merges `ho-release/X.Y.Z` into `ho-prod` and deletes `ho-release/X.Y.Z`
|
|
1001
945
|
|
|
1002
946
|
**Exception - Hotfix Branches:**
|
|
@@ -1018,9 +962,9 @@ ho-prod (main production)
|
|
|
1018
962
|
|
|
1019
963
|
**File lifecycle (normal workflow):**
|
|
1020
964
|
```
|
|
1021
|
-
patch
|
|
965
|
+
patch create → X.Y.Z-patches.toml (patch added as "candidate")
|
|
1022
966
|
↓
|
|
1023
|
-
patch
|
|
967
|
+
patch merge → X.Y.Z-patches.toml (status changed to "staged")
|
|
1024
968
|
↓
|
|
1025
969
|
├─→ promote rc → X.Y.Z-rc1.txt snapshot created
|
|
1026
970
|
│ staged patches reset to candidates
|
|
@@ -1037,7 +981,7 @@ patch close → X.Y.Z-patches.toml (status changed to "staged")
|
|
|
1037
981
|
```
|
|
1038
982
|
release hotfix → Reopens X.Y.Z-patches.toml
|
|
1039
983
|
↓
|
|
1040
|
-
patch
|
|
984
|
+
patch merge → X.Y.Z-patches.toml (adds hotfix patches as staged)
|
|
1041
985
|
↓
|
|
1042
986
|
promote hotfix → X.Y.Z-hotfixN.txt (snapshot created, TOML deleted)
|
|
1043
987
|
```
|
|
@@ -1083,12 +1027,12 @@ MAJOR.MINOR.PATCH
|
|
|
1083
1027
|
3. **Patch origin**: Must create patches from `ho-release/*` branch, not `ho-prod`
|
|
1084
1028
|
4. **Patch lifecycle**: new → candidates → close → stage → rc → prod
|
|
1085
1029
|
5. **Branch cleanup**:
|
|
1086
|
-
- `patch
|
|
1030
|
+
- `patch merge` deletes `ho-patch/*` branch
|
|
1087
1031
|
- `promote prod` deletes `ho-release/*` branch
|
|
1088
1032
|
6. **Database restore**: `patch apply` always restores from production state
|
|
1089
1033
|
7. **Immutable releases**: RC and production files never modified
|
|
1090
1034
|
8. **Automatic Git operations**: Push/pull handled by commands automatically
|
|
1091
|
-
9. **⚠️ SYSTEMATIC TEST VALIDATION**: Tests run before integration (in `patch
|
|
1035
|
+
9. **⚠️ SYSTEMATIC TEST VALIDATION**: Tests run before integration (in `patch merge`)
|
|
1092
1036
|
10. **Hotfix exception**: Can reopen production version while other releases in progress
|
|
1093
1037
|
11. **# HOTFIX marker**: Candidates file marked with `# HOTFIX` comment for hotfix releases
|
|
1094
1038
|
|
|
@@ -1109,7 +1053,7 @@ git checkout ho-release/0.17.0
|
|
|
1109
1053
|
# Solution: Create or switch to patch branch
|
|
1110
1054
|
# First ensure you're on ho-release/*
|
|
1111
1055
|
git checkout ho-release/0.17.0
|
|
1112
|
-
half_orm dev patch
|
|
1056
|
+
half_orm dev patch create <patch_id>
|
|
1113
1057
|
# or
|
|
1114
1058
|
git checkout ho-patch/<patch_id>
|
|
1115
1059
|
```
|
|
@@ -1120,7 +1064,7 @@ git checkout ho-patch/<patch_id>
|
|
|
1120
1064
|
# Solution: Patch must be created from ho-release/* branch
|
|
1121
1065
|
# to be automatically added to candidates
|
|
1122
1066
|
git checkout ho-release/0.17.0
|
|
1123
|
-
half_orm dev patch
|
|
1067
|
+
half_orm dev patch create <patch_id>
|
|
1124
1068
|
```
|
|
1125
1069
|
|
|
1126
1070
|
### Error: "Repository is not clean"
|
|
@@ -1174,7 +1118,7 @@ vim tests/test_feature.py
|
|
|
1174
1118
|
|
|
1175
1119
|
# Try again
|
|
1176
1120
|
git checkout ho-patch/123-feature
|
|
1177
|
-
half_orm dev patch
|
|
1121
|
+
half_orm dev patch merge # Tests will run again
|
|
1178
1122
|
```
|
|
1179
1123
|
|
|
1180
1124
|
### Patch apply failed (SQL error)
|
|
@@ -1216,7 +1160,7 @@ git checkout ho-prod
|
|
|
1216
1160
|
- Keep patches focused (one feature per patch)
|
|
1217
1161
|
- Commit generated code with meaningful messages
|
|
1218
1162
|
- Create release when patches are ready to integrate
|
|
1219
|
-
- Run `pytest` locally before `patch
|
|
1163
|
+
- Run `pytest` locally before `patch merge`
|
|
1220
1164
|
|
|
1221
1165
|
❌ **DON'T:**
|
|
1222
1166
|
- Mix multiple features in one patch
|
|
@@ -1314,7 +1258,7 @@ half_orm dev patch --help
|
|
|
1314
1258
|
half_orm dev release --help
|
|
1315
1259
|
|
|
1316
1260
|
# Specific command help
|
|
1317
|
-
half_orm dev patch
|
|
1261
|
+
half_orm dev patch create --help
|
|
1318
1262
|
half_orm dev release promote --help
|
|
1319
1263
|
half_orm dev update --help
|
|
1320
1264
|
half_orm dev upgrade --help
|