From 1b398a9d2fa2dd34cfa4059d72212fbd45741f9b Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Sat, 23 Nov 2024 00:32:37 +0000 Subject: [PATCH 01/12] Updating to supported versions of python --- .github/workflows/ci.yml | 2 +- setup.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3653215..6af11d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ] + python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ] name: Python ${{ matrix.python-version }} sample steps: - uses: actions/checkout@v3 diff --git a/setup.py b/setup.py index 94aa546..1a1aafe 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ REQUIREMENTS = [ "pydantic >= 1.9.2, <2.0.0", "requests >=2.28.0, <3.0.0", - "Pillow >=9.1.1, <11.0.0" + "Pillow >=9.1.1, <=11.0.0" ] DOCS_REQUIREMENTS = [ @@ -33,7 +33,7 @@ "flake8-docstrings >=1.6.0, <2.0.0", "flake8-isort >=4.1.1, <5.0.0", "tox >=3.25.0, <4.0.0", - "Pillow >=9.1.1, <11.0.0", + "Pillow >=9.1.1, <=11.0.0", "deepdiff >=6.2.2, <7.0.0", "datamodel-code-generator >=0.17.1, <1.0.0" ] @@ -56,11 +56,11 @@ "Operating System :: OS Independent", # is this true? know Linux & OS X ok "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Internet :: WWW/HTTP", "Topic :: Multimedia :: Graphics :: Graphics Conversion", "Topic :: Software Development :: Libraries :: Python Modules", From 6cb9ccfca028ed21b53fa7dc7bf1ac92927301dc Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Sat, 23 Nov 2024 00:48:04 +0000 Subject: [PATCH 02/12] Updating doc generation to latest version --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 1a1aafe..f107818 100644 --- a/setup.py +++ b/setup.py @@ -20,9 +20,9 @@ DOCS_REQUIREMENTS = [ "mkdocs >=1.4.0, <2.0.0", - "mkdocs-material >=8.0.0, <9.0.0", - "mkdocstrings-python >=0.7.0, <1.0.0", - "griffe >=0.25.2, <1.0.0", + "mkdocs-material >=8.0.0, <10.0.0", + "mkdocstrings-python >=0.7.0, <2.0.0", + "griffe >=0.25.2, <2.0.0", "mkdocs-awesome-pages-plugin >=2.8.0, <3.0.0" ] From 50408bdff9d55eacdd4b6ba55f783bc9a08c3650 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Sat, 23 Nov 2024 01:09:11 +0000 Subject: [PATCH 03/12] Updating to latest cookbook See change: https://github.com/IIIF/cookbook-recipes/commit/72962b4d5bffff1f6e7da207182d9fd3a2d9c041 --- docs/recipes/scripts/0003-mvm-video-method1.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/recipes/scripts/0003-mvm-video-method1.py b/docs/recipes/scripts/0003-mvm-video-method1.py index 9cbed02..c8df252 100644 --- a/docs/recipes/scripts/0003-mvm-video-method1.py +++ b/docs/recipes/scripts/0003-mvm-video-method1.py @@ -15,7 +15,6 @@ hwd = {"height": 360, "width": 480, "duration": 572.034} anno_body.set_hwd(**hwd) -hwd["width"] = 640 canvas.set_hwd(**hwd) anno_page.add_item(anno) From 16d487e1ee275f0476860aa2fcff09b9077dcb51 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Sat, 23 Nov 2024 01:11:37 +0000 Subject: [PATCH 04/12] Fixing typo in html https://github.com/IIIF/cookbook-recipes/commit/74c3608263a9e146f08b10752a01e050016e45a8 --- docs/recipes/scripts/0008-rights-method1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/recipes/scripts/0008-rights-method1.py b/docs/recipes/scripts/0008-rights-method1.py index 620e8d1..4575251 100644 --- a/docs/recipes/scripts/0008-rights-method1.py +++ b/docs/recipes/scripts/0008-rights-method1.py @@ -7,7 +7,7 @@ summary="

Picture taken by the IIIF Technical Coordinator

", rights="http://creativecommons.org/licenses/by-sa/3.0/", requiredStatement=KeyValueString(label="Attribution", - value="Glen Robson, IIIF Technical Coordinator. CC BY-SA 3.0 ") + value="Glen Robson, IIIF Technical Coordinator. CC BY-SA 3.0 ") ) canvas = manifest.make_canvas_from_iiif(url="https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-gottingen", From 747d15dae4949ae0b74ba6f0f40166413010f32e Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Sat, 23 Nov 2024 01:13:10 +0000 Subject: [PATCH 05/12] Fixing mimetype https://github.com/IIIF/cookbook-recipes/commit/4d94fbbc639ccf96d2bb854f196bbefd435152a4#diff-8c40392f690b174b4196ecc8152185d88076722f024276f1670af708d9f20ea4R48 --- docs/recipes/scripts/0017-transcription-av-method1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/recipes/scripts/0017-transcription-av-method1.py b/docs/recipes/scripts/0017-transcription-av-method1.py index 1d24ec4..fa162f8 100644 --- a/docs/recipes/scripts/0017-transcription-av-method1.py +++ b/docs/recipes/scripts/0017-transcription-av-method1.py @@ -24,7 +24,7 @@ rendering = ExternalItem(id="https://fixtures.iiif.io/video/indiana/volleyball/volleyball.txt", type="Text", label="Transcript", - format="text/txt") + format="text/plain") canvas.rendering = [rendering] From 3a035e5fd1c4a461fa9846038f6d7b2e87da3736 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Sat, 23 Nov 2024 01:14:56 +0000 Subject: [PATCH 06/12] Updating deep diff --- setup.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index f107818..d688238 100644 --- a/setup.py +++ b/setup.py @@ -13,9 +13,9 @@ VERSION = "0.0.0.dev0" REQUIREMENTS = [ - "pydantic >= 1.9.2, <2.0.0", + "pydantic >= 1.9.2, <2.0.0", # potentially update to 3.0.0 https://github.com/pydantic/pydantic/releases "requests >=2.28.0, <3.0.0", - "Pillow >=9.1.1, <=11.0.0" + "Pillow >=9.1.1, <=12.0.0" ] DOCS_REQUIREMENTS = [ @@ -27,14 +27,14 @@ ] DEV_REQUIREMENTS = [ - "autopep8 >=1.6.0, <2.0.0", + "autopep8 >=1.6.0, <2.0.0", # Potentially update to 2.3.1 https://pypi.org/project/autopep8/ "isort >=5.10.1, <6.0.0", - "flake8 >=4.0.1, <5.0.0", + "flake8 >=4.0.1, <5.0.0", # Potentially update to 7.1.1 https://pypi.org/project/flake8/#history "flake8-docstrings >=1.6.0, <2.0.0", - "flake8-isort >=4.1.1, <5.0.0", - "tox >=3.25.0, <4.0.0", - "Pillow >=9.1.1, <=11.0.0", - "deepdiff >=6.2.2, <7.0.0", + "flake8-isort >=4.1.1, <5.0.0", # Potentially update to 6.1.1 https://pypi.org/project/flake8-isort/#history + "tox >=3.25.0, <4.0.0", # Potentially update to 4.23.2 https://pypi.org/project/tox/#history + "Pillow >=9.1.1, <=12.0.0", + "deepdiff >=6.2.2, <9.0.0", "datamodel-code-generator >=0.17.1, <1.0.0" ] From 0e4dfb5ebcc8638a68298f8488618538f5476b2d Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Sat, 23 Nov 2024 01:19:56 +0000 Subject: [PATCH 07/12] Updating all dev libraries --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index d688238..2059e68 100644 --- a/setup.py +++ b/setup.py @@ -27,12 +27,12 @@ ] DEV_REQUIREMENTS = [ - "autopep8 >=1.6.0, <2.0.0", # Potentially update to 2.3.1 https://pypi.org/project/autopep8/ + "autopep8 >=1.6.0, <3.0.0", "isort >=5.10.1, <6.0.0", - "flake8 >=4.0.1, <5.0.0", # Potentially update to 7.1.1 https://pypi.org/project/flake8/#history + "flake8 >=4.0.1, <8.0.0", "flake8-docstrings >=1.6.0, <2.0.0", - "flake8-isort >=4.1.1, <5.0.0", # Potentially update to 6.1.1 https://pypi.org/project/flake8-isort/#history - "tox >=3.25.0, <4.0.0", # Potentially update to 4.23.2 https://pypi.org/project/tox/#history + "flake8-isort >=4.1.1, <7.0.0", + "tox >=3.25.0, <5.0.0", "Pillow >=9.1.1, <=12.0.0", "deepdiff >=6.2.2, <9.0.0", "datamodel-code-generator >=0.17.1, <1.0.0" From 0d315ed9b1cd16381e89179879d06da333ba349d Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Sat, 23 Nov 2024 01:35:33 +0000 Subject: [PATCH 08/12] Ignoring E721 for now --- tox.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 3e11e15..9ea7859 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,13 @@ [tox] -envlist = py37, py38, py39, py310, py311, linting +envlist = py39, py310, py311, linting, py312, py313 [gh-actions] python = - 3.7: py37 - 3.8: py38 3.9: py39, linting 3.10: py310 3.11: py311 + 3.12: py312 + 3.13: py313 [testenv] commands = @@ -18,5 +18,5 @@ basepython = python3 extras = dev commands = isort . - autopep8 --in-place --recursive --exclude skeleton.py --ignore E501 . + autopep8 --in-place --recursive --exclude skeleton.py --ignore E501,E721 . flake8 From 90a8015d1f07136351448f3e26066d47acde8a04 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Sat, 23 Nov 2024 01:38:32 +0000 Subject: [PATCH 09/12] Fixing ignore E721 --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 9ea7859..804173a 100644 --- a/tox.ini +++ b/tox.ini @@ -18,5 +18,5 @@ basepython = python3 extras = dev commands = isort . - autopep8 --in-place --recursive --exclude skeleton.py --ignore E501,E721 . - flake8 + autopep8 --in-place --recursive --exclude skeleton.py --ignore E501 . + flake8 --ignore=E721 From a96ec6163d1548ad81893bbae20d7129267efc47 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Sat, 23 Nov 2024 01:44:58 +0000 Subject: [PATCH 10/12] Downgrading flake8 --- setup.py | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 2059e68..499b7e5 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ DEV_REQUIREMENTS = [ "autopep8 >=1.6.0, <3.0.0", "isort >=5.10.1, <6.0.0", - "flake8 >=4.0.1, <8.0.0", + "flake8 >=4.0.1, <7.0.0", "flake8-docstrings >=1.6.0, <2.0.0", "flake8-isort >=4.1.1, <7.0.0", "tox >=3.25.0, <5.0.0", diff --git a/tox.ini b/tox.ini index 804173a..282745c 100644 --- a/tox.ini +++ b/tox.ini @@ -19,4 +19,4 @@ extras = dev commands = isort . autopep8 --in-place --recursive --exclude skeleton.py --ignore E501 . - flake8 --ignore=E721 + flake8 From 7b89509594c003ea038e1ac95a52e14a0abd54ad Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Sat, 23 Nov 2024 01:46:41 +0000 Subject: [PATCH 11/12] Trying flake8 v6 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 499b7e5..c00f329 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ DEV_REQUIREMENTS = [ "autopep8 >=1.6.0, <3.0.0", "isort >=5.10.1, <6.0.0", - "flake8 >=4.0.1, <7.0.0", + "flake8 >=4.0.1, <6.0.0", "flake8-docstrings >=1.6.0, <2.0.0", "flake8-isort >=4.1.1, <7.0.0", "tox >=3.25.0, <5.0.0", From 33f27585a89221e445de3b0e9a0e4e57f1cf33a1 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Sat, 23 Nov 2024 01:52:48 +0000 Subject: [PATCH 12/12] Updating to latest versions of actions --- .github/workflows/PyPi.yml | 6 +++--- .github/workflows/TestPyPi.yml | 6 +++--- .github/workflows/ci.yml | 6 +++--- .github/workflows/docs.yml | 6 +++--- .github/workflows/recipes.yml | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/PyPi.yml b/.github/workflows/PyPi.yml index 83b97d9..20ce635 100644 --- a/.github/workflows/PyPi.yml +++ b/.github/workflows/PyPi.yml @@ -10,9 +10,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 @@ -25,6 +25,6 @@ jobs: run: python -m build --sdist --wheel --outdir dist/ - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@v1.8.8 + uses: pypa/gh-action-pypi-publish@v1.12.2 with: password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/TestPyPi.yml b/.github/workflows/TestPyPi.yml index aa51a55..6431923 100644 --- a/.github/workflows/TestPyPi.yml +++ b/.github/workflows/TestPyPi.yml @@ -10,9 +10,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.9 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 @@ -26,7 +26,7 @@ jobs: - name: Publish distribution 📦 to Test PyPI - uses: pypa/gh-action-pypi-publish@v1.8.8 + uses: pypa/gh-action-pypi-publish@v1.12.2 with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6af11d8..81d1989 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,14 +15,14 @@ jobs: python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ] name: Python ${{ matrix.python-version }} sample steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} architecture: x64 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ${{ env.pythonLocation }} key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-u22 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 42ef982..585ce7c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,9 +12,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout main - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip-docs key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }} @@ -38,7 +38,7 @@ jobs: # when building on push to main, publish the compiled documentation - name: Deploy built docs to github pages if: ${{ github.event_name == 'push' }} - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./site diff --git a/.github/workflows/recipes.yml b/.github/workflows/recipes.yml index 57691eb..9e4e9e3 100644 --- a/.github/workflows/recipes.yml +++ b/.github/workflows/recipes.yml @@ -9,14 +9,14 @@ jobs: test-recipes: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.9 architecture: x64 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ${{ env.pythonLocation }}