Improved project structure
This commit is contained in:
@@ -20,7 +20,6 @@ __version__ = '2020.12.5'
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
from .application_host import ApplicationHost
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major=2020, minor=12, micro=5)
|
||||
|
@@ -1,37 +0,0 @@
|
||||
from datetime import datetime
|
||||
|
||||
from sh_edraft.configuration.model.application_host_base import ApplicationHostBase
|
||||
from sh_edraft.service.service_provider import ServiceProvider
|
||||
|
||||
|
||||
class ApplicationHost(ApplicationHostBase):
|
||||
|
||||
def __init__(self):
|
||||
ApplicationHostBase.__init__(self)
|
||||
self._services = ServiceProvider()
|
||||
self._end_time: datetime = datetime.now()
|
||||
self._start_time: datetime = datetime.now()
|
||||
|
||||
@property
|
||||
def services(self):
|
||||
return self._services
|
||||
|
||||
@property
|
||||
def end_time(self) -> datetime:
|
||||
return self._end_time
|
||||
|
||||
@end_time.setter
|
||||
def end_time(self, end_time: datetime) -> None:
|
||||
self._end_time = end_time
|
||||
|
||||
@property
|
||||
def start_time(self) -> datetime:
|
||||
return self._start_time
|
||||
|
||||
@start_time.setter
|
||||
def start_time(self, start_time: datetime) -> None:
|
||||
self._start_time = start_time
|
||||
|
||||
@property
|
||||
def date_time_now(self) -> datetime:
|
||||
return datetime.now()
|
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
sh_edraft.configuration.model
|
||||
sh_edraft.configuration.base
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ sh_edraft.configuration.model
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'sh_edraft.configuration.model'
|
||||
__title__ = 'sh_edraft.configuration.base'
|
||||
__author__ = 'Sven Heidemann'
|
||||
__license__ = 'MIT'
|
||||
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
@@ -1,7 +1,7 @@
|
||||
from abc import abstractmethod
|
||||
from collections import Callable
|
||||
|
||||
from sh_edraft.configuration.model.configuration_model_base import ConfigurationModelBase
|
||||
from sh_edraft.configuration.base.configuration_model_base import ConfigurationModelBase
|
||||
from sh_edraft.service.base.service_base import ServiceBase
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class ConfigurationBase(ServiceBase):
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def config(self): pass
|
||||
def config(self) -> dict[type, object]: pass
|
||||
|
||||
@abstractmethod
|
||||
def add_config_by_type(self, key_type: type, value: object): pass
|
@@ -1,7 +1,7 @@
|
||||
from collections import Callable
|
||||
|
||||
from sh_edraft.configuration.model.configuration_model_base import ConfigurationModelBase
|
||||
from sh_edraft.configuration.model.configuration_base import ConfigurationBase
|
||||
from sh_edraft.configuration.base.configuration_model_base import ConfigurationModelBase
|
||||
from sh_edraft.configuration.base.configuration_base import ConfigurationBase
|
||||
|
||||
|
||||
class Configuration(ConfigurationBase):
|
||||
|
@@ -1,8 +0,0 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class ApplicationHostBase(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self): pass
|
Reference in New Issue
Block a user