From 90de4c2a53e787bced7923d5db2a0dd12109761b Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Fri, 15 Mar 2019 00:47:03 -0400 Subject: [PATCH] Make app dependencies more explicit (#160) * Remove tornado dependency * Switch to PyPI version of kombu * Ensure pip gets re-built if venv is deleted --- .gitignore | 1 - docker/app/Dockerfile | 2 +- makefile | 12 ++++++------ requirements-prod.txt | 1 - requirements.txt | 4 ++-- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index e1e05211..53fb152a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,5 @@ venv*/ .coverage cover/ .mypy_cache/ -requirements.txt.out serviceprincipal.json diff --git a/docker/app/Dockerfile b/docker/app/Dockerfile index dcfddae6..b15b5b92 100644 --- a/docker/app/Dockerfile +++ b/docker/app/Dockerfile @@ -30,7 +30,7 @@ RUN groupadd -r opwen \ USER opwen ENV TESTING_UI="False" -ENV CONNEXION_SERVER="tornado" +ENV CONNEXION_SERVER="flask" ENV CONNEXION_SPEC="SET_ME" ENV SERVER_WORKERS="1" ENV QUEUE_WORKERS="1" diff --git a/makefile b/makefile index d3321a58..190ac39b 100644 --- a/makefile +++ b/makefile @@ -4,13 +4,13 @@ py_env=venv .PHONY: venv tests default: ci -requirements.txt.out: requirements.txt requirements-dev.txt requirements-prod.txt - if [ ! -d $(py_env) ]; then python3 -m venv $(py_env) && $(py_env)/bin/pip install -U pip wheel | tee requirements.txt.out; fi - $(py_env)/bin/pip install -r requirements.txt | tee requirements.txt.out - $(py_env)/bin/pip install -r requirements-dev.txt | tee requirements.txt.out - $(py_env)/bin/pip install -r requirements-prod.txt | tee requirements.txt.out +$(py_env)/requirements.txt.out: requirements.txt requirements-dev.txt requirements-prod.txt + if [ ! -d $(py_env) ]; then python3 -m venv $(py_env) && $(py_env)/bin/pip install -U pip wheel | tee $(py_env)/requirements.txt.out; fi + $(py_env)/bin/pip install -r requirements.txt | tee $(py_env)/requirements.txt.out + $(py_env)/bin/pip install -r requirements-dev.txt | tee $(py_env)/requirements.txt.out + $(py_env)/bin/pip install -r requirements-prod.txt | tee $(py_env)/requirements.txt.out -venv: requirements.txt.out +venv: $(py_env)/requirements.txt.out tests: venv $(py_env)/bin/coverage run -m nose2 && $(py_env)/bin/coverage report diff --git a/requirements-prod.txt b/requirements-prod.txt index 29656d71..707f019d 100644 --- a/requirements-prod.txt +++ b/requirements-prod.txt @@ -1,3 +1,2 @@ azure-servicebus==0.50.0 gunicorn==19.9.0 -tornado==6.0.1 diff --git a/requirements.txt b/requirements.txt index c0aba8c1..7d6e441d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ https://github.com/CatalystCode/libcloud/archive/1037_fix-azurite.zip applicationinsights==0.11.7 beautifulsoup4==4.7.1 cached-property==1.5.1 -connexion[swagger-ui]==2.2.0 +connexion[flask,swagger-ui]==2.2.0 environs==4.1.0 msgpack==0.6.1 pyzmail36==1.0.4 @@ -11,6 +11,6 @@ requests==2.21.0 sendgrid==5.6.0 typing-extensions==3.7.2 typing==3.6.6 -https://github.com/celery/kombu/archive/483cadced77d82a6ecd0be553b91ce92f04f9617.zip +kombu==4.4.0 celery==4.2.1 xtarfile[zstd]==0.0.2