Skip to content

Commit

Permalink
Upgrade to psm_utils v0.9, which now uses Pydantic v2
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfG committed May 2, 2024
1 parent 37ba9db commit 2a947ee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions ms2rescore/parse_psms.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ def parse_psms(config: Dict, psm_list: Union[PSMList, None]) -> PSMList:
new_ids = [_match_psm_ids(old_id, pattern) for old_id in psm_list["spectrum_id"]]
psm_list["spectrum_id"] = new_ids

# TODO: Temporary fix until implemented in psm_utils
# Ensure that spectrum IDs are strings (Pydantic 2.0 does not coerce int to str)
psm_list["spectrum_id"] = [str(spec_id) for spec_id in psm_list["spectrum_id"]]

return psm_list


Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ dependencies = [
"numpy>=1.16.0; python_version != '3.11'",
"pandas>=1.0",
"plotly>=5",
"psm_utils>=0.8",
"pydantic>=1.8.2,<2", # Fix compatibility with v2 in psm_utils
"psm_utils>=0.9",
"pyteomics>=4.1.0, <4.7",
"rich>=12",
"tomli>=2; python_version < '3.11'",
Expand Down

0 comments on commit 2a947ee

Please sign in to comment.