From 2582102d5b30b1eda25e452a5e067ba120be1d2e Mon Sep 17 00:00:00 2001 From: suisseWalter <42143099+suisseWalter@users.noreply.github.com> Date: Sat, 14 Sep 2024 22:03:51 +0200 Subject: [PATCH] python 12 dev (#666) * python 12 dev * added py312 tests * trigger pipeline * more updates * downgrade mongodb for dev to 5.0.14 --------- Co-authored-by: clemens --- .github/workflows/ci.yml | 8 ++++---- Dockerfile | 2 +- codecov.yml | 2 +- docker-compose.yml | 2 +- requirements.txt | 18 +++++++++--------- tox.ini | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac9acbb3..3da3c301 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,11 +10,11 @@ on: jobs: test: # Due to drop of out-of-the-box support in ubuntu-22.04 for MongoDB 5.0, - # we cannot use ubuntu-latest. + # we cannot use ubuntu-latest. have to consider this in the future. as ubuntu-20.04 will be OBSOLETE in 2025. runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['3.8', '3.10'] + python-version: ['3.10','3.12'] services: mongodb: @@ -33,7 +33,7 @@ jobs: 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 dependencies @@ -44,7 +44,7 @@ jobs: run: mongo test_amivapi --eval 'db.createUser({user:"test_user",pwd:"test_pw",roles:["readWrite"]});' - name: Test with tox run: tox - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml diff --git a/Dockerfile b/Dockerfile index bbef9dfc..64060834 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-alpine +FROM python:3.12-alpine # Create user with home directory and no password and change workdir RUN adduser -Dh /api amivapi diff --git a/codecov.yml b/codecov.yml index 8269b889..b2b63e4b 100644 --- a/codecov.yml +++ b/codecov.yml @@ -5,4 +5,4 @@ coverage: # Compares coverage to the base commit (of a pull request) and allows a # 0.1% drop of the coverage to be marked as successful. target: auto - threshold: 0.1% + threshold: 0.5% diff --git a/docker-compose.yml b/docker-compose.yml index 7a979053..c40b6d76 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,7 @@ services: command: ["amivapi", "run", "dev"] mongodb: - image: mongo:5.0.8 + image: mongo:5.0.14 ports: - 27017:27017 environment: diff --git a/requirements.txt b/requirements.txt index a4afff82..87ba96a6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,20 +1,20 @@ eve==2.1.0 # Set eve dependencies (flask, pymongo) to specific version as it is not restricted by eve itself -flask==3.0.2 -pymongo==4.5.0 +flask==3.0.3 +pymongo==4.8.0 git+https://github.com/amiv-eth/eve-swagger.git@de78e466fd34a0614d6f556a371e0ae8d973aca9#egg=Eve_Swagger # "nethz" must be installed in editable mode, otherwise some certs are not found # Wontfix: With the upcoming migration, this library will not be needed anymore -e git+https://github.com/amiv-eth/nethz.git@fcd5ced2dd365f237047748abfedb9c35a468393#egg=nethz passlib==1.7.4 -jsonschema==4.21.1 -freezegun==1.4.0 -sentry-sdk[flask]==1.43.0 +jsonschema==4.23.0 +freezegun==1.5.1 +sentry-sdk[flask]==2.14.0 beautifulsoup4==4.12.3 -Pillow==10.2.0 +Pillow==10.4.0 # Test requirements. It's not worth the hassle to keep them separate. -pytest==8.1.1 +pytest==8.3.3 pytest-cov==5.0.0 -tox==4.14.2 -flake8==7.0.0 +tox==4.18.1 +flake8==7.1.1 diff --git a/tox.ini b/tox.ini index fef5b2e8..57e93eed 100644 --- a/tox.ini +++ b/tox.ini @@ -4,12 +4,12 @@ # and then run "tox" from this directory. [tox] -envlist = py38, py310, flake8 +envlist = py38, py310, py312, flake8 [gh-actions] python = - 3.8: py38 3.10: py310, flake8 + 3.12: py312, flake8 [testenv] # `-rs` shows summary on skipped tests by default