diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 4365257..9f9fc29 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -45,14 +45,19 @@ jobs: pip install . pip install -r requirements_dev.txt - name: Deploy app - run: docker-compose up -d --build + run: docker compose up -d --build - name: Wait for app startup - run: sleep 20 + run: | + for i in $(seq 1 24); do + sleep 5; curl localhost:8080 -so /dev/null && break; + docker compose ps; + echo "Retrying ($i) in 5 seconds..."; + done - name: Run integration tests shell: bash run: pytest tests/test_integration - name: Tear down app - run: docker-compose down + run: docker compose down publish: name: Build and publish app image runs-on: ubuntu-latest diff --git a/pro_tes/ga4gh/tes/models.py b/pro_tes/ga4gh/tes/models.py index a9bdb2c..6aa1e92 100644 --- a/pro_tes/ga4gh/tes/models.py +++ b/pro_tes/ga4gh/tes/models.py @@ -38,7 +38,7 @@ class TesCreateTaskResponse(CustomBaseModel): class TesExecutor(CustomBaseModel): image: str = Field( - default=[""], + default="", description=( "Name of the container image. The string will be passed as " " the image\nargument to the containerization run command. " @@ -626,7 +626,7 @@ class TesTask(CustomBaseModel): ) resources: Optional[TesResources] = None executors: list[TesExecutor] = Field( - default=[TesExecutor], + default=[TesExecutor()], description=( "An array of executors to be run. Each of the executors " " will run one\nat a time sequentially. Each executor is a" diff --git a/pro_tes/gunicorn.py b/pro_tes/gunicorn.py index 2e8b33b..0c6ed85 100644 --- a/pro_tes/gunicorn.py +++ b/pro_tes/gunicorn.py @@ -17,7 +17,7 @@ forwarded_allow_ips = "*" # pylint: disable=invalid-name # Set Gunicorn bind address -bind = f"{app_config.server.host}:{app_config.server.port}" +bind = f"{app_config.server.host}:{app_config.server.port}" # pylint: disable=C0103 # noqa: E501 # Source environment variables for Gunicorn workers raw_env = [ diff --git a/pro_tes/tasks/track_task_progress.py b/pro_tes/tasks/track_task_progress.py index 09b6fa0..156d2b9 100644 --- a/pro_tes/tasks/track_task_progress.py +++ b/pro_tes/tasks/track_task_progress.py @@ -26,7 +26,7 @@ ignore_result=True, track_started=True, ) -def task__track_task_progress( # pylint: disable=too-many-arguments +def task__track_task_progress( # pylint: disable=too-many-arguments,R0917 self, # pylint: disable=unused-argument worker_id: str, remote_host: str, diff --git a/requirements.txt b/requirements.txt index 983ac80..ead6931 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ celery-types>=0.20.0 connexion>=2.11.2,<3 foca>=0.12.1 geopy>=2.2.0 -gunicorn>=20.1.0,<21 +gunicorn>=22 ip2geotools>=0.1.6 py-tes>=0.4.2 pytest-ordering>=0.6 @@ -10,3 +10,4 @@ types-PyYAML>=6.0.12 types-requests>=2.28.5 types-simplejson>=3.17.7 types-urllib3>=1.26.17 +pymongo==4.8.0 diff --git a/requirements_dev.txt b/requirements_dev.txt index 6674972..347e998 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -7,5 +7,5 @@ mypy>=0.990 pylint>=2.15.5 pytest>=7.2.0 python-semantic-release>=7.32.2 -mypy>=1.8.0 -types-python-dateutil>=2.8.19.20240106 \ No newline at end of file +mypy==1.14.1 +types-python-dateutil>=2.8.19.20240106