Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ name: CI

on:
push:
branches: [ dev ]
branches: [dev]
pull_request:
branches: [ dev ]
branches: [dev]

jobs:
Test:
Expand All @@ -18,12 +18,13 @@ jobs:
strategy:
fail-fast: true
matrix:
py-version-img: [
["3.9", "3.9-slim-bookworm"],
["3.10", "3.10-slim-bookworm"],
["3.11", "3.11-slim-bookworm"],
["3.12", "3.12-slim-bookworm"],
]
py-version-img:
[
["3.9", "3.9-slim-bookworm"],
["3.10", "3.10-slim-bookworm"],
["3.11", "3.11-slim-bookworm"],
["3.12", "3.12-slim-bookworm"],
]
mongodb-version: ["4.4", "5.0", "6.0", "7.0"]
mongodb-port: [12345]

Expand Down Expand Up @@ -72,7 +73,8 @@ jobs:
--build-arg PY_IMAGE=${PY_IMAGE} \
.
cd ./examples/petstore
docker-compose up --build -d
docker compose build foca-petstore-root
docker compose up -d
cd ../..
sleep 10
pytest ./tests/integration_tests.py
Expand All @@ -83,12 +85,13 @@ jobs:
strategy:
fail-fast: true
matrix:
py-version-img-tag: [
["3.9", "3.9-slim-bookworm", ""],
["3.10", "3.10-slim-bookworm", ""],
["3.11", "3.11-slim-bookworm", ""],
["3.12", "3.12-slim-bookworm", "latest"],
]
py-version-img-tag:
[
["3.9", "3.9-slim-bookworm", ""],
["3.10", "3.10-slim-bookworm", ""],
["3.11", "3.11-slim-bookworm", ""],
["3.12", "3.12-slim-bookworm", "latest"],
]

steps:
- name: Checkout Repository
Expand Down
2 changes: 1 addition & 1 deletion examples/petstore-access-control/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
context: ../../
dockerfile: docker/Dockerfile
args:
PY_IMAGE: ${PETSTORE_PY_IMAGE:-3.10-slim-buster}
PY_IMAGE: ${PETSTORE_PY_IMAGE:-3.10-slim-bookworm}
image: foca-petstore-access-control-root:latest
restart: "no"

Expand Down
13 changes: 6 additions & 7 deletions examples/petstore/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
version: '3.6'
version: "3.6"
services:

# build app image based on current FOCA root image
foca-petstore-root:
build:
context: ../../
dockerfile: docker/Dockerfile
args:
PY_IMAGE: ${PETSTORE_PY_IMAGE:-3.10-slim-buster}
PY_IMAGE: ${PETSTORE_PY_IMAGE:-3.10-slim-bookworm}
image: foca-petstore-root:latest
restart: "no"

app:
image: elixircloud/foca-petstore:latest
image: elixircloud/foca-petstore-root:latest
depends_on:
- foca-petstore-root
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
links:
- mongodb
# links:
# - mongodb
command: bash -c "python app.py"
ports:
- "80:8080"
- "8080:8080"

mongodb:
image: mongo:7.0
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
addict~=2.2
celery~=5.2
connexion~=2.11
cryptography~=42.0
cryptography~=44.0.1
Flask~=2.2
flask-authz~=2.5.1
Flask-Cors~=4.0
Flask-Cors~=6.0.0
Flask-PyMongo~=2.3
pydantic~=2.7
PyJWT~=2.4
Expand All @@ -14,4 +14,4 @@ requests~=2.31
swagger-ui-bundle~=0.0
toml~=0.10
typing~=3.7
Werkzeug~=2.2
Werkzeug~=3.1.5
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version = attr: foca.__version__

[flake8]
exclude = .git,.eggs,build,venv,env
max-line-length = 79
max-line-length = 120

[semantic_release]
; documentation: https://python-semantic-release.readthedocs.io/en/latest/configuration.html
Expand All @@ -17,4 +17,4 @@ upload_to_release = true
version_variable = foca/__init__.py:__version__

[mypy]
ignore_missing_imports = True
ignore_missing_imports = True
4 changes: 2 additions & 2 deletions tests/integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Pets,
)

PETSTORE_URL = "http://localhost:80"
PETSTORE_URL = "http://localhost:8080"
NAME_PET = "karl"
TAG_PET = "frog"
EXTRA_PARAM_ARG = "extra"
Expand Down Expand Up @@ -48,7 +48,7 @@ def test_add_pet_extra_parameter_200():
assert isinstance(response_data, Pet)
assert response_data.name == NAME_PET
assert response_data.tag == TAG_PET
assert getattr(response_data, 'extra_parameter', None) is None
assert getattr(response_data, "extra_parameter", None) is None


def test_add_pet_required_arguments_missing_400():
Expand Down