-
Notifications
You must be signed in to change notification settings - Fork 10
Add more support for typing, fix some typing-related edge case bugs #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Also fully upgraded the PD module to slqalchemy 2 paradigms and added tests.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #125 +/- ##
==========================================
+ Coverage 69.12% 70.18% +1.05%
==========================================
Files 30 30
Lines 2802 3052 +250
==========================================
+ Hits 1937 2142 +205
- Misses 865 910 +45
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds comprehensive typing support with MyPy and removes Python 3.9 compatibility. Key changes include replacing Optional and Union with modern syntax (|), adding type hints throughout the codebase, and transitioning to SQLAlchemy 2.0 patterns.
Key changes:
- Updated minimum Python version from 3.8/3.9 to 3.10
- Added MyPy type checking to the development dependencies and CI
- Replaced hash-based tests with proper unit tests for idXML functionality
- Added proper type annotations and
from __future__ import annotationsthroughout
Reviewed Changes
Copilot reviewed 35 out of 37 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_io/test_proteome_discoverer.py | Added comprehensive unit and integration tests for MSFReader class |
| tests/test_io/test_peptide_record.py | Refactored tests to use _analyze_peprec_file function instead of internal class |
| tests/test_io/test_idxml.py | Replaced hash-based file verification with proper content validation tests |
| pyproject.toml | Updated Python version requirement to 3.10+, added MyPy and type checking configuration |
| psm_utils/utils.py | Added type hints and improved type safety with from __future__ import annotations |
| psm_utils/psm_list.py | Enhanced type annotations with overloads for __getitem__ and improved typing throughout |
| psm_utils/psm.py | Added field validators and improved type hints for PSM class |
| psm_utils/peptidoform.py | Added comprehensive type hints and TypedDict for properties, improved type safety |
| psm_utils/io/xtandem.py | Added type annotations and improved error handling |
| psm_utils/io/tsv.py | Enhanced type hints and improved type safety for reader/writer classes |
| psm_utils/io/sage.py | Added type annotations and improved method signatures |
| psm_utils/io/proteoscape.py | Enhanced type hints and improved static method usage |
| psm_utils/io/proteome_discoverer.py | Migrated to SQLAlchemy 2.0 patterns with comprehensive type hints and improved documentation |
| psm_utils/io/percolator.py | Added type hints and improved error handling throughout |
| psm_utils/io/pepxml.py | Enhanced type annotations and improved metadata handling |
| psm_utils/io/peptide_record.py | Refactored to use Pydantic models and improved type safety |
| psm_utils/io/parquet.py | Added type hints and improved error handling |
| psm_utils/io/mzid.py | Enhanced type annotations and improved error handling with comprehensive typing |
| psm_utils/io/msamanda.py | Added type hints and improved error handling |
| psm_utils/io/maxquant.py | Enhanced type annotations and improved documentation |
| psm_utils/io/ionbot.py | Added comprehensive error handling and type hints |
| psm_utils/io/idxml.py | Major refactoring with proper type hints, improved error handling, and better code organization |
| psm_utils/io/fragpipe.py | Added type hints and improved method signatures |
| psm_utils/io/flashlfq.py | Enhanced type annotations and improved array type handling |
| psm_utils/io/diann.py | Added type hints and improved static method usage |
| psm_utils/io/alphadia.py | Enhanced type annotations and improved static method usage |
| psm_utils/io/_utils.py | Added type hints and improved documentation |
| psm_utils/io/_pd_msf_tables.py | Migrated to SQLAlchemy 2.0 ORM patterns with comprehensive type hints |
| psm_utils/io/_base_classes.py | Enhanced type hints and improved abstract base classes |
| psm_utils/io/init.py | Added comprehensive type annotations, TypedDict definitions, and improved documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.