From c808c29045efeafd736d8f4cf1b4a7d0afd7dea2 Mon Sep 17 00:00:00 2001 From: Sveinbjorn Thordarson Date: Tue, 20 Aug 2024 13:22:46 +0000 Subject: [PATCH 1/3] CI now installs wheels of tokenizer, reynir --- .github/workflows/python-package.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 90533ea..88cdede 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -26,8 +26,7 @@ jobs: - name: Install GreynirCorrect run: | python -m pip install --upgrade pip wheel setuptools pytest - python -m pip install git+https://github.com/mideind/Tokenizer#egg=tokenizer - python -m pip install git+https://github.com/mideind/GreynirPackage#egg=reynir + python -m pip install tokenizer reynir # No need to test the sentence classifier in every build (also doesn't work with PyPy) if [ "${{ matrix.python-version }}" == "3.8" ]; then python -m pip install -e ".[sentence_classifier]" From 97174e3469249e2cce64e47d6233d28ac5bac31c Mon Sep 17 00:00:00 2001 From: Sveinbjorn Thordarson Date: Wed, 7 May 2025 19:31:58 +0000 Subject: [PATCH 2/3] Updated CI config, now testing Python 3.10+ (3.9 is EOL in a few months) --- .github/workflows/python-package.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f2dbe03..816f23c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,28 +15,28 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: [ "3.9", "3.10", "3.11", "3.12", "pypy-3.9", "pypy-3.10"] + python-version: [ "3.10", "3.11", "3.12", "pypy-3.9", "pypy-3.10"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install GreynirCorrect run: | - python -m pip install --upgrade pip wheel setuptools pytest - python -m pip install tokenizer reynir + python -m pip install uv + uv pip install --system --upgrade pip wheel setuptools pytest tokenizer reynir # No need to test the sentence classifier in every build (also doesn't work with PyPy) - if [ "${{ matrix.python-version }}" == "3.9" ]; then - python -m pip install -e ".[sentence_classifier]" + if [ "${{ matrix.python-version }}" == "3.10" ]; then + uv pip install --system -e ".[sentence_classifier]" else - python -m pip install -e ".[dev]" + uv pip install --system -e ".[dev]" fi - name: Typecheck with mypy run: | - if [ "${{ matrix.python-version }}" == "3.9" ]; then python -m pip install mypy; fi - if [ "${{ matrix.python-version }}" == "3.9" ]; then mypy --ignore-missing-imports --python-version=3.9 src/reynir_correct; fi + if [ "${{ matrix.python-version }}" == "3.10" ]; then python -m pip install mypy; fi + if [ "${{ matrix.python-version }}" == "3.10" ]; then mypy --ignore-missing-imports --python-version=3.9 src/reynir_correct; fi - name: Test with pytest run: | python -m pytest From ffc3f68fcf4b0bfaf73233b05a0ed29e14ca5e2b Mon Sep 17 00:00:00 2001 From: Sveinbjorn Thordarson Date: Wed, 7 May 2025 19:36:25 +0000 Subject: [PATCH 3/3] Only test CPython 3.9 and 3.13, PyPy 3.9 and 3.10, explicitly mark as supporting 3.13 in metadata --- .github/workflows/python-package.yml | 10 +++++----- pyproject.toml | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 816f23c..4ad8f0f 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: [ "3.10", "3.11", "3.12", "pypy-3.9", "pypy-3.10"] + python-version: [ "3.9", "3.13", "pypy-3.9", "pypy-3.10"] steps: - uses: actions/checkout@v4 @@ -26,17 +26,17 @@ jobs: - name: Install GreynirCorrect run: | python -m pip install uv - uv pip install --system --upgrade pip wheel setuptools pytest tokenizer reynir + uv pip install --system --upgrade wheel setuptools pytest tokenizer reynir # No need to test the sentence classifier in every build (also doesn't work with PyPy) - if [ "${{ matrix.python-version }}" == "3.10" ]; then + if [ "${{ matrix.python-version }}" == "3.9" ]; then uv pip install --system -e ".[sentence_classifier]" else uv pip install --system -e ".[dev]" fi - name: Typecheck with mypy run: | - if [ "${{ matrix.python-version }}" == "3.10" ]; then python -m pip install mypy; fi - if [ "${{ matrix.python-version }}" == "3.10" ]; then mypy --ignore-missing-imports --python-version=3.9 src/reynir_correct; fi + if [ "${{ matrix.python-version }}" == "3.9" ]; then python -m pip install mypy; fi + if [ "${{ matrix.python-version }}" == "3.9" ]; then mypy --ignore-missing-imports --python-version=3.9 src/reynir_correct; fi - name: Test with pytest run: | python -m pytest diff --git a/pyproject.toml b/pyproject.toml index 48f2b6f..5d104db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules",