From 740671f3ac30b2d76ea7d0c573fc4fff9a71d388 Mon Sep 17 00:00:00 2001 From: DonHaul Date: Thu, 10 Oct 2024 11:52:44 +0200 Subject: [PATCH] docker & ruff: bumping python version *ref: cern-sis/issues-inspire/issues/588 --- .github/workflows/build-and-release.yml | 10 +++++----- Dockerfile | 2 +- setup.py | 6 +++--- tests/test_kbs.py | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index f1ab38a..f30de0e 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -15,17 +15,17 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install dependencies run: sudo apt-get update && sudo apt-get install poppler-utils - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Install python dependencies run: | @@ -52,7 +52,7 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/master' steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Pre-commit check diff --git a/Dockerfile b/Dockerfile index 9cb40f5..06423ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.8 +FROM python:3.11-slim-buster RUN apt update && apt install poppler-utils -y COPY setup.py setup.cfg README.rst ./ COPY refextract refextract/ diff --git a/setup.py b/setup.py index a75a1e0..017104e 100644 --- a/setup.py +++ b/setup.py @@ -46,10 +46,10 @@ tests_require = [ 'flake8-future-import~=0.0,>=0.4.4', 'flake8~=3.0,>=3.5.0', - 'pytest-cov~=2.0,>=2.10', - 'pytest~=4.0,>=4.6', + 'pytest-cov~=5.0', + 'pytest~=8.0.0', 'responses~=0.0,>=0.8.1', - 'mock>=4.0.3' + 'mock~=5.1.0' ] extras_require = { diff --git a/tests/test_kbs.py b/tests/test_kbs.py index 509ad22..c3968a5 100644 --- a/tests/test_kbs.py +++ b/tests/test_kbs.py @@ -42,7 +42,7 @@ def test_get_kbs_caches_journal_dict(): # the cache is reused, so identity of the cache elements doesn't change assert all( cached_first is cached_second for (cached_first, cached_second) - in zip(first_cache["journals"], second_cache["journals"]) + in zip(first_cache["journals"], second_cache["journals"], strict=False) ) @@ -55,7 +55,7 @@ def test_get_kbs_invalidates_cache_if_input_changes(): # the cache is invalidated, so identity of the cache elements changes assert all( cached_first is not cached_second for (cached_first, cached_second) - in zip(first_cache["journals"], second_cache["journals"]) + in zip(first_cache["journals"], second_cache["journals"], strict=False) ) assert len(second_cache["journals"]) == 3 assert second_cache["journals"][-1] == ["JOURNAL OF TESTING", "J TEST"]