Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

12 changes: 12 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Changelog
=========

Version 1.0.0 (2025-11-27)
--------------------------
* BREAKING: Dropped Python 2 support - now requires Python 3.8+
* Modernized terminal output using Rich library
* Replaced colored/colorama dependencies with rich
* Updated all output to use modern Rich markup syntax
* Improved code quality: PEP8 compliance, f-strings, context managers
* Cross-platform color support without platform-specific initialization
* Enhanced user experience with beautiful, consistent terminal output
* Migrated from setup.py to modern pyproject.toml
* See MIGRATION.md for upgrade guide

Version 0.3.22 (2015-05-05)
--------------------------
* Check git repositories from an docker container
Expand Down
122 changes: 122 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Migration Guide: Python 2 to Python 3 with Rich

This document outlines the changes made to modernize gitcheck for Python 3 and enhance terminal output with the Rich library.

## Major Changes

### 1. Build System Modernization
- **Old**: `setup.py` with manual configuration
- **New**: `pyproject.toml` following PEP 517/518 standards
- All package metadata now in standardized TOML format
- Cleaner, more maintainable configuration

### 2. Python Version Requirements
- **Old**: Python 2.7 and Python 3.3+
- **New**: Python 3.8+ only
- The `from __future__ import` statements have been removed as they're no longer needed

### 2. Dependencies Updated
- **Removed**: `colored`, `colorama`
- **Added**: `rich>=13.0.0`

### 4. Package Configuration
- **Old**: `setup.py` with custom RST processing
- **New**: `pyproject.toml` with standard metadata format
- Installation and build process remain the same for end users
- Follows modern Python packaging standards (PEP 517/518/621)

### 5. Terminal Output Modernization
All terminal output now uses the Rich library for:
- Beautiful, consistent colored output across all platforms (Windows, Linux, macOS)
- Modern markup syntax for colors and styles
- Better readability and user experience
- Automatic color detection and terminal capability handling

### 6. Code Quality Improvements
- Fixed PEP8 compliance issues
- Removed ambiguous variable names (e.g., `l` → `line`)
- Used context managers for file operations
- Modern string formatting with f-strings
- Removed Windows-specific color initialization (Rich handles this automatically)

## Migration Steps for Users

### 1. Upgrade Python
Ensure you have Python 3.8 or later:
```bash
python --version
```

### 2. Install Updated Dependencies
```bash
pip install -r requirements/base.txt
```

Or if installing from source:
```bash
pip install -e .
```

### 3. Update Custom Color Themes (Optional)
If you have a `~/mygitcheck.py` custom configuration file, update the color theme format:

**Old format** (using `colored` library):
```python
from colored import fg, bg, attr

colortheme = {
'default': attr('reset') + fg('white'),
'prjchanged': attr('reset') + attr('bold') + fg('deep_pink_1a'),
# ... etc
}
```

**New format** (using Rich markup):
```python
colortheme = {
'default': 'white',
'prjchanged': 'bold deep_pink1',
'prjremote': 'magenta',
'prjname': 'chartreuse1',
'reponame': 'light_goldenrod2',
'branchname': 'white',
'fileupdated': 'light_goldenrod2',
'remoteto': 'deep_sky_blue3',
'committo': 'violet',
'commitinfo': 'deep_sky_blue3',
'commitstate': 'deep_pink1',
}
```

Note: You no longer need to specify `'bell'` and `'reset'` keys - these are handled automatically.

## Benefits of Rich

1. **Cross-platform**: Works perfectly on Windows without special initialization
2. **Modern**: Beautiful terminal output with emoji and advanced formatting support
3. **Consistent**: Same appearance across different terminal emulators
4. **Feature-rich**: Built-in support for tables, panels, progress bars, and more
5. **Maintained**: Actively developed and widely used in the Python ecosystem

## Testing

After migration, test the tool:

```bash
# Simple test
gitcheck

# Verbose output
gitcheck -v

# Help to see all options
gitcheck -h
```

## Rollback

If you need to use the old version temporarily, check out the last Python 2 compatible commit before upgrading.

## Questions?

For issues or questions about the migration, please open an issue on GitHub.
42 changes: 0 additions & 42 deletions Makefile

This file was deleted.

Loading