Repository navigation
v2.0.0
Release v2.0.0 - Major Release
🎉 Overview
This release represents a comprehensive change of the Gitlabber codebase, focusing on code quality, performance, user experience, and maintainability. This is a major version bump due to breaking changes (Python 3.11+ requirement) and significant architectural improvements.
🚀 Major Features
⚡ Parallel API Calls (4-6x Performance Improvement)
- New
--api-concurrencyoption for parallel API calls during tree building - Dramatically speeds up tree discovery for large GitLab instances (e.g., 96s → 16-21s)
- Features:
- Parallel group processing at the top level
- Parallel subgroup detail fetching (batch processing)
- Parallel subgroups and projects fetching within each group
- Automatic connection pool sizing to prevent urllib3 warnings
- Thread-safe rate limiting to respect GitLab API limits
- Configurable via
--api-concurrency N(default: 5, range: 1-20) orGITLABBER_API_CONCURRENCYenvironment variable - Optional
--api-rate-limitto set custom rate limits (default: 2000 requests/hour)
🎨 Modern CLI with Rich UI
- Migrated from argparse to Typer for modern option parsing and better help output
- Replaced tqdm with Rich for beautiful progress bars with:
- Estimated time remaining (ETA)
- Current operation details (cloning, pulling, fetching, processing)
- Multiple progress bars support
- Better visual feedback
📝 Enhanced Error Messages
- Actionable error messages with context-specific suggestions
- Custom exception hierarchy for better error handling
- Error messages now include:
- Clear description of what went wrong
- 💡 Suggestion section with actionable steps
- Links to relevant documentation where applicable
- Specific command examples to resolve issues
⚙️ Configuration Management
- Pydantic-based configuration with automatic validation
- Environment variable support for all configuration options
- Better type safety and validation
- Configuration file support (via pydantic-settings)
🔧 Code Quality Improvements
Modern Python Features
- ✅ Python 3.11+ required (dropped Python 3.9 and 3.10)
- ✅ Modern type hints (
list[str]instead ofList[str]) - ✅ Converted enums to
enum.StrEnumfor clearer string semantics - ✅ Consistent use of
pathlib.Paththroughout - ✅ Converted
GitActionto@dataclass - ✅ F-strings used consistently
Code Architecture
- ✅ Separated concerns: Split
GitlabTreeinto smaller, focused components:GitlabTreeBuilder: Builds tree structureTreeFilter: Handles filtering logic (functional approach)UrlBuilder: Centralized URL construction
- ✅ Extracted git operations into separate classes:
GitRepository: Wraps git operations for a single repoGitActionCollector: Collects git actionsGitSyncManager: Manages concurrent git operations
- ✅ Improved tree filtering: Functional approach with predicate composition
- ✅ Custom exception hierarchy for better error handling
Documentation
- ✅ Module-level docstrings added to all modules
- ✅ Comprehensive API documentation for all public classes and methods
- ✅ Created
DEVELOPMENT.mdwith architecture documentation - ✅ Enhanced
CONTRIBUTING.mdwith development guidelines
Testing
- ✅ Test coverage improved from 92% to 97%
- ✅ Added comprehensive test utilities and helpers
- ✅ Improved test organization with better fixtures
- ✅ Added e2e tests and performance tests
- ✅ Better mocking strategies
📦 Dependency Updates
Removed
- ❌
typing(built-in since Python 3.5+) - ❌
docopt(unused)
Updated
- ✅
anytree: 2.12.1 → 2.13.0 - ✅
GitPython: 3.1.44 → 3.1.45 - ✅
python-gitlab: 5.6.0 → 7.0.0 - ✅
PyYAML: 6.0.2 → 6.0.3 - ✅
tqdm: 4.67.1 → latest (replaced with rich)
Added
- ✅
rich: Modern terminal UI library - ✅
typer: Modern CLI framework - ✅
pydantic: Data validation library - ✅
pydantic-settings: Settings management
🛠️ Developer Experience
Code Quality Tools
- ✅ Pre-commit hooks with:
blackfor code formattingrufffor lintingmypyfor type checkingisortfor import sorting
Code Cleanup
- ✅ Removed all refactoring-related comments
- ✅ Clean, informative code comments
- ✅ Consistent code style throughout
📊 Performance Improvements
- 4-6x speedup for large GitLab instances with parallel API calls
- Better progress reporting with ETA
- Optimized connection pool management
🔒 Security & Robustness
- ✅ Enhanced input validation
- ✅ Better URL validation with
urllib.parse - ✅ Improved error handling with specific exceptions
- ✅ Token handling verified (no logging of sensitive data)
📋 Breaking Changes
- Python 3.11+ required (dropped Python 3.9 and 3.10)
- CLI argument parsing changed (migrated from argparse to Typer)
- Some argument formats may have changed
- Help output format is different (improved)
- Progress bar output changed (migrated from tqdm to Rich)
- Different visual appearance
- JSON output format may differ slightly
🧪 Testing
- All existing tests pass
- New tests added for:
- API concurrency functionality
- Performance benchmarks
- Error handling improvements
- Configuration validation
- E2E tests updated and documented
📚 Documentation
- ✅ Updated
README.mdandREADME.rstwith new features - ✅ Created
DEVELOPMENT.mdwith architecture docs - ✅ Enhanced
CONTRIBUTING.md - ✅ Comprehensive API documentation
🎯 Migration Guide
For Users
-
Upgrade Python: Ensure you're using Python 3.11 or newer
python --version # Should be 3.11+ -
Update Installation:
pip install --upgrade gitlabber
-
Try the New Performance Feature:
gitlabber --api-concurrency 10 # For large instances -
Environment Variables: All options can now be set via environment variables:
export GITLABBER_API_CONCURRENCY=10 export GITLABBER_API_RATE_LIMIT=3000
For Developers
- Update Python Version: Ensure your development environment uses Python 3.11+
- Install Pre-commit Hooks:
pre-commit install
- Review New Architecture: See
DEVELOPMENT.mdfor architecture changes
📈 Statistics
- Commits: 20+ commits
- Files Changed: 50+ files
- Lines Added: ~2000+
- Lines Removed: ~500+
- Test Coverage: 92% → 97%
- Dependencies Updated: 5 major updates
- New Dependencies: 4 (rich, typer, pydantic, pydantic-settings)
🙏 Acknowledgments
This release represents a significant effort to modernize the codebase while maintaining backward compatibility where possible. Special attention was paid to:
- Performance improvements for large GitLab instances
- Better user experience with improved error messages and progress reporting
- Code quality and maintainability
- Comprehensive testing
🔗 Related Issues/PRs
- Addresses comprehensive codebase improvements from
IMPROVEMENTS.md - Implements all high-priority recommendations
- Modernizes codebase for Python 3.11+.
What's Changed
- Update release.yml by @ezbz in #144
- add types by @ezbz in #145
- Sync code_improvements to main by @ezbz in #147
- document gitlabber behaviour on remote branch deletion not being able… by @ezbz in #152
Full Changelog: v1.2.8...v2.0.0