diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 4b4777512..f7c8a9966 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -61,7 +61,7 @@ jobs: timeout-minutes: 15 strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] name: test on Python ${{ matrix.python-version }} steps: - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 @@ -95,6 +95,12 @@ jobs: # download the small English pretrained spaCy model needed by spacy analyzer poetry run python -m spacy download en_core_web_sm --upgrade-strategy only-if-needed fi + # For Python 3.12: + if [[ ${{ matrix.python-version }} == '3.12' ]]; then + poetry install -E "fasttext yake voikko spacy"; + # download the small English pretrained spaCy model needed by spacy analyzer + poetry run python -m spacy download en_core_web_sm --upgrade-strategy only-if-needed + fi poetry run python -m nltk.downloader punkt - name: Test with pytest run: | diff --git a/README.md b/README.md index 8bb1bcaa3..d55cae1c5 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ already functional for many common tasks. Annif is developed and tested on Linux. If you want to run Annif on Windows or Mac OS, the recommended way is to use Docker (see below) or a Linux virtual machine. -You will need Python 3.9+ to install Annif. +You will need Python 3.9-3.12 to install Annif. The recommended way is to install Annif from [PyPI](https://pypi.org/project/annif/) into a virtual environment. diff --git a/pyproject.toml b/pyproject.toml index e41f4c1c1..48d2b3c43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers = [ ] [tool.poetry.dependencies] -python = ">=3.9,<3.12" +python = ">=3.9,<3.13" connexion = { version = "~3.0.5", extras = ["flask", "uvicorn", "swagger-ui"] } click = "8.1.*" @@ -51,12 +51,12 @@ huggingface-hub = "0.22.*" fasttext-wheel = { version = "0.9.2", optional = true } voikko = { version = "0.5.*", optional = true } -tensorflow-cpu = { version = "2.15.*", optional = true } +tensorflow-cpu = { version = "2.15.*", optional = true, python = "<3.12" } lmdb = { version = "1.4.1", optional = true } omikuji = { version = "0.5.*", optional = true } yake = { version = "0.4.8", optional = true } spacy = { version = "3.7.*", optional = true } -stwfsapy = { version = "0.4.*", optional = true } +stwfsapy = { version = "0.4.*", optional = true, python = "<3.12" } [tool.poetry.dev-dependencies] py = "*"