From c6675279f4661a7cbf285000b203ab705380810f Mon Sep 17 00:00:00 2001 From: RalfG Date: Mon, 20 Jan 2025 10:39:25 +0100 Subject: [PATCH 1/2] Remove support for Python 3.7; test support for 3.12 and 3.13 --- .github/workflows/test.yml | 2 +- pyproject.toml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index edc817c..95eb9c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/pyproject.toml b/pyproject.toml index e105ab7..39e1125 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ classifiers = [ "Development Status :: 4 - Beta", ] dynamic = ["version"] -requires-python = ">=3.7" +requires-python = ">=3.8" dependencies = [ "click", "lxml", @@ -71,8 +71,8 @@ profile = "black" [tool.black] line-length = 99 -target-version = ['py37'] +target-version = ['py38'] [tool.ruff] line-length = 99 -target-version = "py37" +target-version = "py38" From ca1dd4d5cd40805eef1b4475acf8667820f94f93 Mon Sep 17 00:00:00 2001 From: RalfG Date: Mon, 20 Jan 2025 11:00:52 +0100 Subject: [PATCH 2/2] Run idxml tests only if pyopenms is installed --- .github/workflows/test.yml | 6 +++++- tests/test_io/test_idxml.py | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 95eb9c0..cc2e358 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,7 +58,11 @@ jobs: - name: Install package and its dependencies run: | python -m pip install --upgrade pip - pip install .[dev,idxml] + pip install .[dev] + + - name: Install optional dependencies that might not be available + continue-on-error: true + run: pip install .[idxml] - name: Test imports run: python -c "import psm_utils" diff --git a/tests/test_io/test_idxml.py b/tests/test_io/test_idxml.py index 7bf1eac..dce34a0 100644 --- a/tests/test_io/test_idxml.py +++ b/tests/test_io/test_idxml.py @@ -2,11 +2,15 @@ import hashlib +import pytest + from psm_utils.io.idxml import IdXMLReader, IdXMLWriter from psm_utils.io.sage import SageTSVReader from psm_utils.peptidoform import Peptidoform from psm_utils.psm import PSM +pyopenms = pytest.importorskip("pyopenms") + class TestIdXMLReader: def test__parse_peptidoform(self):