-
Notifications
You must be signed in to change notification settings - Fork 4
UniProt Parser Refactor – Improved Modularity, Identifier Extraction, and Test Coverage #45
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
base: develop
Are you sure you want to change the base?
Conversation
3b89f65 to
2e45b47
Compare
2a781b3 to
bba5e5a
Compare
a49eea1 to
8653e2c
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #45 +/- ##
===========================================
+ Coverage 51.18% 51.75% +0.57%
===========================================
Files 59 61 +2
Lines 3048 3223 +175
===========================================
+ Hits 1560 1668 +108
- Misses 1488 1555 +67
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
72fa98f to
84f2c17
Compare
Remove .DS_Store from tests directory Fixing path problems that were preventing module import Removing `tests/` directory from under `tests` UniRef updates lint First steps towards using external IDs for CDM entities organize uniprot.py revise uniprot.py and test_uniprot.py format: apply ruff formatting to uniprot parser change the format format Regenerate uv.lock Uniprot branch file movements Fix formatting / tests / docs update uniref and test uniref reformat uniprot and uniref update uniprot.py and test any data files used by the test should go in test/data formatting uniprot.py Fix UniRef parsing tests and stabilize timestamp handling Remove large uniprot archaea test data directory style: apply Ruff formatting to uniprot-refactor-v2
06c5508 to
a84db46
Compare
This refactor introduces a cleaner, modular, and more maintainable architecture for UniProt data parsing within the cdm_data_loader_utils package. The new design separates concerns across multiple parser components, centralizes shared identifier extraction, enhances XML utilities, and adds a comprehensive test suite to ensure long-term stability.
Key improvements include:
• Modular parser structure under cdm_data_loader_utils/parsers/
• Unified shared identifier extraction (shared_identifiers.py)
• Robust XML parsing utilities (xml_utils.py)
• Refactored UniProt parser (uniprot.py) with clearer logic paths
• Complete tests for UniProt refactor, including:
• shared identifiers
• XML utilities
• UniProt entry parsing
• Cleaner directory layout aligned with CDM conventions
This refactor provides a foundation for future expansion (features, evidence, associations, and publications) while improving maintainability and reducing duplicated logic.