Commit 4ac01e9
authored
Modernization and cleanup (#86)
This PR completely restructures the MediaFile library from a single
monolithic file into a modular, maintainable package architecture. The
core functionality remains unchanged while improving code organization,
readability, and future maintainability.
## **Architectural Restructuring**
- **Split monolithic `mediafile.py`** (2342 lines) into logical modules:
- `mediafile/__init__.py` - Main MediaFile class and public API
- `mediafile/constants.py` - Constants and enums (TYPES, ImageType)
- `mediafile/exceptions.py` - Custom exception hierarchy
- `mediafile/fields.py` - Field descriptor classes (MediaField,
DateField, etc.)
- `mediafile/storage/` - Format-specific storage strategies
- `mediafile/utils/` - Utility functions and helpers
## **Build System & Dependencies**
- **Updated to modern Python packaging** with `pyproject.toml`
- **Dropped Python 3.7 and 3.8 support** - now requires Python ≥3.9
- **Updated dependency specifications** and modernized build
configuration
- **Removed Tox** in favor of plain GitHub Actions for testing
- **New version**: `1.0.0-alpha.1` - reflecting the significant
architectural changes
- **Coverage**: Code test coverage is now uploaded as artifact (maybe we
want to switch to codecov at some point)File tree
20 files changed
+2567
-2353
lines changed- mediafile
- storage
- utils
- test
20 files changed
+2567
-2353
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments