From 52399f413ca4e8754dc14645d8f1f3af14e24d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Wed, 24 Jul 2019 15:50:41 +0200 Subject: [PATCH] Simplify package structure --- Dockerfile | 6 ++--- lib/tao/config/__init__.py | 1 - lib/tao/config/envvars.py | 3 --- lib/tfw/config/__init__.py | 1 - lib/tfw/config/envvars.py | 3 --- lib/tfw/internals/__init__.py | 0 setup.py | 26 +++++++++---------- {lib/tao => tfw}/__init__.py | 0 {lib/tfw => tfw/components}/__init__.py | 0 .../components/frontend/__init__.py | 0 .../components/frontend/frontend_handler.py | 0 .../components/frontend/message_sender.py | 0 .../components/frontend/message_storage.py | 0 {lib/tfw => tfw}/components/fsm/__init__.py | 0 .../tfw => tfw}/components/fsm/fsm_handler.py | 0 .../tfw => tfw}/components/fsm/fsm_updater.py | 0 {lib/tfw => tfw}/components/ide/__init__.py | 0 .../components/ide/file_manager/__init__.py | 0 .../ide/file_manager/file_manager.py | 0 .../ide/file_manager/test_file_manager.py | 0 .../tfw => tfw}/components/ide/ide_handler.py | 0 .../components/pipe_io/__init__.py | 0 .../components/pipe_io/pipe_io_handler.py | 0 .../pipe_io/pipe_io_server/__init__.py | 0 .../pipe_io/pipe_io_server/deque.py | 0 .../components/pipe_io/pipe_io_server/pipe.py | 0 .../pipe_io/pipe_io_server/pipe_io_server.py | 0 .../pipe_io_server/pipe_reader_thread.py | 0 .../pipe_io_server/pipe_writer_thread.py | 0 .../terminate_process_on_failure.py | 0 .../components/process_management/__init__.py | 0 .../log_inotify_observer.py | 0 .../process_management/process_handler.py | 0 .../process_management/process_log_handler.py | 0 .../process_management/supervisor.py | 0 .../components/snapshots/__init__.py | 0 .../components/snapshots/snapshot_handler.py | 0 .../components/snapshots/snapshot_provider.py | 0 .../components/terminal/__init__.py | 0 .../components/terminal/commands_equal.py | 0 .../components/terminal/history_monitor.py | 0 .../terminal/terminado_mini_server.py | 0 .../components/terminal/terminal_commands.py | 0 .../terminal/terminal_commands_handler.py | 0 .../components/terminal/terminal_handler.py | 0 tfw/config/__init__.py | 1 + tfw/config/envvars.py | 5 ++++ .../config/lazy_environment.py | 0 {lib/tfw => tfw}/event_handlers.py | 0 {lib/tfw => tfw}/fsm/__init__.py | 0 {lib/tfw => tfw}/fsm/fsm_base.py | 0 {lib/tfw => tfw}/fsm/linear_fsm.py | 0 {lib/tfw => tfw}/fsm/yaml_fsm.py | 0 .../components => tfw/internals}/__init__.py | 0 {lib/tfw => tfw}/internals/callback_mixin.py | 0 {lib/tfw => tfw}/internals/crypto.py | 0 .../internals/event_handling/__init__.py | 0 .../internals/event_handling/event_handler.py | 0 .../event_handler_factory_base.py | 0 .../internals/event_handling/fsm_aware.py | 0 .../event_handling/fsm_aware_event_handler.py | 0 .../event_handling/test_event_handler.py | 0 .../tfw => tfw}/internals/inotify/__init__.py | 0 {lib/tfw => tfw}/internals/inotify/inotify.py | 0 .../internals/inotify/test_inotify.py | 0 {lib/tfw => tfw}/internals/lazy.py | 0 .../internals/networking/__init__.py | 0 .../networking/event_handler_connector.py | 0 .../tfw => tfw}/internals/networking/scope.py | 0 .../internals/networking/serialization.py | 0 .../internals/networking/server_connector.py | 0 {lib/tfw => tfw}/internals/server/__init__.py | 0 .../internals/server/zmq_websocket_router.py | 0 {lib/tfw => tfw}/logging.py | 0 {lib/tfw => tfw}/main/__init__.py | 0 .../tfw => tfw}/main/event_handler_factory.py | 0 {lib/tfw => tfw}/main/signal_handling.py | 0 {lib/tfw => tfw}/main/tfw_connector.py | 0 {lib/tfw => tfw}/main/tfw_server.py | 0 79 files changed, 22 insertions(+), 24 deletions(-) delete mode 100644 lib/tao/config/__init__.py delete mode 100644 lib/tao/config/envvars.py delete mode 100644 lib/tfw/config/__init__.py delete mode 100644 lib/tfw/config/envvars.py delete mode 100644 lib/tfw/internals/__init__.py rename {lib/tao => tfw}/__init__.py (100%) rename {lib/tfw => tfw/components}/__init__.py (100%) rename {lib/tfw => tfw}/components/frontend/__init__.py (100%) rename {lib/tfw => tfw}/components/frontend/frontend_handler.py (100%) rename {lib/tfw => tfw}/components/frontend/message_sender.py (100%) rename {lib/tfw => tfw}/components/frontend/message_storage.py (100%) rename {lib/tfw => tfw}/components/fsm/__init__.py (100%) rename {lib/tfw => tfw}/components/fsm/fsm_handler.py (100%) rename {lib/tfw => tfw}/components/fsm/fsm_updater.py (100%) rename {lib/tfw => tfw}/components/ide/__init__.py (100%) rename {lib/tfw => tfw}/components/ide/file_manager/__init__.py (100%) rename {lib/tfw => tfw}/components/ide/file_manager/file_manager.py (100%) rename {lib/tfw => tfw}/components/ide/file_manager/test_file_manager.py (100%) rename {lib/tfw => tfw}/components/ide/ide_handler.py (100%) rename {lib/tfw => tfw}/components/pipe_io/__init__.py (100%) rename {lib/tfw => tfw}/components/pipe_io/pipe_io_handler.py (100%) rename {lib/tfw => tfw}/components/pipe_io/pipe_io_server/__init__.py (100%) rename {lib/tfw => tfw}/components/pipe_io/pipe_io_server/deque.py (100%) rename {lib/tfw => tfw}/components/pipe_io/pipe_io_server/pipe.py (100%) rename {lib/tfw => tfw}/components/pipe_io/pipe_io_server/pipe_io_server.py (100%) rename {lib/tfw => tfw}/components/pipe_io/pipe_io_server/pipe_reader_thread.py (100%) rename {lib/tfw => tfw}/components/pipe_io/pipe_io_server/pipe_writer_thread.py (100%) rename {lib/tfw => tfw}/components/pipe_io/pipe_io_server/terminate_process_on_failure.py (100%) rename {lib/tfw => tfw}/components/process_management/__init__.py (100%) rename {lib/tfw => tfw}/components/process_management/log_inotify_observer.py (100%) rename {lib/tfw => tfw}/components/process_management/process_handler.py (100%) rename {lib/tfw => tfw}/components/process_management/process_log_handler.py (100%) rename {lib/tfw => tfw}/components/process_management/supervisor.py (100%) rename {lib/tfw => tfw}/components/snapshots/__init__.py (100%) rename {lib/tfw => tfw}/components/snapshots/snapshot_handler.py (100%) rename {lib/tfw => tfw}/components/snapshots/snapshot_provider.py (100%) rename {lib/tfw => tfw}/components/terminal/__init__.py (100%) rename {lib/tfw => tfw}/components/terminal/commands_equal.py (100%) rename {lib/tfw => tfw}/components/terminal/history_monitor.py (100%) rename {lib/tfw => tfw}/components/terminal/terminado_mini_server.py (100%) rename {lib/tfw => tfw}/components/terminal/terminal_commands.py (100%) rename {lib/tfw => tfw}/components/terminal/terminal_commands_handler.py (100%) rename {lib/tfw => tfw}/components/terminal/terminal_handler.py (100%) create mode 100644 tfw/config/__init__.py create mode 100644 tfw/config/envvars.py rename lib/envvars/__init__.py => tfw/config/lazy_environment.py (100%) rename {lib/tfw => tfw}/event_handlers.py (100%) rename {lib/tfw => tfw}/fsm/__init__.py (100%) rename {lib/tfw => tfw}/fsm/fsm_base.py (100%) rename {lib/tfw => tfw}/fsm/linear_fsm.py (100%) rename {lib/tfw => tfw}/fsm/yaml_fsm.py (100%) rename {lib/tfw/components => tfw/internals}/__init__.py (100%) rename {lib/tfw => tfw}/internals/callback_mixin.py (100%) rename {lib/tfw => tfw}/internals/crypto.py (100%) rename {lib/tfw => tfw}/internals/event_handling/__init__.py (100%) rename {lib/tfw => tfw}/internals/event_handling/event_handler.py (100%) rename {lib/tfw => tfw}/internals/event_handling/event_handler_factory_base.py (100%) rename {lib/tfw => tfw}/internals/event_handling/fsm_aware.py (100%) rename {lib/tfw => tfw}/internals/event_handling/fsm_aware_event_handler.py (100%) rename {lib/tfw => tfw}/internals/event_handling/test_event_handler.py (100%) rename {lib/tfw => tfw}/internals/inotify/__init__.py (100%) rename {lib/tfw => tfw}/internals/inotify/inotify.py (100%) rename {lib/tfw => tfw}/internals/inotify/test_inotify.py (100%) rename {lib/tfw => tfw}/internals/lazy.py (100%) rename {lib/tfw => tfw}/internals/networking/__init__.py (100%) rename {lib/tfw => tfw}/internals/networking/event_handler_connector.py (100%) rename {lib/tfw => tfw}/internals/networking/scope.py (100%) rename {lib/tfw => tfw}/internals/networking/serialization.py (100%) rename {lib/tfw => tfw}/internals/networking/server_connector.py (100%) rename {lib/tfw => tfw}/internals/server/__init__.py (100%) rename {lib/tfw => tfw}/internals/server/zmq_websocket_router.py (100%) rename {lib/tfw => tfw}/logging.py (100%) rename {lib/tfw => tfw}/main/__init__.py (100%) rename {lib/tfw => tfw}/main/event_handler_factory.py (100%) rename {lib/tfw => tfw}/main/signal_handling.py (100%) rename {lib/tfw => tfw}/main/tfw_connector.py (100%) rename {lib/tfw => tfw}/main/tfw_server.py (100%) diff --git a/Dockerfile b/Dockerfile index 1290e10..5df5cf4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,10 +54,10 @@ COPY supervisor/components/ ${TFW_SUPERVISORD_COMPONENTS} COPY nginx/nginx.conf ${TFW_NGINX_CONF} COPY nginx/default.conf ${TFW_NGINX_DEFAULT} COPY nginx/components/ ${TFW_NGINX_COMPONENTS} -COPY lib ${TFW_LIB_DIR}/ +COPY tfw ${TFW_LIB_DIR}/tfw COPY supervisor/tfw_server.py ${TFW_SERVER_DIR}/ -RUN for dir in "${TFW_LIB_DIR}"/{tfw,tao,envvars} "/etc/nginx" "/etc/supervisor"; do \ +RUN for dir in "${TFW_LIB_DIR}"/tfw "/etc/nginx" "/etc/supervisor"; do \ chown -R root:root "$dir" && chmod -R 700 "$dir"; \ done @@ -70,7 +70,7 @@ ONBUILD COPY ${BUILD_CONTEXT}/supervisor/ ${TFW_SUPERVISORD_COMPONENTS} ONBUILD RUN for f in "${TFW_NGINX_DEFAULT}" ${TFW_NGINX_COMPONENTS}/*.conf; do \ envsubst "$(printenv | cut -d= -f1 | grep TFW_ | sed -e 's/^/$/g')" < $f > $f~ && mv $f~ $f ;\ done -ONBUILD VOLUME ["/etc/nginx", "/var/lib/nginx", "/var/log/nginx", "${TFW_LIB_DIR}/envvars", "${TFW_LIB_DIR}/tfw"] +ONBUILD VOLUME ["/etc/nginx", "/var/lib/nginx", "/var/log/nginx", "${TFW_LIB_DIR}/tfw"] ONBUILD COPY ${BUILD_CONTEXT}/frontend /data/ ONBUILD RUN test -z "${NOFRONTEND}" && cd /data && yarn install --frozen-lockfile || : diff --git a/lib/tao/config/__init__.py b/lib/tao/config/__init__.py deleted file mode 100644 index fd07e8b..0000000 --- a/lib/tao/config/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .envvars import TAOENV diff --git a/lib/tao/config/envvars.py b/lib/tao/config/envvars.py deleted file mode 100644 index 813d06f..0000000 --- a/lib/tao/config/envvars.py +++ /dev/null @@ -1,3 +0,0 @@ -from envvars import LazyEnvironment - -TAOENV = LazyEnvironment('AVATAO_', 'taoenvtuple').environment diff --git a/lib/tfw/config/__init__.py b/lib/tfw/config/__init__.py deleted file mode 100644 index b9719ef..0000000 --- a/lib/tfw/config/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .envvars import TFWENV diff --git a/lib/tfw/config/envvars.py b/lib/tfw/config/envvars.py deleted file mode 100644 index 68adb0e..0000000 --- a/lib/tfw/config/envvars.py +++ /dev/null @@ -1,3 +0,0 @@ -from envvars import LazyEnvironment - -TFWENV = LazyEnvironment('TFW_', 'tfwenvtuple').environment diff --git a/lib/tfw/internals/__init__.py b/lib/tfw/internals/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/setup.py b/setup.py index e5fa212..c4c7912 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from os.path import dirname, realpath, join -from setuptools import setup, find_packages +from setuptools import setup here = dirname(realpath(__file__)) @@ -10,20 +10,20 @@ with open(join(here, 'requirements.txt'), 'r') as ifile: requirements = ifile.read().splitlines() setup( - name = 'tfw', - version = version, - description = 'Avatao tutorial-framework', - url = 'https://github.com/avatao-content/baseimage-tutorial-framework', - author = 'Avatao.com Innovative Learning Kft.', - author_email = 'support@avatao.com', - license = 'custom', - packages = find_packages('lib'), - package_dir = {'': 'lib'}, - install_requires = requirements, - extras_require = { + name='tfw', + version=version, + description='Avatao tutorial-framework', + url='https://github.com/avatao-content/baseimage-tutorial-framework', + author='Avatao.com Innovative Learning Kft.', + author_email='support@avatao.com', + license='custom', + packages=['tfw'], + package_dir={'tfw': 'tfw'}, + install_requires=requirements, + extras_require={ 'docs': [ 'sphinx >= 1.7.0', ], }, - zip_safe = False, + zip_safe=False, ) diff --git a/lib/tao/__init__.py b/tfw/__init__.py similarity index 100% rename from lib/tao/__init__.py rename to tfw/__init__.py diff --git a/lib/tfw/__init__.py b/tfw/components/__init__.py similarity index 100% rename from lib/tfw/__init__.py rename to tfw/components/__init__.py diff --git a/lib/tfw/components/frontend/__init__.py b/tfw/components/frontend/__init__.py similarity index 100% rename from lib/tfw/components/frontend/__init__.py rename to tfw/components/frontend/__init__.py diff --git a/lib/tfw/components/frontend/frontend_handler.py b/tfw/components/frontend/frontend_handler.py similarity index 100% rename from lib/tfw/components/frontend/frontend_handler.py rename to tfw/components/frontend/frontend_handler.py diff --git a/lib/tfw/components/frontend/message_sender.py b/tfw/components/frontend/message_sender.py similarity index 100% rename from lib/tfw/components/frontend/message_sender.py rename to tfw/components/frontend/message_sender.py diff --git a/lib/tfw/components/frontend/message_storage.py b/tfw/components/frontend/message_storage.py similarity index 100% rename from lib/tfw/components/frontend/message_storage.py rename to tfw/components/frontend/message_storage.py diff --git a/lib/tfw/components/fsm/__init__.py b/tfw/components/fsm/__init__.py similarity index 100% rename from lib/tfw/components/fsm/__init__.py rename to tfw/components/fsm/__init__.py diff --git a/lib/tfw/components/fsm/fsm_handler.py b/tfw/components/fsm/fsm_handler.py similarity index 100% rename from lib/tfw/components/fsm/fsm_handler.py rename to tfw/components/fsm/fsm_handler.py diff --git a/lib/tfw/components/fsm/fsm_updater.py b/tfw/components/fsm/fsm_updater.py similarity index 100% rename from lib/tfw/components/fsm/fsm_updater.py rename to tfw/components/fsm/fsm_updater.py diff --git a/lib/tfw/components/ide/__init__.py b/tfw/components/ide/__init__.py similarity index 100% rename from lib/tfw/components/ide/__init__.py rename to tfw/components/ide/__init__.py diff --git a/lib/tfw/components/ide/file_manager/__init__.py b/tfw/components/ide/file_manager/__init__.py similarity index 100% rename from lib/tfw/components/ide/file_manager/__init__.py rename to tfw/components/ide/file_manager/__init__.py diff --git a/lib/tfw/components/ide/file_manager/file_manager.py b/tfw/components/ide/file_manager/file_manager.py similarity index 100% rename from lib/tfw/components/ide/file_manager/file_manager.py rename to tfw/components/ide/file_manager/file_manager.py diff --git a/lib/tfw/components/ide/file_manager/test_file_manager.py b/tfw/components/ide/file_manager/test_file_manager.py similarity index 100% rename from lib/tfw/components/ide/file_manager/test_file_manager.py rename to tfw/components/ide/file_manager/test_file_manager.py diff --git a/lib/tfw/components/ide/ide_handler.py b/tfw/components/ide/ide_handler.py similarity index 100% rename from lib/tfw/components/ide/ide_handler.py rename to tfw/components/ide/ide_handler.py diff --git a/lib/tfw/components/pipe_io/__init__.py b/tfw/components/pipe_io/__init__.py similarity index 100% rename from lib/tfw/components/pipe_io/__init__.py rename to tfw/components/pipe_io/__init__.py diff --git a/lib/tfw/components/pipe_io/pipe_io_handler.py b/tfw/components/pipe_io/pipe_io_handler.py similarity index 100% rename from lib/tfw/components/pipe_io/pipe_io_handler.py rename to tfw/components/pipe_io/pipe_io_handler.py diff --git a/lib/tfw/components/pipe_io/pipe_io_server/__init__.py b/tfw/components/pipe_io/pipe_io_server/__init__.py similarity index 100% rename from lib/tfw/components/pipe_io/pipe_io_server/__init__.py rename to tfw/components/pipe_io/pipe_io_server/__init__.py diff --git a/lib/tfw/components/pipe_io/pipe_io_server/deque.py b/tfw/components/pipe_io/pipe_io_server/deque.py similarity index 100% rename from lib/tfw/components/pipe_io/pipe_io_server/deque.py rename to tfw/components/pipe_io/pipe_io_server/deque.py diff --git a/lib/tfw/components/pipe_io/pipe_io_server/pipe.py b/tfw/components/pipe_io/pipe_io_server/pipe.py similarity index 100% rename from lib/tfw/components/pipe_io/pipe_io_server/pipe.py rename to tfw/components/pipe_io/pipe_io_server/pipe.py diff --git a/lib/tfw/components/pipe_io/pipe_io_server/pipe_io_server.py b/tfw/components/pipe_io/pipe_io_server/pipe_io_server.py similarity index 100% rename from lib/tfw/components/pipe_io/pipe_io_server/pipe_io_server.py rename to tfw/components/pipe_io/pipe_io_server/pipe_io_server.py diff --git a/lib/tfw/components/pipe_io/pipe_io_server/pipe_reader_thread.py b/tfw/components/pipe_io/pipe_io_server/pipe_reader_thread.py similarity index 100% rename from lib/tfw/components/pipe_io/pipe_io_server/pipe_reader_thread.py rename to tfw/components/pipe_io/pipe_io_server/pipe_reader_thread.py diff --git a/lib/tfw/components/pipe_io/pipe_io_server/pipe_writer_thread.py b/tfw/components/pipe_io/pipe_io_server/pipe_writer_thread.py similarity index 100% rename from lib/tfw/components/pipe_io/pipe_io_server/pipe_writer_thread.py rename to tfw/components/pipe_io/pipe_io_server/pipe_writer_thread.py diff --git a/lib/tfw/components/pipe_io/pipe_io_server/terminate_process_on_failure.py b/tfw/components/pipe_io/pipe_io_server/terminate_process_on_failure.py similarity index 100% rename from lib/tfw/components/pipe_io/pipe_io_server/terminate_process_on_failure.py rename to tfw/components/pipe_io/pipe_io_server/terminate_process_on_failure.py diff --git a/lib/tfw/components/process_management/__init__.py b/tfw/components/process_management/__init__.py similarity index 100% rename from lib/tfw/components/process_management/__init__.py rename to tfw/components/process_management/__init__.py diff --git a/lib/tfw/components/process_management/log_inotify_observer.py b/tfw/components/process_management/log_inotify_observer.py similarity index 100% rename from lib/tfw/components/process_management/log_inotify_observer.py rename to tfw/components/process_management/log_inotify_observer.py diff --git a/lib/tfw/components/process_management/process_handler.py b/tfw/components/process_management/process_handler.py similarity index 100% rename from lib/tfw/components/process_management/process_handler.py rename to tfw/components/process_management/process_handler.py diff --git a/lib/tfw/components/process_management/process_log_handler.py b/tfw/components/process_management/process_log_handler.py similarity index 100% rename from lib/tfw/components/process_management/process_log_handler.py rename to tfw/components/process_management/process_log_handler.py diff --git a/lib/tfw/components/process_management/supervisor.py b/tfw/components/process_management/supervisor.py similarity index 100% rename from lib/tfw/components/process_management/supervisor.py rename to tfw/components/process_management/supervisor.py diff --git a/lib/tfw/components/snapshots/__init__.py b/tfw/components/snapshots/__init__.py similarity index 100% rename from lib/tfw/components/snapshots/__init__.py rename to tfw/components/snapshots/__init__.py diff --git a/lib/tfw/components/snapshots/snapshot_handler.py b/tfw/components/snapshots/snapshot_handler.py similarity index 100% rename from lib/tfw/components/snapshots/snapshot_handler.py rename to tfw/components/snapshots/snapshot_handler.py diff --git a/lib/tfw/components/snapshots/snapshot_provider.py b/tfw/components/snapshots/snapshot_provider.py similarity index 100% rename from lib/tfw/components/snapshots/snapshot_provider.py rename to tfw/components/snapshots/snapshot_provider.py diff --git a/lib/tfw/components/terminal/__init__.py b/tfw/components/terminal/__init__.py similarity index 100% rename from lib/tfw/components/terminal/__init__.py rename to tfw/components/terminal/__init__.py diff --git a/lib/tfw/components/terminal/commands_equal.py b/tfw/components/terminal/commands_equal.py similarity index 100% rename from lib/tfw/components/terminal/commands_equal.py rename to tfw/components/terminal/commands_equal.py diff --git a/lib/tfw/components/terminal/history_monitor.py b/tfw/components/terminal/history_monitor.py similarity index 100% rename from lib/tfw/components/terminal/history_monitor.py rename to tfw/components/terminal/history_monitor.py diff --git a/lib/tfw/components/terminal/terminado_mini_server.py b/tfw/components/terminal/terminado_mini_server.py similarity index 100% rename from lib/tfw/components/terminal/terminado_mini_server.py rename to tfw/components/terminal/terminado_mini_server.py diff --git a/lib/tfw/components/terminal/terminal_commands.py b/tfw/components/terminal/terminal_commands.py similarity index 100% rename from lib/tfw/components/terminal/terminal_commands.py rename to tfw/components/terminal/terminal_commands.py diff --git a/lib/tfw/components/terminal/terminal_commands_handler.py b/tfw/components/terminal/terminal_commands_handler.py similarity index 100% rename from lib/tfw/components/terminal/terminal_commands_handler.py rename to tfw/components/terminal/terminal_commands_handler.py diff --git a/lib/tfw/components/terminal/terminal_handler.py b/tfw/components/terminal/terminal_handler.py similarity index 100% rename from lib/tfw/components/terminal/terminal_handler.py rename to tfw/components/terminal/terminal_handler.py diff --git a/tfw/config/__init__.py b/tfw/config/__init__.py new file mode 100644 index 0000000..f5476e9 --- /dev/null +++ b/tfw/config/__init__.py @@ -0,0 +1 @@ +from .envvars import TFWENV, TAOENV diff --git a/tfw/config/envvars.py b/tfw/config/envvars.py new file mode 100644 index 0000000..1e4c89a --- /dev/null +++ b/tfw/config/envvars.py @@ -0,0 +1,5 @@ +from .lazy_environment import LazyEnvironment + + +TFWENV = LazyEnvironment('TFW_', 'tfwenvtuple').environment +TAOENV = LazyEnvironment('AVATAO_', 'taoenvtuple').environment diff --git a/lib/envvars/__init__.py b/tfw/config/lazy_environment.py similarity index 100% rename from lib/envvars/__init__.py rename to tfw/config/lazy_environment.py diff --git a/lib/tfw/event_handlers.py b/tfw/event_handlers.py similarity index 100% rename from lib/tfw/event_handlers.py rename to tfw/event_handlers.py diff --git a/lib/tfw/fsm/__init__.py b/tfw/fsm/__init__.py similarity index 100% rename from lib/tfw/fsm/__init__.py rename to tfw/fsm/__init__.py diff --git a/lib/tfw/fsm/fsm_base.py b/tfw/fsm/fsm_base.py similarity index 100% rename from lib/tfw/fsm/fsm_base.py rename to tfw/fsm/fsm_base.py diff --git a/lib/tfw/fsm/linear_fsm.py b/tfw/fsm/linear_fsm.py similarity index 100% rename from lib/tfw/fsm/linear_fsm.py rename to tfw/fsm/linear_fsm.py diff --git a/lib/tfw/fsm/yaml_fsm.py b/tfw/fsm/yaml_fsm.py similarity index 100% rename from lib/tfw/fsm/yaml_fsm.py rename to tfw/fsm/yaml_fsm.py diff --git a/lib/tfw/components/__init__.py b/tfw/internals/__init__.py similarity index 100% rename from lib/tfw/components/__init__.py rename to tfw/internals/__init__.py diff --git a/lib/tfw/internals/callback_mixin.py b/tfw/internals/callback_mixin.py similarity index 100% rename from lib/tfw/internals/callback_mixin.py rename to tfw/internals/callback_mixin.py diff --git a/lib/tfw/internals/crypto.py b/tfw/internals/crypto.py similarity index 100% rename from lib/tfw/internals/crypto.py rename to tfw/internals/crypto.py diff --git a/lib/tfw/internals/event_handling/__init__.py b/tfw/internals/event_handling/__init__.py similarity index 100% rename from lib/tfw/internals/event_handling/__init__.py rename to tfw/internals/event_handling/__init__.py diff --git a/lib/tfw/internals/event_handling/event_handler.py b/tfw/internals/event_handling/event_handler.py similarity index 100% rename from lib/tfw/internals/event_handling/event_handler.py rename to tfw/internals/event_handling/event_handler.py diff --git a/lib/tfw/internals/event_handling/event_handler_factory_base.py b/tfw/internals/event_handling/event_handler_factory_base.py similarity index 100% rename from lib/tfw/internals/event_handling/event_handler_factory_base.py rename to tfw/internals/event_handling/event_handler_factory_base.py diff --git a/lib/tfw/internals/event_handling/fsm_aware.py b/tfw/internals/event_handling/fsm_aware.py similarity index 100% rename from lib/tfw/internals/event_handling/fsm_aware.py rename to tfw/internals/event_handling/fsm_aware.py diff --git a/lib/tfw/internals/event_handling/fsm_aware_event_handler.py b/tfw/internals/event_handling/fsm_aware_event_handler.py similarity index 100% rename from lib/tfw/internals/event_handling/fsm_aware_event_handler.py rename to tfw/internals/event_handling/fsm_aware_event_handler.py diff --git a/lib/tfw/internals/event_handling/test_event_handler.py b/tfw/internals/event_handling/test_event_handler.py similarity index 100% rename from lib/tfw/internals/event_handling/test_event_handler.py rename to tfw/internals/event_handling/test_event_handler.py diff --git a/lib/tfw/internals/inotify/__init__.py b/tfw/internals/inotify/__init__.py similarity index 100% rename from lib/tfw/internals/inotify/__init__.py rename to tfw/internals/inotify/__init__.py diff --git a/lib/tfw/internals/inotify/inotify.py b/tfw/internals/inotify/inotify.py similarity index 100% rename from lib/tfw/internals/inotify/inotify.py rename to tfw/internals/inotify/inotify.py diff --git a/lib/tfw/internals/inotify/test_inotify.py b/tfw/internals/inotify/test_inotify.py similarity index 100% rename from lib/tfw/internals/inotify/test_inotify.py rename to tfw/internals/inotify/test_inotify.py diff --git a/lib/tfw/internals/lazy.py b/tfw/internals/lazy.py similarity index 100% rename from lib/tfw/internals/lazy.py rename to tfw/internals/lazy.py diff --git a/lib/tfw/internals/networking/__init__.py b/tfw/internals/networking/__init__.py similarity index 100% rename from lib/tfw/internals/networking/__init__.py rename to tfw/internals/networking/__init__.py diff --git a/lib/tfw/internals/networking/event_handler_connector.py b/tfw/internals/networking/event_handler_connector.py similarity index 100% rename from lib/tfw/internals/networking/event_handler_connector.py rename to tfw/internals/networking/event_handler_connector.py diff --git a/lib/tfw/internals/networking/scope.py b/tfw/internals/networking/scope.py similarity index 100% rename from lib/tfw/internals/networking/scope.py rename to tfw/internals/networking/scope.py diff --git a/lib/tfw/internals/networking/serialization.py b/tfw/internals/networking/serialization.py similarity index 100% rename from lib/tfw/internals/networking/serialization.py rename to tfw/internals/networking/serialization.py diff --git a/lib/tfw/internals/networking/server_connector.py b/tfw/internals/networking/server_connector.py similarity index 100% rename from lib/tfw/internals/networking/server_connector.py rename to tfw/internals/networking/server_connector.py diff --git a/lib/tfw/internals/server/__init__.py b/tfw/internals/server/__init__.py similarity index 100% rename from lib/tfw/internals/server/__init__.py rename to tfw/internals/server/__init__.py diff --git a/lib/tfw/internals/server/zmq_websocket_router.py b/tfw/internals/server/zmq_websocket_router.py similarity index 100% rename from lib/tfw/internals/server/zmq_websocket_router.py rename to tfw/internals/server/zmq_websocket_router.py diff --git a/lib/tfw/logging.py b/tfw/logging.py similarity index 100% rename from lib/tfw/logging.py rename to tfw/logging.py diff --git a/lib/tfw/main/__init__.py b/tfw/main/__init__.py similarity index 100% rename from lib/tfw/main/__init__.py rename to tfw/main/__init__.py diff --git a/lib/tfw/main/event_handler_factory.py b/tfw/main/event_handler_factory.py similarity index 100% rename from lib/tfw/main/event_handler_factory.py rename to tfw/main/event_handler_factory.py diff --git a/lib/tfw/main/signal_handling.py b/tfw/main/signal_handling.py similarity index 100% rename from lib/tfw/main/signal_handling.py rename to tfw/main/signal_handling.py diff --git a/lib/tfw/main/tfw_connector.py b/tfw/main/tfw_connector.py similarity index 100% rename from lib/tfw/main/tfw_connector.py rename to tfw/main/tfw_connector.py diff --git a/lib/tfw/main/tfw_server.py b/tfw/main/tfw_server.py similarity index 100% rename from lib/tfw/main/tfw_server.py rename to tfw/main/tfw_server.py