Skip to content

fix parsing pepxml with none of the standard scores#148

Merged
RalfG merged 3 commits into
mainfrom
hotfix/pepxml
Jun 5, 2026
Merged

fix parsing pepxml with none of the standard scores#148
RalfG merged 3 commits into
mainfrom
hotfix/pepxml

Conversation

@paretje

@paretje paretje commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

If nothing was found, we return the first element as fallback. However, dict_keys isn't subscriptable, resulting in issue compomics/ms2rescore#258 when none of the standard search engine scores were found. Making this a list fixes this.

However, if the order isn't significant (the order of the keys will be the order of insertion in current (C?)Python implementations, the order of the set would de-facto be according to the order of the hashes) we could also use a set here, and then use score_keys.pop() as fallback instead of score_keys[0].

If nothing was found, we return the first element as fallback. However,
score_keys isn't subscriptable, resulting in issue #258 when none of the
standard search engine scores were found. Making this a list fixes this.

However, if the order isn't significant (the order of the keys will
be the order of insertion in current (C?)Python implementations, the
order of the set would de-facto be according to the order of the hashes)
we could also use a set here, and then use `score_keys.pop()` as
fallback instead of `score_keys[0]`.
@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.01%. Comparing base (17db867) to head (fa6246c).

Files with missing lines Patch % Lines
psm_utils/io/pepxml.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #148   +/-   ##
=======================================
  Coverage   72.01%   72.01%           
=======================================
  Files          32       32           
  Lines        3248     3248           
=======================================
  Hits         2339     2339           
  Misses        909      909           
Flag Coverage Δ
unittests 72.01% <0.00%> (ø)

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

☔ View full report in Codecov by Harness.
📢 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 added this to the v1.5.5 milestone Jun 5, 2026
@RalfG RalfG added the bug Something isn't working label Jun 5, 2026
@RalfG RalfG merged commit cfc1c55 into main Jun 5, 2026
6 of 7 checks passed
@RalfG RalfG deleted the hotfix/pepxml branch June 5, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

2 participants