v1.5.0 - Modernise Infrastructure, Refactor Core Logic, and Introduce Numeric Validation
📋 Summary
Modernise the development infrastructure, refactor core logic for better maintainability, and expand the utility suite with new validation capabilities. Transition the project to uv for package management, introduce code complexity analysis, and refactor the retry() decorator into a robust class-based implementation.
🚀 Infrastructure Modernisation
- Package Management: Standardise on
uvfor all package management, environment synchronisation, and script execution tasks. - Dependency Consolidation: Remove the
requirements/directory andMakefilein preference for a unifiedpyproject.tomlconfiguration. - Python 3.14 Support: Update CI/CD workflows to include Python 3.14 in the test matrix, ensuring forward compatibility.
- Windows Compatibility: Fix
UnicodeEncodeErrorin CI by forcingUTF-8encoding for log output on Windows runners.
🛠️ Core Refactoring & Quality
- Retry Logic: Refactor the
retry()decorator into a helper_Retry()class, reducing cyclomatic complexity from 17 to 4 and improving modularity. - Metadata Management: Replace hardcoded version strings with dynamic retrieval via the
metadata()function, simplifying the release process. - Type Checking: Replace
mypywithtyfor faster and more consistent type checking across the codebase. - Complexity Analysis: Integrate
complexipyto automate code complexity monitoring and enforce maintainability standards.
🧪 New Validation Utilities
- Validators() Class: Introduce the
Validators()class to centralise logic for numeric range validation. - Range Checks: Implement
.value_is_between()and.all_values_are_between()methods for flexible boundary checking. - Assertion Support: Provide
.assert_value_is_between()and.assert_all_values_are_between()methods to raise descriptiveAssertionError()class exceptions.
📖 Documentation & DX
- README Overhaul: Update
README.mdwith modernised setup guides,uvworkflows, and expanded quality assurance documentation. - Docstring Standardisation: Migrate docstring formatting checks to a pre-commit hook using
docstring-format-checker. - Utility Scripts: Refactor
src/utils/scripts.pyto use dynamic package constants and improve subprocess handling.
🔍 Technical Improvements
- Type Hint Enhancements: Standardise type annotations using
Optional,Union, andLiteralfor better compatibility and clarity. - Pylint Remediation: Resolve numerous Pylint warnings and suppress specific flags where appropriate to maintain a 10/10 quality score.
- Exception Handling: Standardise exception storage and update return type hints (e.g.,
NoReturn) for better static analysis.
💪 What's Changed
Full Changelog: v1.4.1...v1.5.0