Refactor whole importing hell into a nice and clean API

This commit is contained in:
Kristóf Tóth
2018-04-06 15:21:45 +02:00
parent b942c1cf53
commit 1f2e1f0489
23 changed files with 47 additions and 29 deletions

View File

@ -0,0 +1,8 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details.
from .directory_monitoring_event_handler import DirectoryMonitoringEventHandler
from .process_managing_event_handler import ProcessManagingEventHandler
from .terminado_event_handler import TerminadoEventHandler
from .source_code_event_handler import SourceCodeEventHandler
from .history_monitor import HistoryMonitor, BashMonitor, GDBMonitor

View File

@ -6,7 +6,7 @@ from functools import wraps
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler as FileSystemWatchdogEventHandler
from tfw.networking.event_handlers.server_connector import ServerUplinkConnector
from tfw.networking.event_handlers import ServerUplinkConnector
from tfw.components.decorators import RateLimiter
from tfw.config.logs import logging

View File

@ -3,9 +3,9 @@
from os.path import isdir, exists
from tfw.components.directory_monitor import DirectoryMonitor
from tfw.event_handler_base import TriggerlessEventHandler
from tfw import TriggerlessEventHandler
from tfw.config.logs import logging
from .directory_monitor import DirectoryMonitor
LOG = logging.getLogger(__name__)

View File

@ -9,8 +9,8 @@ from abc import ABC, abstractmethod
from watchdog.observers import Observer
from watchdog.events import PatternMatchingEventHandler
from tfw.components.mixins.callback_mixin import CallbackMixin
from tfw.components.decorators.rate_limiter import RateLimiter
from tfw.components.mixins import CallbackMixin
from tfw.components.decorators import RateLimiter
class CallbackEventHandler(PatternMatchingEventHandler, ABC):

View File

@ -2,3 +2,4 @@
# All Rights Reserved. See LICENSE file for details.
from .supervisor_mixin import SupervisorMixin
from .callback_mixin import CallbackMixin

View File

@ -3,10 +3,10 @@
from xmlrpc.client import Fault as SupervisorFault
from tfw.event_handler_base import TriggerlessEventHandler
from tfw import TriggerlessEventHandler
from tfw.components.mixins import SupervisorMixin
from tfw.components.directory_monitor import with_monitor_paused
from tfw.config.logs import logging
from .directory_monitor import with_monitor_paused
LOG = logging.getLogger(__name__)

View File

@ -6,9 +6,9 @@ from glob import glob
from fnmatch import fnmatchcase
from collections import Iterable
from tfw.event_handler_base import TriggerlessEventHandler
from tfw.components.directory_monitor import DirectoryMonitor
from tfw import TriggerlessEventHandler
from tfw.config.logs import logging
from .directory_monitor import DirectoryMonitor
LOG = logging.getLogger(__name__)

View File

@ -1,11 +1,11 @@
# Copyright (C) 2018 Avatao.com Innovative Learning Kft.
# All Rights Reserved. See LICENSE file for details.
from tfw.components.terminado_mini_server import TerminadoMiniServer
from tfw.event_handler_base import TriggerlessEventHandler
from tfw import TriggerlessEventHandler
from tfw.config import TFWENV
from tfw.config.logs import logging
from tao.config import TAOENV
from .terminado_mini_server import TerminadoMiniServer
LOG = logging.getLogger(__name__)