From 2a947eec1583b9517625a099c62645e31112663f Mon Sep 17 00:00:00 2001 From: RalfG Date: Thu, 2 May 2024 14:11:06 +0200 Subject: [PATCH] Upgrade to psm_utils v0.9, which now uses Pydantic v2 --- ms2rescore/parse_psms.py | 4 ---- pyproject.toml | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/ms2rescore/parse_psms.py b/ms2rescore/parse_psms.py index 78348f7..7c6b045 100644 --- a/ms2rescore/parse_psms.py +++ b/ms2rescore/parse_psms.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 1afaf0d..5213e18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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'",