Skip to content

Commit

Permalink
python 12 dev (#666)
Browse files Browse the repository at this point in the history
* python 12 dev

* added py312 tests

* trigger pipeline

* more updates

* downgrade mongodb for dev to 5.0.14

---------

Co-authored-by: clemens <[email protected]>
  • Loading branch information
suisseWalter and clemens authored Sep 14, 2024
1 parent 11a7b38 commit 2582102
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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%
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
command: ["amivapi", "run", "dev"]

mongodb:
image: mongo:5.0.8
image: mongo:5.0.14
ports:
- 27017:27017
environment:
Expand Down
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2582102

Please sign in to comment.