From 24528b597de25b6df44907ddd9976d71dbf90534 Mon Sep 17 00:00:00 2001
From: thomaswoehlke <thomas.woehlke@gmail.com>
Date: Fri, 5 Feb 2021 14:07:52 +0100
Subject: [PATCH] dev for Milestone 0.0.14

---
 MANIFEST.in         | 3 +++
 config.py           | 1 +
 covid19/__init__.py | 4 ++--
 database.py         | 1 +
 run_web.sh          | 5 +++--
 setup.py            | 2 +-
 6 files changed, 11 insertions(+), 5 deletions(-)
 create mode 100644 MANIFEST.in

diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 00000000..6404832a
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,3 @@
+graft covid19/static
+graft covid19/templates
+global-exclude *.pyc
\ No newline at end of file
diff --git a/config.py b/config.py
index b56c00dd..d065cb83 100644
--- a/config.py
+++ b/config.py
@@ -8,3 +8,4 @@ SECRET_KEY='vfdjv423ndf654&%%'
 APP_DEBUGGER_ACTIVE = True
 CELERY_CONF_WORKER_SEND_TASK_EVENTS = True
 CELERY_CONF_TASK_SEND_SENT_EVENT = True
+PORT = 9090
diff --git a/covid19/__init__.py b/covid19/__init__.py
index 5f450b30..758c1343 100644
--- a/covid19/__init__.py
+++ b/covid19/__init__.py
@@ -1,4 +1,4 @@
-from database import app, run_run_with_debug
+from database import app, run_run_with_debug, port
 
 import covid19.views
 
@@ -13,4 +13,4 @@ if __name__ == '__main__':
     app.logger.info("#                Covid19 Data - WEB                         #")
     app.logger.info("#############################################################")
     app.logger.info(" ")
-    app.run(debug=run_run_with_debug)
+    app.run(debug=run_run_with_debug, port=port)
diff --git a/database.py b/database.py
index b0062d5b..63948271 100644
--- a/database.py
+++ b/database.py
@@ -7,6 +7,7 @@ from logging.config import dictConfig
 app = Flask('app')
 CORS(app)
 app.config.from_object("config")
+port = app.config['PORT']
 ITEMS_PER_PAGE = app.config['ITEMS_PER_PAGE']
 DB_URL = 'postgresql+psycopg2://{user}:{pw}@{url}/{db}'.format(
     user=app.config['POSTGRES_USER'],
diff --git a/run_web.sh b/run_web.sh
index d2e5e485..eef92e06 100755
--- a/run_web.sh
+++ b/run_web.sh
@@ -1,10 +1,11 @@
 #!/usr/bin/env bash
 
+. venv/bin/activate
 #export FLASK_ENV=development
 #export FLASK_APP=covid19python
 #pip install -e .
 #flask run
 
-. venv/bin/activate
-python covid19
+
+python covid19.__init__
 
diff --git a/setup.py b/setup.py
index de10179b..8255c9d2 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,4 @@
-from setuptools import setup, find_packages
+from setuptools import find_packages, setup
 
 setup(
     name='covid19python',
-- 
GitLab