π Git-Centric Workflow Now Available!
half-orm-dev now features a modern Git-centric workflow that enables parallel development, automatic conflict detection, and intelligent branch management.
New in this version:
- π Parallel development on multiple versions simultaneously
- π Immediate version reservation to prevent conflicts
- π§ Intelligent rebase warnings with actionable suggestions
- πΏ Automatic maintenance branches for long-term support
- π§Ή Smart cleanup of merged and tagged branches
- β 100% backward compatibility with existing workflows
Status: Production-ready with comprehensive test coverage (147+ tests)
half-orm-dev now supports modern Git workflows while maintaining full compatibility with existing projects.
Multiple developers can work on different versions simultaneously:
# Developer A
half_orm dev prepare -l minor -m "Add user authentication"
# β
Creates and reserves hop_1.3.0 immediately
# Developer B (at the same time)
half_orm dev prepare -l minor -m "Add API endpoints"
# β
Automatically creates hop_1.4.0 (no conflicts!)
No more coordination overhead - versions are reserved instantly:
half_orm dev prepare -l patch -m "Fix critical bug"
# β
Creates hop_1.2.1 branch
# π Immediately pushes to origin to reserve version
# π₯ Team sees work in progress instantly
Get contextual warnings when branches need attention:
half_orm dev apply
# β οΈ WARNING: hop_1.2.3 is behind remote
# π‘ Consider rebasing: git rebase origin/hop_1.2.3
#
# β οΈ WARNING: hop_1.2.x has advanced
# π‘ Consider rebasing against maintenance: git rebase hop_1.2.x
Long-term support branches created automatically:
half_orm dev release # Releasing 1.3.0
# β
Created maintenance branch: hop_1.3.x
# π Available for future patches on 1.3.x line
- Python 3.8+
- PostgreSQL database
- Git repository (local or remote)
pip install half_orm_dev
half_orm dev new myproject --full
cd myproject
half_orm dev new myproject
# No HOP metadata tables, just code sync
# 1. Prepare a new release (reserves version immediately)
half_orm dev prepare -l minor -m "Add new feature"
# Creates hop_1.3.0 and pushes to origin
# 2. Develop your feature
# Edit database schema, add migrations
# Code is automatically synchronized
# 3. Apply and test
half_orm dev apply
# Applies patches and updates Python code
# 4. Release when ready
half_orm dev release
# Tags release and creates maintenance branch
The new workflow uses Git Flow-inspired branching:
hop_main ββββββββββββββββ 1.3.0 ββββββββ 1.4.0
β β β
β hop_1.3.x ββ 1.3.1 ββ€
β β
hop_1.2.x ββ 1.2.4 ββ 1.2.5 ββββββββββββββ
hop_main
: Latest stable releasehop_X.Y.Z
: Development branches for specific versionshop_X.Y.x
: Maintenance branches for patch series
After running half_orm dev new myproject --full
:
myproject/
βββ Backups/ # Database backups
βββ myproject/ # Generated Python package
β βββ __init__.py
β βββ ho_dataclasses.py # Dataclass definitions
β βββ public/ # Schema modules
βββ Patches/ # Database migrations
β βββ pre/ # Pre-patch scripts
β βββ post/ # Post-patch scripts
β βββ X/Y/Z/ # Version-specific patches
βββ .hop/ # HOP configuration
βββ README.md
βββ setup.py
βββ Pipfile
# Prepare new release
half_orm dev prepare -l <level> -m "<message>"
# Levels: patch, minor, major
# Apply current release
half_orm dev apply
# Release current version
half_orm dev release -p # -p to push
# Undo last release
half_orm dev undo
# Apply pending releases
half_orm dev upgrade
# Restore to specific release
half_orm dev restore <version>
# Synchronize Python code with database
half_orm dev sync-package
Existing half-orm-dev projects continue to work without changes. New Git-centric features activate automatically when beneficial.
- Keep existing workflow - everything works as before
- Start using
half_orm dev prepare
- gets immediate version reservation - Adopt parallel development - multiple versions simultaneously
- Leverage maintenance branches - long-term support capabilities
The project includes comprehensive test coverage:
# Run all tests
pytest
# Run specific test levels
cd tests
python ordered_test_runner.py 1 # Git foundations
python ordered_test_runner.py 2 # Branch classification
python ordered_test_runner.py 3 # Conflict detection
python ordered_test_runner.py 4 # Git actions
python ordered_test_runner.py 5 # Advanced logic
python ordered_test_runner.py 6 # Workflow integration
Configure in /etc/half_orm/myproject
or ~/.halform/myproject
:
[database]
name = myproject
user = username
password = password
host = localhost
port = 5432
production = false
HOP automatically detects and configures Git remotes. For private repositories:
git remote add origin <your-repo-url>
# HOP will automatically configure the remote
half_orm dev prepare
now pushes immediately (security improvement)- New branch naming conventions (feature enhancement)
- Simplified CHANGELOG format (implementation detail)
- Existing commands work unchanged
- Automatic detection of legacy vs. new workflow
- Migration script for CHANGELOG format conversion
# Error: Version conflict! hop_1.2.3 already exists
# Solution: Another developer is working on this version
half_orm dev prepare -l patch -m "Different message" # Creates 1.2.4
# Warning: hop_1.2.3 is behind remote
git fetch origin
git rebase origin/hop_1.2.3
# Manual cleanup of old branches
half_orm dev upgrade # In production - auto-cleanup
- Git-Centric Workflow Guide - Detailed workflow documentation
- Migration Guide - Upgrading from legacy workflow
- Best Practices - Team collaboration patterns
- API Reference - Complete command reference
We welcome contributions! The project uses a test-driven development approach:
- Write tests first - All new features require comprehensive tests
- Progressive implementation - Features are built level by level
- Backward compatibility - Existing functionality must be preserved
- Documentation - All changes require documentation updates
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- Built on halfORM - PostgreSQL to Python object mapper
- Inspired by Git Flow and modern Git workflows
- Test-driven development methodology
Need Help?
- π Check the documentation
- π Report issues
- π¬ Join discussions