Modernize pyMultiChange: Python 3.10+, Poetry, and CI/CD - #20
Merged
Conversation
This is a comprehensive modernization of the pyMultiChange project: **Major Changes:** - Migrated from setup.py to Poetry for package management - Updated codebase to require Python 3.10+ - Added Pydantic v2 for robust input/output validation - Configured netlib as direct GitHub dependency - Removed all Python 2 compatibility code **Testing & CI/CD:** - Removed Travis CI configuration - Added GitHub Actions workflow with multi-version testing (3.10, 3.11, 3.12) - Implemented comprehensive pytest test suite with fixtures - Added test coverage reporting - Tests for Pydantic models and main application logic **Code Quality:** - Configured Ruff for fast, modern linting - Added Pylint configuration for code quality checks - Set up MyPy for static type checking - Added type hints throughout codebase - Replaced bare except clauses with proper error handling - Modernized imports (removed __future__ imports) **Developer Experience:** - Added Makefile for common development tasks - Created comprehensive README with examples and documentation - Added py.typed marker for type checking support - Included GitHub issue and PR templates - Improved logging with proper configuration **Code Structure:** - Created pymultichange package with proper structure - Separated concerns: models.py for Pydantic models - Modernized multi_change.py with type hints and better error handling - Used pathlib instead of os.path - Proper use of queue module (no Python 2/3 compatibility hacks) **Breaking Changes:** - Minimum Python version is now 3.10 - Script now installed as 'multi-change' command via Poetry - Old bin/multi_change.py and setup.py removed https://claude.ai/code/session_01T84i3Yc4JoHK2ydKUcYm8P
- Replace Optional[X] with X | None syntax for Python 3.10+ - Remove unused imports (NoReturn, Optional, Generator) - Fix import ordering to follow Ruff/isort conventions - Separate standard library, third-party, and local imports All changes ensure compatibility with Ruff linter configuration and maintain Python 3.10+ modern syntax requirements. https://claude.ai/code/session_01T84i3Yc4JoHK2ydKUcYm8P
Add second blank line after imports as required by Ruff isort configuration (lines-after-imports = 2). This ensures proper spacing between import blocks and the rest of the code according to the project's Ruff linting standards. https://claude.ai/code/session_01T84i3Yc4JoHK2ydKUcYm8P
Update all deprecated actions to their v4 versions: - actions/cache@v3 → actions/cache@v4 - actions/upload-artifact@v3 → actions/upload-artifact@v4 - codecov/codecov-action@v3 → codecov/codecov-action@v4 This resolves the deprecation warnings from GitHub Actions and ensures compatibility with the latest runner versions. https://claude.ai/code/session_01T84i3Yc4JoHK2ydKUcYm8P
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR modernizes the pyMultiChange project by upgrading to Python 3.10+, migrating to Poetry for dependency management, implementing comprehensive code quality tooling, and establishing a robust CI/CD pipeline with GitHub Actions.
Key Changes
Project Structure & Packaging
setup.pytopyproject.tomlwith Poetry configurationbin/multi_change.pytopymultichange/package structurepy.typedmarker for PEP 561 type hint supportCode Quality & Linting
.ruff.toml) for fast linting and formatting.pylintrc) with sensible defaultsmypy.ini) for strict type checkingMakefilewith convenient development commandsType Safety & Validation
pymultichange/models.py) for:Testing Infrastructure
pyproject.tomltests/conftest.pyCI/CD Pipeline
.github/workflows/ci.yml) with:Issue Templates & Documentation
.github/ISSUE_TEMPLATE/bug_report.md).github/ISSUE_TEMPLATE/feature_request.md).github/PULL_REQUEST_TEMPLATE.md)Dependency Management
.travis.yml).gitignorewith comprehensive Python patternsmulti-changecommandCode Improvements
Notable Implementation Details
Migration Notes
Users upgrading from the old version should:
poetry installmulti-change(instead ofbin/multi_change.py)https://claude.ai/code/session_01T84i3Yc4JoHK2ydKUcYm8P