diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9197d839..b56768a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.14", "3.10"] + python-version: ["3.14", "3.11"] tox-command: ["lint", "pyroma", "mypy"] steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -79,7 +79,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ["3.14", "3.10"] + python-version: ["3.14", "3.11"] steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: "Install uv" diff --git a/pyproject.toml b/pyproject.toml index 7538728d..62844aa1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,6 @@ classifiers = [ "Framework :: Sphinx", "Natural Language :: English", "Programming Language :: Python", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", @@ -54,14 +53,14 @@ license-files = [ "LICENSE", ] -requires-python = ">=3.10" +requires-python = ">=3.11" dependencies = [ "click", "tqdm", "curies>=0.13.0", "bioregistry>=0.13.0", "sssom-pydantic>=0.5.1", - "sssom-curator[web]>=0.4.0", + "sssom-curator[predict-lexical,web]>=0.5.0", ] # see https://peps.python.org/pep-0735/ and https://docs.astral.sh/uv/concepts/dependencies/#dependency-groups diff --git a/scripts/generate_vaccine_mappings.py b/scripts/generate_vaccine_mappings.py index c3e85f1f..878d3a99 100644 --- a/scripts/generate_vaccine_mappings.py +++ b/scripts/generate_vaccine_mappings.py @@ -3,6 +3,7 @@ import click import pyobo import ssslm +from bioregistry import NormalizedNamableReference from curies.vocabulary import exact_match, lexical_matching_process from pyobo.sources.cpt import iter_terms from sssom_pydantic import MappingTool, SemanticMapping @@ -20,7 +21,9 @@ def main() -> None: append_lexical_predictions("cpt", ["mesh", "vo"], mapping_tool=provenance) preds = [] - grounder: ssslm.Grounder = pyobo.get_grounder(["mesh", "vo"], versions=["2023", None]) + grounder: ssslm.Grounder[NormalizedNamableReference] = pyobo.get_grounder( + ["mesh", "vo"], versions=["2023", None] + ) for term in iter_terms(): texts = [term.name, *(s.name for s in term.synonyms)] for text in texts: diff --git a/scripts/generate_vo_mesh_mappings.py b/scripts/generate_vo_mesh_mappings.py index e463c001..37bbc7e1 100644 --- a/scripts/generate_vo_mesh_mappings.py +++ b/scripts/generate_vo_mesh_mappings.py @@ -21,7 +21,7 @@ def main() -> None: """Generate mappings from between VO and MeSH.""" - mesh_grounder = pyobo.get_grounder("mesh") + mesh_grounder: ssslm.Grounder[NormalizedNamableReference] = pyobo.get_grounder("mesh") provenance = get_script_url(__file__) graph = bioontologies.get_obograph_by_prefix("vo", check=False).guess("vo").standardize() rows = [] @@ -77,7 +77,10 @@ def main() -> None: def _ground( - grounder: ssslm.Grounder, node: Node, rows: list[SemanticMapping], provenance: str + grounder: ssslm.Grounder[NormalizedNamableReference], + node: Node, + rows: list[SemanticMapping], + provenance: str, ) -> None: if not node.reference: return None diff --git a/src/biomappings/paper_analysis.py b/src/biomappings/paper_analysis.py index 6b036ffe..ddf068a1 100644 --- a/src/biomappings/paper_analysis.py +++ b/src/biomappings/paper_analysis.py @@ -10,6 +10,7 @@ from collections.abc import Iterable, Mapping from dataclasses import dataclass from pathlib import Path +from typing import Self import bioontologies import bioregistry @@ -18,7 +19,6 @@ from bioregistry import NormalizedReference from tabulate import tabulate from tqdm.auto import tqdm -from typing_extensions import Self __all__ = [ "Result",