Commit 797fb3d
fix(results): support pyOpenMS 3.5.0 IdXMLFile.load signature (#32)
Loading any idXML on the cluster failed with:
Exception: can not handle type of ('..._comet.idXML', [], [])
pyOpenMS 3.5.0 changed the third parameter of IdXMLFile.load()/store()
from a libcpp_vector[PeptideIdentification], which accepted an ordinary
Python list, to a dedicated PeptideIdentificationList container. Passing
a list there matches no overload, so autowrap's dispatcher raises before
any file I/O happens. protein_ids is unaffected and still takes a list.
Bisected across locally installed releases: 3.1.0, 3.2.0, 3.3.0, 3.4.0
and 3.4.1 all accept a list; 3.5.0 does not. requirements.txt pins
pyopenms==3.5.0 and Dockerfile builds OpenMS release/3.5.0, so deployed
images hit this on every results page, while dev environments still on
3.3.x do not.
Add load_idxml() in results_helpers, which feature-detects
PeptideIdentificationList and normalises the result back to a plain list,
and route the three call sites through it. Feature detection rather than
a version check keeps the app working on 3.4.x and earlier too.
IdXMLFile is no longer referenced in WorkflowTest, so drop the import.
Verified end-to-end against a generated idXML on 3.1.0, 3.3.0, 3.4.0
(legacy list path) and 3.5.0 (new container), all yielding identical
parsed output. The added regression tests reproduce the exact production
error message when the fix is reverted.
Claude-Session: https://claude.ai/code/session_016Qn3mLqr7zBr7rgCokx6ku
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 87c0449 commit 797fb3d
3 files changed
Lines changed: 98 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
1636 | 1635 | | |
1637 | 1636 | | |
1638 | 1637 | | |
1639 | | - | |
1640 | | - | |
1641 | | - | |
| 1638 | + | |
1642 | 1639 | | |
1643 | 1640 | | |
1644 | 1641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
16 | | - | |
17 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
18 | 31 | | |
19 | | - | |
| 32 | + | |
20 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
21 | 40 | | |
22 | 41 | | |
23 | 42 | | |
| |||
99 | 118 | | |
100 | 119 | | |
101 | 120 | | |
102 | | - | |
103 | | - | |
104 | | - | |
| 121 | + | |
105 | 122 | | |
106 | 123 | | |
107 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
0 commit comments