diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ef078fc..fb6df95 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: # Full Python range on Linux; a single Python on macOS/Windows to catch # OS-specific issues at low runner cost. os: [ubuntu-latest] - python-version: ["3.11", "3.12", "3.13"] + python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"] include: - { os: macos-latest, python-version: "3.12" } - { os: windows-latest, python-version: "3.12" } @@ -35,6 +35,11 @@ jobs: cache: pip cache-dependency-path: pyproject.toml + # swiglpk (a cobra/optlang dependency) publishes no Python 3.15 wheel, so pip + # builds it from source, which needs the GLPK headers and SWIG. + - name: Install GLPK build dependencies + if: matrix.python-version == '3.15' + run: sudo apt-get update && sudo apt-get install -y libglpk-dev swig - name: Install run: pip install -e ".[dev,evotune]" diff --git a/examples/ecTestGEM/adapter.py b/examples/ecTestGEM/adapter.py index 13d2ef4..b914e97 100644 --- a/examples/ecTestGEM/adapter.py +++ b/examples/ecTestGEM/adapter.py @@ -21,4 +21,4 @@ def get_spontaneous_reactions(self, model: "cobra.Model") -> list[str]: # reordering by cobrapy's SBML parser. if "R4" in {r.id for r in model.reactions}: return ["R4"] - return [] \ No newline at end of file + return [] diff --git a/pyproject.toml b/pyproject.toml index efa246a..d199157 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,8 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "Topic :: Scientific/Engineering :: Bio-Informatics", ] dependencies = [ diff --git a/src/geckopy/gather_kcats/kcat_assignment.py b/src/geckopy/gather_kcats/kcat_assignment.py index 99aa80a..ad6108e 100644 --- a/src/geckopy/gather_kcats/kcat_assignment.py +++ b/src/geckopy/gather_kcats/kcat_assignment.py @@ -416,7 +416,9 @@ def _okp_method(name: str, wanted: dict[str, Any]) -> str: def _same(a: Any, b: Any) -> bool: - norm = (lambda v: v.lower() if isinstance(v, str) else (int(v) if isinstance(v, bool) else v)) + def norm(v: Any) -> Any: + return v.lower() if isinstance(v, str) else (int(v) if isinstance(v, bool) else v) + return norm(a) == norm(b) diff --git a/src/geckopy/gather_kcats/kcat_sources.py b/src/geckopy/gather_kcats/kcat_sources.py index f3437b1..eba88db 100644 --- a/src/geckopy/gather_kcats/kcat_sources.py +++ b/src/geckopy/gather_kcats/kcat_sources.py @@ -15,7 +15,6 @@ """ from __future__ import annotations -import json import logging import math import re diff --git a/tests/test_adapter.py b/tests/test_adapter.py index 13d4537..e61723a 100644 --- a/tests/test_adapter.py +++ b/tests/test_adapter.py @@ -217,7 +217,6 @@ def _schema_leaves(model_cls, prefix=""): from pydantic import BaseModel leaves = {} - instance = model_cls.model_construct() for name, field in model_cls.model_fields.items(): key = f"{prefix}{name}" annotation = field.annotation diff --git a/tests/test_conc_control_coeffs_shadow.py b/tests/test_conc_control_coeffs_shadow.py index 2eca72e..a1da508 100644 --- a/tests/test_conc_control_coeffs_shadow.py +++ b/tests/test_conc_control_coeffs_shadow.py @@ -8,7 +8,6 @@ import sys from types import SimpleNamespace -import numpy as np import pytest from geckopy.limit_proteins import get_conc_control_coeffs diff --git a/tests/test_parity_fixes_g1a.py b/tests/test_parity_fixes_g1a.py index 4a1a5b6..5b92eb2 100644 --- a/tests/test_parity_fixes_g1a.py +++ b/tests/test_parity_fixes_g1a.py @@ -1,7 +1,6 @@ """Behaviour that follows GECKO: truncate_values ties, the detail text of a kcat source file, and the defaults of fill_kcats_from_isozymes.""" import numpy as np -import pandas as pd import pytest from geckopy.ec_model.pipeline import fill_kcats_from_isozymes, set_kcat_for_reactions diff --git a/tests/test_review_fixes_r1p.py b/tests/test_review_fixes_r1p.py index 43203b4..f3a13b2 100644 --- a/tests/test_review_fixes_r1p.py +++ b/tests/test_review_fixes_r1p.py @@ -1,5 +1,4 @@ """Edge cases of get_conc_control_coeffs, fit_sigma and the docstring of fill_kcats_from_isozymes.""" -import numpy as np import pytest from geckopy.kcat_tuning import fit_sigma