diff --git a/.github/workflows/cogstack-es_main.yml b/.github/workflows/cogstack-es_main.yml index 8c8b4a181..6da2e5490 100644 --- a/.github/workflows/cogstack-es_main.yml +++ b/.github/workflows/cogstack-es_main.yml @@ -22,7 +22,7 @@ jobs: contents: read strategy: matrix: - python-version: [ '3.10', '3.11', '3.12', '3.13' ] + python-version: [ '3.11', '3.12', '3.13' ] max-parallel: 4 steps: @@ -46,7 +46,7 @@ jobs: contents: read strategy: matrix: - python-version: [ '3.10', '3.11', '3.12', '3.13' ] + python-version: [ '3.11', '3.12', '3.13' ] install-target: [ "ES9", "ES8", "OS", ] max-parallel: 4 @@ -80,7 +80,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v7 with: - python-version: '3.10' + python-version: '3.11' - name: Install dependencies run: | @@ -104,4 +104,4 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: repository_url: https://test.pypi.org/legacy/ - packages_dir: cogstack-es/dist \ No newline at end of file + packages_dir: cogstack-es/dist diff --git a/.github/workflows/cogstack-es_release.yml b/.github/workflows/cogstack-es_release.yml index c280a8693..c8deb61db 100644 --- a/.github/workflows/cogstack-es_release.yml +++ b/.github/workflows/cogstack-es_release.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v7 with: - python-version: '3.10' + python-version: '3.11' - name: Install dependencies run: | diff --git a/.github/workflows/medcat-den_main.yml b/.github/workflows/medcat-den_main.yml index 35a62bfcf..f59cde22f 100644 --- a/.github/workflows/medcat-den_main.yml +++ b/.github/workflows/medcat-den_main.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.10', '3.11', '3.12' ] + python-version: [ '3.11', '3.12' ] max-parallel: 4 steps: - uses: actions/checkout@v7 @@ -58,7 +58,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v7 with: - python-version: '3.10' + python-version: '3.11' - name: Install dependencies run: | diff --git a/.github/workflows/medcat-den_release.yml b/.github/workflows/medcat-den_release.yml index d1035aa90..a5e510260 100644 --- a/.github/workflows/medcat-den_release.yml +++ b/.github/workflows/medcat-den_release.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v7 with: - python-version: '3.10' + python-version: '3.11' - name: Install dependencies run: | diff --git a/.github/workflows/medcat-embedding-linker_ci.yml b/.github/workflows/medcat-embedding-linker_ci.yml index 852c7daa7..24483d767 100644 --- a/.github/workflows/medcat-embedding-linker_ci.yml +++ b/.github/workflows/medcat-embedding-linker_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.10', '3.11', '3.12' ] + python-version: [ '3.11', '3.12' ] max-parallel: 4 steps: - uses: actions/checkout@v7 @@ -57,10 +57,10 @@ jobs: fetch-depth: 0 # fetch all history fetch-tags: true # fetch tags explicitly - - name: Install uv for Python 3.10 + - name: Install uv for Python 3.11 uses: astral-sh/setup-uv@v7 with: - python-version: '3.10' + python-version: '3.11' enable-cache: true - name: Install dependencies @@ -90,10 +90,10 @@ jobs: - name: Checkout main uses: actions/checkout@v7 - - name: Install uv for Python 3.10 + - name: Install uv for Python 3.11 uses: astral-sh/setup-uv@v7 with: - python-version: '3.10' + python-version: '3.11' enable-cache: true - name: Install dependencies diff --git a/.github/workflows/medcat-gliner_ci.yml b/.github/workflows/medcat-gliner_ci.yml index a091a8cac..e615e0c21 100644 --- a/.github/workflows/medcat-gliner_ci.yml +++ b/.github/workflows/medcat-gliner_ci.yml @@ -27,7 +27,7 @@ jobs: timeout-minutes: 30 strategy: matrix: - python-version: [ '3.10', '3.11', '3.12', '3.13' ] + python-version: [ '3.11', '3.12', '3.13' ] max-parallel: 4 steps: @@ -68,10 +68,10 @@ jobs: fetch-depth: 0 # fetch all history fetch-tags: true # fetch tags explicitly - - name: Install uv for Python 3.10 + - name: Install uv for Python 3.11 uses: astral-sh/setup-uv@v7 with: - python-version: '3.10' + python-version: '3.11' enable-cache: true - name: Set timestamp-based dev version @@ -101,10 +101,10 @@ jobs: - name: Checkout main uses: actions/checkout@v7 - - name: Install uv for Python 3.10 + - name: Install uv for Python 3.11 uses: astral-sh/setup-uv@v7 with: - python-version: '3.10' + python-version: '3.11' enable-cache: true - name: Install dependencies diff --git a/.github/workflows/medcat-llm-components_ci.yml b/.github/workflows/medcat-llm-components_ci.yml index 7ecd8d564..8d8dadc9c 100644 --- a/.github/workflows/medcat-llm-components_ci.yml +++ b/.github/workflows/medcat-llm-components_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.10', '3.11', '3.12' ] + python-version: [ '3.11', '3.12' ] max-parallel: 4 steps: - uses: actions/checkout@v7 @@ -57,10 +57,10 @@ jobs: fetch-depth: 0 # fetch all history fetch-tags: true # fetch tags explicitly - - name: Install uv for Python 3.10 + - name: Install uv for Python 3.11 uses: astral-sh/setup-uv@v7 with: - python-version: '3.10' + python-version: '3.11' enable-cache: true - name: Install dependencies @@ -90,10 +90,10 @@ jobs: - name: Checkout main uses: actions/checkout@v7 - - name: Install uv for Python 3.10 + - name: Install uv for Python 3.11 uses: astral-sh/setup-uv@v7 with: - python-version: '3.10' + python-version: '3.11' enable-cache: true - name: Install dependencies diff --git a/.github/workflows/medcat-performance-estimator_ci.yml b/.github/workflows/medcat-performance-estimator_ci.yml index 2a50736c1..59edfdd4a 100644 --- a/.github/workflows/medcat-performance-estimator_ci.yml +++ b/.github/workflows/medcat-performance-estimator_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.10', '3.11', '3.12' ] + python-version: [ '3.11', '3.12' ] max-parallel: 4 steps: - uses: actions/checkout@v7 @@ -57,10 +57,10 @@ jobs: fetch-depth: 0 # fetch all history fetch-tags: true # fetch tags explicitly - - name: Install uv for Python 3.10 + - name: Install uv for Python 3.11 uses: astral-sh/setup-uv@v7 with: - python-version: '3.10' + python-version: '3.11' enable-cache: true - name: Install dependencies @@ -90,10 +90,10 @@ jobs: - name: Checkout main uses: actions/checkout@v7 - - name: Install uv for Python 3.10 + - name: Install uv for Python 3.11 uses: astral-sh/setup-uv@v7 with: - python-version: '3.10' + python-version: '3.11' enable-cache: true - name: Install dependencies diff --git a/.github/workflows/medcat-scripts_main.yml b/.github/workflows/medcat-scripts_main.yml index 14730b691..070f8255b 100644 --- a/.github/workflows/medcat-scripts_main.yml +++ b/.github/workflows/medcat-scripts_main.yml @@ -19,7 +19,7 @@ jobs: contents: read strategy: matrix: - python-version: [ '3.10', '3.11', '3.12', '3.13' ] + python-version: [ '3.11', '3.12', '3.13' ] max-parallel: 4 steps: - uses: actions/checkout@v7 diff --git a/.github/workflows/medcat-trainer_ci.yml b/.github/workflows/medcat-trainer_ci.yml index 90964486d..5c6431963 100644 --- a/.github/workflows/medcat-trainer_ci.yml +++ b/.github/workflows/medcat-trainer_ci.yml @@ -30,7 +30,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v7 with: - python-version: "3.10" + python-version: "3.11" - name: Install dependencies run: | diff --git a/.github/workflows/medcat-transformer-ner-ci.yml b/.github/workflows/medcat-transformer-ner-ci.yml index 4e86b37bd..41945ccf1 100644 --- a/.github/workflows/medcat-transformer-ner-ci.yml +++ b/.github/workflows/medcat-transformer-ner-ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.10', '3.11', '3.12' ] + python-version: [ '3.11', '3.12' ] max-parallel: 4 steps: - uses: actions/checkout@v7 @@ -57,10 +57,10 @@ jobs: fetch-depth: 0 # fetch all history fetch-tags: true # fetch tags explicitly - - name: Install uv for Python 3.10 + - name: Install uv for Python 3.11 uses: astral-sh/setup-uv@v7 with: - python-version: '3.10' + python-version: '3.11' enable-cache: true - name: Install dependencies @@ -90,10 +90,10 @@ jobs: - name: Checkout main uses: actions/checkout@v7 - - name: Install uv for Python 3.10 + - name: Install uv for Python 3.11 uses: astral-sh/setup-uv@v7 with: - python-version: '3.10' + python-version: '3.11' enable-cache: true - name: Install dependencies diff --git a/.github/workflows/medcat-v1_main.yml b/.github/workflows/medcat-v1_main.yml index cae3bd854..b49f2cb17 100644 --- a/.github/workflows/medcat-v1_main.yml +++ b/.github/workflows/medcat-v1_main.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.10', '3.11', '3.12' ] + python-version: [ '3.11', '3.12' ] max-parallel: 4 steps: @@ -107,10 +107,10 @@ jobs: ref: 'main' fetch-depth: 0 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v7 with: - python-version: "3.10" + python-version: "3.11" - name: Install pypa/build run: >- diff --git a/.github/workflows/medcat-v1_production.yml b/.github/workflows/medcat-v1_production.yml index 4ebbbaaa4..c8cc568d9 100644 --- a/.github/workflows/medcat-v1_production.yml +++ b/.github/workflows/medcat-v1_production.yml @@ -29,10 +29,10 @@ jobs: ref: ${{ github.event.release.target_commitish }} fetch-depth: 0 - - name: Set up Python 3.10 + - name: Set up Python 3.11 uses: actions/setup-python@v7 with: - python-version: "3.10" + python-version: "3.11" - name: Run UATs run: | diff --git a/cogstack-es/pyproject.toml b/cogstack-es/pyproject.toml index 34f67d4a9..ea80afd33 100644 --- a/cogstack-es/pyproject.toml +++ b/cogstack-es/pyproject.toml @@ -9,13 +9,12 @@ description = "ElasticSearch or OpenSearch wrapper for CogStack deployments" readme = "ReadMe.md" authors = [{ name = "Mart Ratas", email = "mart.ratas@kcl.ac.uk" }] license = { text = "Apache-2.0" } -requires-python = ">=3.10" +requires-python = ">=3.11" classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", diff --git a/medcat-addons/gliner/pyproject.toml b/medcat-addons/gliner/pyproject.toml new file mode 100644 index 000000000..44d1dd40d --- /dev/null +++ b/medcat-addons/gliner/pyproject.toml @@ -0,0 +1,61 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel", "setuptools_scm>=8"] +build-backend = "setuptools.build_meta" + +[project] +name = "medcat_gliner" +dynamic = ["version"] +description = "" +readme = "README.md" +license = { text = "Apache-2.0" } +authors = [ + { name="Mart Ratas", email="mart.ratas@kcl.ac.uk" } +] +requires-python = ">=3.11" + +keywords = ["NLP", "NER", "medical", "MedCAT", "gliner"] + +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "License :: OSI Approved :: Apache Software License" +] + +dependencies = [ + "medcat", +] + +[project.optional-dependencies] +dev = [ + "ruff", + "mypy", +] + +# entry-points to add onto medcat +[project.entry-points."medcat.addons"] +ner_gliner = "medcat_gliner" + +[project.urls] +Homepage = "https://github.com/CogStack/medcat-ops/tree/main/medcat-gliner" +Repository = "https://github.com/CogStack/medcat-ops/tree/main/medcat-gliner" +Issues = "https://github.com/CogStack/medcat-ops/issues" + +[tool.setuptools_scm] +root = ".." +tag_regex = "^medcat-gliner/v(?P[0-9]+(?:\\.[0-9]+)*)$" +version_scheme = "guess-next-dev" +local_scheme = "no-local-version" + +[tool.setuptools] +packages = ["my_addon"] + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +"medcat_gliner" = ["py.typed"] diff --git a/medcat-den/pyproject.toml b/medcat-den/pyproject.toml index 577698dae..6cd2ee3a9 100644 --- a/medcat-den/pyproject.toml +++ b/medcat-den/pyproject.toml @@ -11,7 +11,7 @@ license = { text = "Apache-2.0" } authors = [ { name="Mart Ratas", email="mart.ratas@kcl.ac.uk" } ] -requires-python = ">=3.10" +requires-python = ">=3.11" keywords = ["NLP", "medical", "MedCAT", "model-registry"] @@ -20,7 +20,6 @@ classifiers = [ "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "License :: OSI Approved :: Apache Software License" diff --git a/medcat-plugins/embedding-linker/pyproject.toml b/medcat-plugins/embedding-linker/pyproject.toml index 4c8ba71df..8816326bd 100644 --- a/medcat-plugins/embedding-linker/pyproject.toml +++ b/medcat-plugins/embedding-linker/pyproject.toml @@ -7,7 +7,7 @@ description = "Embeddings based linker for MedCAT" readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" license = {text = "Apache-2.0"} @@ -40,7 +40,6 @@ classifiers = [ # that you indicate you support Python 3. These classifiers are *not* # checked by "pip install". See instead "python_requires" below. "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", diff --git a/medcat-plugins/llm-comps/pyproject.toml b/medcat-plugins/llm-comps/pyproject.toml index 7a1b61095..07fcbdf99 100644 --- a/medcat-plugins/llm-comps/pyproject.toml +++ b/medcat-plugins/llm-comps/pyproject.toml @@ -11,7 +11,7 @@ license = { text = "Apache-2.0" } authors = [ { name="Mart Ratas", email="mart.ratas@kcl.ac.uk" } ] -requires-python = ">=3.10" +requires-python = ">=3.11" keywords = ["MedCAT"] @@ -20,7 +20,6 @@ classifiers = [ "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", diff --git a/medcat-plugins/medcat-gliner/pyproject.toml b/medcat-plugins/medcat-gliner/pyproject.toml index d70d42321..f66fd1af8 100644 --- a/medcat-plugins/medcat-gliner/pyproject.toml +++ b/medcat-plugins/medcat-gliner/pyproject.toml @@ -11,7 +11,7 @@ license = { text = "Apache-2.0" } authors = [ { name="Mart Ratas", email="mart.ratas@kcl.ac.uk" } ] -requires-python = ">=3.10" +requires-python = ">=3.11" keywords = ["NLP", "NER", "medical", "MedCAT", "gliner"] @@ -20,7 +20,6 @@ classifiers = [ "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", @@ -30,9 +29,6 @@ classifiers = [ dependencies = [ "medcat>=2.5", "gliner", - # transitive dependency of gliner that `uv` pins to and - # doesn't work in python 3.10 - "onnxruntime<1.24; python_version < '3.11'", ] [project.optional-dependencies] diff --git a/medcat-plugins/performance-estimator/pyproject.toml b/medcat-plugins/performance-estimator/pyproject.toml index 69c11b572..8118cda72 100644 --- a/medcat-plugins/performance-estimator/pyproject.toml +++ b/medcat-plugins/performance-estimator/pyproject.toml @@ -11,7 +11,7 @@ license = { text = "Apache-2.0" } authors = [ { name="Mart Ratas", email="mart.ratas@kcl.ac.uk" } ] -requires-python = ">=3.10" +requires-python = ">=3.11" keywords = ["MedCAT"] @@ -20,7 +20,6 @@ classifiers = [ "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", diff --git a/medcat-plugins/performance-estimator/src/medcat_performance_estimator/common.py b/medcat-plugins/performance-estimator/src/medcat_performance_estimator/common.py index 7e14e298a..da2e91736 100644 --- a/medcat-plugins/performance-estimator/src/medcat_performance_estimator/common.py +++ b/medcat-plugins/performance-estimator/src/medcat_performance_estimator/common.py @@ -6,13 +6,13 @@ class, and estimator protocol without any of them depending on each other. It should stay a leaf module (no imports from elsewhere in this package). """ -from enum import Enum +from enum import StrEnum from typing import Protocol, TypedDict, runtime_checkable from pydantic import BaseModel, ConfigDict -class ActionTier(str, Enum): +class ActionTier(StrEnum): A = "A" # High performance / Minimal tuning needed B = "B" # Moderate performance / Needs targeted coverage C = "C" # Poor performance / High-priority for annotation & tuning diff --git a/medcat-plugins/performance-estimator/src/medcat_performance_estimator/estimation.py b/medcat-plugins/performance-estimator/src/medcat_performance_estimator/estimation.py index 7aa7f9e43..a5b4b46fa 100644 --- a/medcat-plugins/performance-estimator/src/medcat_performance_estimator/estimation.py +++ b/medcat-plugins/performance-estimator/src/medcat_performance_estimator/estimation.py @@ -17,7 +17,7 @@ looks itself up in `per_stage_configs`, not just the top-level `estim_type`. """ from collections.abc import Callable -from enum import Enum +from enum import StrEnum from typing import cast from medcat.cat import CAT @@ -40,7 +40,7 @@ from .training_fetcher import CDBTrainingFetcher -class EstimationType(str, Enum): +class EstimationType(StrEnum): STAGE1 = "stage1" STAGE2 = "stage2" CALIBRATED = "calibrated" diff --git a/medcat-plugins/transformer-ner/pyproject.toml b/medcat-plugins/transformer-ner/pyproject.toml index b67777390..69e445814 100644 --- a/medcat-plugins/transformer-ner/pyproject.toml +++ b/medcat-plugins/transformer-ner/pyproject.toml @@ -7,7 +7,7 @@ description = "Transformer based NER for MedCAT" readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" license = {text = "Apache-2.0"} @@ -40,7 +40,6 @@ classifiers = [ # that you indicate you support Python 3. These classifiers are *not* # checked by "pip install". See instead "python_requires" below. "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", diff --git a/medcat-service/docs/pyproject.toml b/medcat-service/docs/pyproject.toml index 3245ce467..33992df14 100644 --- a/medcat-service/docs/pyproject.toml +++ b/medcat-service/docs/pyproject.toml @@ -3,7 +3,7 @@ name = "medcat-trainer-documentation" version = "0.1.0" description = "MedCAT Service Documentation" readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" dependencies = [ "mkdocs-material>=9.7.0", "termynal>=0.13.1", diff --git a/medcat-trainer/client/pyproject.toml b/medcat-trainer/client/pyproject.toml index ebbe9d280..1a0358053 100644 --- a/medcat-trainer/client/pyproject.toml +++ b/medcat-trainer/client/pyproject.toml @@ -7,7 +7,7 @@ name = "medcattrainer-client" version = "1.4.0" description = "Python client for interacting with a MedCATTrainer instance" readme = "client/README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" license = { file = "LICENSE" } authors = [{ name = "Tom Searle", email = "tom@cogstack.org" }] dependencies = ["requests"] diff --git a/medcat-trainer/docs/pyproject.toml b/medcat-trainer/docs/pyproject.toml index 77349a6f7..0f0875bc4 100644 --- a/medcat-trainer/docs/pyproject.toml +++ b/medcat-trainer/docs/pyproject.toml @@ -3,7 +3,7 @@ name = "medcat-trainer-documentation" version = "0.1.0" description = "MedCAT Trainer Documentation" readme = "README.md" -requires-python = ">=3.10" +requires-python = ">=3.11" dependencies = [ "mkdocs-material>=9.7.7", "termynal>=0.13.1", diff --git a/medcat-trainer/webapp/pyproject.toml b/medcat-trainer/webapp/pyproject.toml index 6c9919bfc..205827e3f 100644 --- a/medcat-trainer/webapp/pyproject.toml +++ b/medcat-trainer/webapp/pyproject.toml @@ -2,10 +2,9 @@ name = "medcattrainer-webapp" version = "1.0.0" description = "MedCATtrainer Django web application" -requires-python = ">=3.10" +requires-python = ">=3.11" license = { text = "Apache-2.0" } dependencies = [ - "scipy>=1.7.0,<1.14; python_version < '3.13'", # pin for py<3.13 so macOS arm64 gets pre-built wheels "uwsgi>=2.0,<3", "Django>=5.2.18,<6", "django-filter>=25.2", diff --git a/medcat-tutorials/pyproject.toml b/medcat-tutorials/pyproject.toml index ed5643307..1bdf54da4 100644 --- a/medcat-tutorials/pyproject.toml +++ b/medcat-tutorials/pyproject.toml @@ -2,7 +2,7 @@ name = "medcat-v2-documentation" version = "0.1.0" description = "MedCAT v2 Documentation" -requires-python = ">=3.10" +requires-python = ">=3.11" dependencies = [ "mkdocs-api-autonav>=0.4.0", "mkdocs-material>=9.7.0",