From 13839f9cacfd7aaa389bf6983c5e9b98beead6af Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sun, 11 Oct 2020 13:59:19 -0700 Subject: [PATCH] Move top-level flask app from turbot/turbot.py to turbot_flask/turbot.py This is a first baby step toward teasing apart true "library" code in turbot, (which can be shared by both the Lambda and Flask implementations), from code that is Flask-specific. (For symmetry, the lambda directory is renamed turbot_lambda here as well.) --- Makefile | 2 +- turbot.wsgi.in | 2 +- turbot_flask/__init__.py | 0 {turbot => turbot_flask}/turbot.py | 0 {lambda => turbot_lambda}/lambda_function.py | 0 5 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 turbot_flask/__init__.py rename {turbot => turbot_flask}/turbot.py (100%) mode change 100755 => 100644 rename {lambda => turbot_lambda}/lambda_function.py (100%) diff --git a/Makefile b/Makefile index f3c46a1..8aaad75 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ deploy-lambda: rm -rf .deploy-lambda-source git clone . .deploy-lambda-source rm -rf .deploy-lambda-source/.git - (cd .deploy-lambda-source/lambda; zip ../turbot.zip lambda_function.py) + (cd .deploy-lambda-source/turbot_lambda; zip ../turbot.zip lambda_function.py) (cd .deploy-lambda-source; \ aws lambda update-function-code \ --profile halibut \ diff --git a/turbot.wsgi.in b/turbot.wsgi.in index 5a7c37b..7134934 100644 --- a/turbot.wsgi.in +++ b/turbot.wsgi.in @@ -7,4 +7,4 @@ load_dotenv('${DEPLOY_DIR}/.slack-creds.env') os.environ['TURBOT_DEPLOY_DIR']='${DEPLOY_DIR}' -from turbot.turbot import app as application +from turbot_flask.turbot import app as application diff --git a/turbot_flask/__init__.py b/turbot_flask/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/turbot/turbot.py b/turbot_flask/turbot.py old mode 100755 new mode 100644 similarity index 100% rename from turbot/turbot.py rename to turbot_flask/turbot.py diff --git a/lambda/lambda_function.py b/turbot_lambda/lambda_function.py similarity index 100% rename from lambda/lambda_function.py rename to turbot_lambda/lambda_function.py -- 2.43.0