From 6b4f7c81180aa6414331f3d7bb1bae3290b03145 Mon Sep 17 00:00:00 2001 From: tobias Date: Wed, 23 Oct 2019 15:00:33 +0200 Subject: [PATCH] moved everything to a new module called backend --- .idea/backend.iml | 39 --- .idea/inspectionProfiles/Project_Default.xml | 46 ---- .idea/misc.xml | 10 - .idea/modules.xml | 12 - .idea/other.xml | 6 - .idea/vcs.xml | 8 - .idea/workspace.xml | 257 ------------------ __init__.py => backend/__init__.py | 0 __main__.py => backend/__main__.py | 2 +- {api => backend/api}/__init__.py | 0 {api => backend/api}/auth_api.py | 0 {api => backend/api}/control_api.py | 0 {api => backend/api}/example_api.py | 0 {api => backend/api}/group_api.py | 0 {api => backend/api}/recorder_api.py | 0 {api => backend/api}/room_api.py | 0 {api => backend/api}/user_api.py | 0 {api => backend/api}/virtual_command_api.py | 0 {auth => backend/auth}/__init__.py | 0 {auth => backend/auth}/basic_auth.py | 0 {auth => backend/auth}/config.py | 0 {auth => backend/auth}/oidc.py | 0 {auth => backend/auth}/oidc_config.py | 0 {auth => backend/auth}/templates/login.html | 0 .../auth}/templates/login_select.html | 0 {auth => backend/auth}/utils.py | 0 config.py => backend/config.py | 0 manage.py => backend/manage.py | 0 {migrations => backend/migrations}/README | 0 .../migrations}/alembic.ini | 0 {migrations => backend/migrations}/env.py | 0 .../migrations}/script.py.mako | 0 .../migrations}/versions/b154e49921e0_.py | 0 {models => backend/models}/__init__.py | 0 {models => backend/models}/example_model.py | 0 {models => backend/models}/post_model.py | 0 {models => backend/models}/recorder_model.py | 0 {models => backend/models}/room_model.py | 0 {models => backend/models}/user_model.py | 0 .../models}/virtual_command_model.py | 0 .../recorder_adapters}/__init__.py | 0 .../recorder_adapters}/extron_smp.py | 0 .../serve_frontend.py | 2 +- {tests => backend/tests}/__init__.py | 0 {tests => backend/tests}/base.py | 0 .../tests}/extron_smp_testing.py | 0 {tests => backend/tests}/test__config.py | 0 {tests => backend/tests}/test_auth.py | 0 {tests => backend/tests}/test_user_model.py | 0 {tools => backend/tools}/__init__.py | 0 {tools => backend/tools}/model_updater.py | 0 {tools => backend/tools}/scrape_rooms.py | 0 52 files changed, 2 insertions(+), 380 deletions(-) delete mode 100644 .idea/backend.iml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/other.xml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/workspace.xml rename __init__.py => backend/__init__.py (100%) rename __main__.py => backend/__main__.py (97%) rename {api => backend/api}/__init__.py (100%) rename {api => backend/api}/auth_api.py (100%) rename {api => backend/api}/control_api.py (100%) rename {api => backend/api}/example_api.py (100%) rename {api => backend/api}/group_api.py (100%) rename {api => backend/api}/recorder_api.py (100%) rename {api => backend/api}/room_api.py (100%) rename {api => backend/api}/user_api.py (100%) rename {api => backend/api}/virtual_command_api.py (100%) rename {auth => backend/auth}/__init__.py (100%) rename {auth => backend/auth}/basic_auth.py (100%) rename {auth => backend/auth}/config.py (100%) rename {auth => backend/auth}/oidc.py (100%) rename {auth => backend/auth}/oidc_config.py (100%) rename {auth => backend/auth}/templates/login.html (100%) rename {auth => backend/auth}/templates/login_select.html (100%) rename {auth => backend/auth}/utils.py (100%) rename config.py => backend/config.py (100%) rename manage.py => backend/manage.py (100%) mode change 100755 => 100644 rename {migrations => backend/migrations}/README (100%) rename {migrations => backend/migrations}/alembic.ini (100%) rename {migrations => backend/migrations}/env.py (100%) rename {migrations => backend/migrations}/script.py.mako (100%) rename {migrations => backend/migrations}/versions/b154e49921e0_.py (100%) rename {models => backend/models}/__init__.py (100%) rename {models => backend/models}/example_model.py (100%) rename {models => backend/models}/post_model.py (100%) rename {models => backend/models}/recorder_model.py (100%) rename {models => backend/models}/room_model.py (100%) rename {models => backend/models}/user_model.py (100%) rename {models => backend/models}/virtual_command_model.py (100%) rename {recorder_adapters => backend/recorder_adapters}/__init__.py (100%) rename {recorder_adapters => backend/recorder_adapters}/extron_smp.py (100%) rename serve_frontend.py => backend/serve_frontend.py (98%) rename {tests => backend/tests}/__init__.py (100%) rename {tests => backend/tests}/base.py (100%) rename {tests => backend/tests}/extron_smp_testing.py (100%) rename {tests => backend/tests}/test__config.py (100%) rename {tests => backend/tests}/test_auth.py (100%) rename {tests => backend/tests}/test_user_model.py (100%) rename {tools => backend/tools}/__init__.py (100%) rename {tools => backend/tools}/model_updater.py (100%) rename {tools => backend/tools}/scrape_rooms.py (100%) diff --git a/.idea/backend.iml b/.idea/backend.iml deleted file mode 100644 index 2b7babe..0000000 --- a/.idea/backend.iml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index ae2d0bd..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 0d81588..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index d7d271a..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/other.xml b/.idea/other.xml deleted file mode 100644 index a708ec7..0000000 --- a/.idea/other.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index ddd5e47..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 0defc41..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1556266469460 - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/__init__.py b/backend/__init__.py similarity index 100% rename from __init__.py rename to backend/__init__.py diff --git a/__main__.py b/backend/__main__.py similarity index 97% rename from __main__.py rename to backend/__main__.py index ca2c74e..24c6ba3 100644 --- a/__main__.py +++ b/backend/__main__.py @@ -28,7 +28,7 @@ def main(): try: db.create_all() except Exception as e: - logging.CRITICAL(e) + logging.critical(e) pre_fill_table() update_recorder_models_database() diff --git a/api/__init__.py b/backend/api/__init__.py similarity index 100% rename from api/__init__.py rename to backend/api/__init__.py diff --git a/api/auth_api.py b/backend/api/auth_api.py similarity index 100% rename from api/auth_api.py rename to backend/api/auth_api.py diff --git a/api/control_api.py b/backend/api/control_api.py similarity index 100% rename from api/control_api.py rename to backend/api/control_api.py diff --git a/api/example_api.py b/backend/api/example_api.py similarity index 100% rename from api/example_api.py rename to backend/api/example_api.py diff --git a/api/group_api.py b/backend/api/group_api.py similarity index 100% rename from api/group_api.py rename to backend/api/group_api.py diff --git a/api/recorder_api.py b/backend/api/recorder_api.py similarity index 100% rename from api/recorder_api.py rename to backend/api/recorder_api.py diff --git a/api/room_api.py b/backend/api/room_api.py similarity index 100% rename from api/room_api.py rename to backend/api/room_api.py diff --git a/api/user_api.py b/backend/api/user_api.py similarity index 100% rename from api/user_api.py rename to backend/api/user_api.py diff --git a/api/virtual_command_api.py b/backend/api/virtual_command_api.py similarity index 100% rename from api/virtual_command_api.py rename to backend/api/virtual_command_api.py diff --git a/auth/__init__.py b/backend/auth/__init__.py similarity index 100% rename from auth/__init__.py rename to backend/auth/__init__.py diff --git a/auth/basic_auth.py b/backend/auth/basic_auth.py similarity index 100% rename from auth/basic_auth.py rename to backend/auth/basic_auth.py diff --git a/auth/config.py b/backend/auth/config.py similarity index 100% rename from auth/config.py rename to backend/auth/config.py diff --git a/auth/oidc.py b/backend/auth/oidc.py similarity index 100% rename from auth/oidc.py rename to backend/auth/oidc.py diff --git a/auth/oidc_config.py b/backend/auth/oidc_config.py similarity index 100% rename from auth/oidc_config.py rename to backend/auth/oidc_config.py diff --git a/auth/templates/login.html b/backend/auth/templates/login.html similarity index 100% rename from auth/templates/login.html rename to backend/auth/templates/login.html diff --git a/auth/templates/login_select.html b/backend/auth/templates/login_select.html similarity index 100% rename from auth/templates/login_select.html rename to backend/auth/templates/login_select.html diff --git a/auth/utils.py b/backend/auth/utils.py similarity index 100% rename from auth/utils.py rename to backend/auth/utils.py diff --git a/config.py b/backend/config.py similarity index 100% rename from config.py rename to backend/config.py diff --git a/manage.py b/backend/manage.py old mode 100755 new mode 100644 similarity index 100% rename from manage.py rename to backend/manage.py diff --git a/migrations/README b/backend/migrations/README similarity index 100% rename from migrations/README rename to backend/migrations/README diff --git a/migrations/alembic.ini b/backend/migrations/alembic.ini similarity index 100% rename from migrations/alembic.ini rename to backend/migrations/alembic.ini diff --git a/migrations/env.py b/backend/migrations/env.py similarity index 100% rename from migrations/env.py rename to backend/migrations/env.py diff --git a/migrations/script.py.mako b/backend/migrations/script.py.mako similarity index 100% rename from migrations/script.py.mako rename to backend/migrations/script.py.mako diff --git a/migrations/versions/b154e49921e0_.py b/backend/migrations/versions/b154e49921e0_.py similarity index 100% rename from migrations/versions/b154e49921e0_.py rename to backend/migrations/versions/b154e49921e0_.py diff --git a/models/__init__.py b/backend/models/__init__.py similarity index 100% rename from models/__init__.py rename to backend/models/__init__.py diff --git a/models/example_model.py b/backend/models/example_model.py similarity index 100% rename from models/example_model.py rename to backend/models/example_model.py diff --git a/models/post_model.py b/backend/models/post_model.py similarity index 100% rename from models/post_model.py rename to backend/models/post_model.py diff --git a/models/recorder_model.py b/backend/models/recorder_model.py similarity index 100% rename from models/recorder_model.py rename to backend/models/recorder_model.py diff --git a/models/room_model.py b/backend/models/room_model.py similarity index 100% rename from models/room_model.py rename to backend/models/room_model.py diff --git a/models/user_model.py b/backend/models/user_model.py similarity index 100% rename from models/user_model.py rename to backend/models/user_model.py diff --git a/models/virtual_command_model.py b/backend/models/virtual_command_model.py similarity index 100% rename from models/virtual_command_model.py rename to backend/models/virtual_command_model.py diff --git a/recorder_adapters/__init__.py b/backend/recorder_adapters/__init__.py similarity index 100% rename from recorder_adapters/__init__.py rename to backend/recorder_adapters/__init__.py diff --git a/recorder_adapters/extron_smp.py b/backend/recorder_adapters/extron_smp.py similarity index 100% rename from recorder_adapters/extron_smp.py rename to backend/recorder_adapters/extron_smp.py diff --git a/serve_frontend.py b/backend/serve_frontend.py similarity index 98% rename from serve_frontend.py rename to backend/serve_frontend.py index dd1d12e..3226b97 100644 --- a/serve_frontend.py +++ b/backend/serve_frontend.py @@ -11,7 +11,7 @@ from flask_pyoidc.user_session import UserSession from backend import app from backend.auth import oidc_auth -fe_path = os.path.abspath(os.path.join(app.root_path, os.pardir, "frontend", "dist")) +fe_path = os.path.abspath(os.path.join(app.root_path, os.pardir, os.pardir, "frontend", "dist")) if not os.path.exists(fe_path) or not os.path.exists(os.path.join(fe_path, "index.html")): app.logger.critical( "Frontend path and/or index.html does not exist! Please build frontend before continuing! " diff --git a/tests/__init__.py b/backend/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to backend/tests/__init__.py diff --git a/tests/base.py b/backend/tests/base.py similarity index 100% rename from tests/base.py rename to backend/tests/base.py diff --git a/tests/extron_smp_testing.py b/backend/tests/extron_smp_testing.py similarity index 100% rename from tests/extron_smp_testing.py rename to backend/tests/extron_smp_testing.py diff --git a/tests/test__config.py b/backend/tests/test__config.py similarity index 100% rename from tests/test__config.py rename to backend/tests/test__config.py diff --git a/tests/test_auth.py b/backend/tests/test_auth.py similarity index 100% rename from tests/test_auth.py rename to backend/tests/test_auth.py diff --git a/tests/test_user_model.py b/backend/tests/test_user_model.py similarity index 100% rename from tests/test_user_model.py rename to backend/tests/test_user_model.py diff --git a/tools/__init__.py b/backend/tools/__init__.py similarity index 100% rename from tools/__init__.py rename to backend/tools/__init__.py diff --git a/tools/model_updater.py b/backend/tools/model_updater.py similarity index 100% rename from tools/model_updater.py rename to backend/tools/model_updater.py diff --git a/tools/scrape_rooms.py b/backend/tools/scrape_rooms.py similarity index 100% rename from tools/scrape_rooms.py rename to backend/tools/scrape_rooms.py