From cf66a0d0d057216b44edb38ddbfb05ebef0f6c63 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 7 Oct 2021 14:35:46 +0300 Subject: [PATCH] move brackets and rename launcher --- app/api/infobases.py | 2 +- brackets.py => app/brackets.py | 0 pub1c-rest.py => run.py | 0 run.sh | 2 +- tests/test_pub1c-rest.py | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) rename brackets.py => app/brackets.py (100%) rename pub1c-rest.py => run.py (100%) diff --git a/app/api/infobases.py b/app/api/infobases.py index e3c1c2c..c03fe01 100644 --- a/app/api/infobases.py +++ b/app/api/infobases.py @@ -4,7 +4,7 @@ from flask_restful import Resource from app.glob import get_config, get_manager from app.manager import infobase_data_blank -from brackets import get_infobases as br_get_infobases +from app.brackets import get_infobases as br_get_infobases def load_infobases(config) -> List[str]: diff --git a/brackets.py b/app/brackets.py similarity index 100% rename from brackets.py rename to app/brackets.py diff --git a/pub1c-rest.py b/run.py similarity index 100% rename from pub1c-rest.py rename to run.py diff --git a/run.sh b/run.sh index e9be8ef..6a533a0 100644 --- a/run.sh +++ b/run.sh @@ -4,4 +4,4 @@ cd "$( dirname "$0" )" || exit . venv/bin/activate -gunicorn --bind 0.0.0.0:18333 pub1c-rest:app +gunicorn --bind 0.0.0.0:18333 run:app diff --git a/tests/test_pub1c-rest.py b/tests/test_pub1c-rest.py index 73932db..fd18090 100644 --- a/tests/test_pub1c-rest.py +++ b/tests/test_pub1c-rest.py @@ -43,7 +43,7 @@ def temp_config(tmpdir) -> str: @pytest.fixture def flask_app(temp_config) -> Flask: os.environ['WEBPUB1C_CONFIG'] = temp_config - pub1c = importlib.import_module('pub1c-rest') + pub1c = importlib.import_module('run') return pub1c.app