Skip to content

Conversation

@RalfG
Copy link
Member

@RalfG RalfG commented Dec 22, 2025

Fixed

@RalfG RalfG added this to the v1.5.1 milestone Dec 22, 2025
@RalfG RalfG requested a review from Copilot December 22, 2025 13:38
@RalfG RalfG added bug Something isn't working io labels Dec 22, 2025
Copy link

Copilot AI left a 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 PR addresses three specific issues in the io modules for percolator and pepxml file handling, improving robustness and fixing missing functionality.

  • Fixed missing ScanNr values when using write_file in PercolatorTabWriter
  • Fixed missing style argument when checking PercolatorTabWriter's write_psm support
  • Enhanced PepXMLReader robustness to handle optional/missing parameters in pepXML files

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
psm_utils/io/percolator.py Added ScanNr assignment in write_file method to ensure each PSM gets a sequential scan number
psm_utils/io/pepxml.py Added KNOWN_METADATA_KEYS constant and refactored _parse_psm to safely handle missing optional fields (metadata, provenance data, proteins, rank, score) using .get() methods and dictionary comprehensions
psm_utils/io/init.py Added writer-specific kwargs to provide required 'style' parameter when testing PercolatorTabWriter's write_psm support

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RalfG RalfG force-pushed the fix/various-io-fixes branch from e2fa3e5 to e9e3b94 Compare December 22, 2025 15:27
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 44.11765% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.01%. Comparing base (19a657d) to head (07e6544).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
psm_utils/io/idxml.py 65.00% 7 Missing ⚠️
psm_utils/io/__init__.py 0.00% 4 Missing ⚠️
psm_utils/io/percolator.py 0.00% 4 Missing ⚠️
psm_utils/io/peptide_record.py 0.00% 2 Missing ⚠️
psm_utils/io/pepxml.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
- Coverage   72.23%   72.01%   -0.23%     
==========================================
  Files          32       32              
  Lines        3224     3245      +21     
==========================================
+ Hits         2329     2337       +8     
- Misses        895      908      +13     
Flag Coverage Δ
unittests 72.01% <44.11%> (-0.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RalfG RalfG merged commit 8e4a9d4 into main Dec 22, 2025
5 checks passed
@RalfG RalfG deleted the fix/various-io-fixes branch December 22, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working io

Development

Successfully merging this pull request may close these issues.

ms2pip feature generator file identification

2 participants