From 076d4c352759b37614426f42a3a5defed8ef5eaf Mon Sep 17 00:00:00 2001 From: ltenorio Date: Mon, 8 Jul 2024 15:45:52 +0200 Subject: [PATCH 1/2] freeze all deps --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 272f1918..7ab919bf 100644 --- a/setup.py +++ b/setup.py @@ -29,14 +29,14 @@ install_requires = [ "portalocker~=2.6.0", "networkx<=2.6.3", "scipy~=1.11.4", - "python-dotenv", + "python-dotenv~=1.0.1", "autosubmitconfigparser>=1.0.65", "autosubmit>=3.13", - "Flask-APScheduler", - "gunicorn", + "Flask-APScheduler~=1.13.1", + "gunicorn~=22.0.0", "pydantic~=2.5.2", "SQLAlchemy~=2.0.23", - "python-cas>=1.6.0" + "python-cas~=1.6.0" ] # Test dependencies -- GitLab From 5556757b0cf05af59b3657a7304d7f18fc10a059 Mon Sep 17 00:00:00 2001 From: ltenorio Date: Thu, 11 Jul 2024 09:50:45 +0200 Subject: [PATCH 2/2] add multiversion test docker --- docker/multiversion-test/Dockerfile | 59 +++++++++++++++++++++++++++++ docker/multiversion-test/test.sh | 5 +++ 2 files changed, 64 insertions(+) create mode 100644 docker/multiversion-test/Dockerfile create mode 100755 docker/multiversion-test/test.sh diff --git a/docker/multiversion-test/Dockerfile b/docker/multiversion-test/Dockerfile new file mode 100644 index 00000000..02768e1b --- /dev/null +++ b/docker/multiversion-test/Dockerfile @@ -0,0 +1,59 @@ +# Dockerfile to test Autosubmit API in different Python versions + +# Test Python 3.9 +FROM python:3.9-slim-bullseye as test39 + +ARG AUTOSUBMIT_ROOT_DIR=/app/autosubmit/ +WORKDIR "${AUTOSUBMIT_ROOT_DIR}" + +RUN apt-get update && apt-get install -y git graphviz gcc lsof + +# Install Autosubmit API +ARG GIT_REF="main" +RUN git clone https://earth.bsc.es/gitlab/es/autosubmit-api.git . && \ + git checkout ${GIT_REF} +RUN pip install -e .[all] + +RUN pytest + +# Test Python 3.10 +FROM python:3.10-slim-bullseye as test310 + +ARG AUTOSUBMIT_ROOT_DIR=/app/autosubmit/ +WORKDIR "${AUTOSUBMIT_ROOT_DIR}" + +RUN apt-get update && apt-get install -y git graphviz gcc lsof + +COPY --from=test39 /app/autosubmit/ /app/autosubmit/ + +RUN pip install -e .[all] + +RUN pytest + +# Test Python 3.11 +FROM python:3.11-slim-bullseye as test311 + +ARG AUTOSUBMIT_ROOT_DIR=/app/autosubmit/ +WORKDIR "${AUTOSUBMIT_ROOT_DIR}" + +RUN apt-get update && apt-get install -y git graphviz gcc lsof + +COPY --from=test310 /app/autosubmit/ /app/autosubmit/ + +RUN pip install -e .[all] + +RUN pytest + +# Test Python 3.12 +FROM python:3.12-slim-bullseye as test312 + +ARG AUTOSUBMIT_ROOT_DIR=/app/autosubmit/ +WORKDIR "${AUTOSUBMIT_ROOT_DIR}" + +RUN apt-get update && apt-get install -y git graphviz gcc lsof + +COPY --from=test311 /app/autosubmit/ /app/autosubmit/ + +RUN pip install -e .[all] + +RUN pytest \ No newline at end of file diff --git a/docker/multiversion-test/test.sh b/docker/multiversion-test/test.sh new file mode 100755 index 00000000..9168c760 --- /dev/null +++ b/docker/multiversion-test/test.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Build the docker image and then remove it + +docker build -t multiversion-test . && docker rmi multiversion-test \ No newline at end of file -- GitLab