Improved project structure
This commit is contained in:
parent
ff2a7d9693
commit
f2f797aaa3
@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
"""
|
"""
|
||||||
sh_edraft.source_code
|
sh_edraft.coding
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ sh_edraft.source_code
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = 'sh_edraft.source_code'
|
__title__ = 'sh_edraft.coding'
|
||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
"""
|
"""
|
||||||
sh_edraft.source_code.model
|
sh_edraft.coding.base
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ sh_edraft.source_code.model
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = 'sh_edraft.source_code.model'
|
__title__ = 'sh_edraft.coding.base'
|
||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
@ -1,7 +1,7 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from sh_edraft.source_code.model.version_enum import VersionEnum
|
from sh_edraft.coding.model.version_enum import VersionEnum
|
||||||
from sh_edraft.configuration.model.configuration_model_base import ConfigurationModelBase
|
from sh_edraft.configuration.base.configuration_model_base import ConfigurationModelBase
|
||||||
|
|
||||||
|
|
||||||
class Version(ConfigurationModelBase):
|
class Version(ConfigurationModelBase):
|
@ -20,7 +20,6 @@ __version__ = '2020.12.5'
|
|||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
# imports:
|
# imports:
|
||||||
from .application_host import ApplicationHost
|
|
||||||
|
|
||||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||||
version_info = VersionInfo(major=2020, minor=12, micro=5)
|
version_info = VersionInfo(major=2020, minor=12, micro=5)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- 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'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
@ -1,7 +1,7 @@
|
|||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from collections import Callable
|
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
|
from sh_edraft.service.base.service_base import ServiceBase
|
||||||
|
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ class ConfigurationBase(ServiceBase):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def config(self): pass
|
def config(self) -> dict[type, object]: pass
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def add_config_by_type(self, key_type: type, value: object): pass
|
def add_config_by_type(self, key_type: type, value: object): pass
|
@ -1,7 +1,7 @@
|
|||||||
from collections import Callable
|
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.configuration.model.configuration_base import ConfigurationBase
|
from sh_edraft.configuration.base.configuration_base import ConfigurationBase
|
||||||
|
|
||||||
|
|
||||||
class Configuration(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
|
|
3
src/sh_edraft/hosting/__init__.py
Normal file
3
src/sh_edraft/hosting/__init__.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# imports:
|
||||||
|
|
||||||
|
from .application_host import ApplicationHost
|
@ -1,6 +1,6 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from sh_edraft.configuration.model.application_host_base import ApplicationHostBase
|
from sh_edraft.hosting.base.application_host_base import ApplicationHostBase
|
||||||
from sh_edraft.service.service_provider import ServiceProvider
|
from sh_edraft.service.service_provider import ServiceProvider
|
||||||
|
|
||||||
|
|
||||||
@ -9,8 +9,8 @@ class ApplicationHost(ApplicationHostBase):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
ApplicationHostBase.__init__(self)
|
ApplicationHostBase.__init__(self)
|
||||||
self._services = ServiceProvider()
|
self._services = ServiceProvider()
|
||||||
self._end_time: datetime = datetime.now()
|
|
||||||
self._start_time: datetime = datetime.now()
|
self._start_time: datetime = datetime.now()
|
||||||
|
self._end_time: datetime = datetime.now()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def services(self):
|
def services(self):
|
||||||
@ -21,7 +21,7 @@ class ApplicationHost(ApplicationHostBase):
|
|||||||
return self._end_time
|
return self._end_time
|
||||||
|
|
||||||
@end_time.setter
|
@end_time.setter
|
||||||
def end_time(self, end_time: datetime) -> None:
|
def end_time(self, end_time: datetime):
|
||||||
self._end_time = end_time
|
self._end_time = end_time
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -29,7 +29,7 @@ class ApplicationHost(ApplicationHostBase):
|
|||||||
return self._start_time
|
return self._start_time
|
||||||
|
|
||||||
@start_time.setter
|
@start_time.setter
|
||||||
def start_time(self, start_time: datetime) -> None:
|
def start_time(self, start_time: datetime):
|
||||||
self._start_time = start_time
|
self._start_time = start_time
|
||||||
|
|
||||||
@property
|
@property
|
2
src/sh_edraft/hosting/base/__init__.py
Normal file
2
src/sh_edraft/hosting/base/__init__.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# imports:
|
||||||
|
from .application_host_base import ApplicationHostBase
|
22
src/sh_edraft/hosting/base/application_host_base.py
Normal file
22
src/sh_edraft/hosting/base/application_host_base.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
from abc import ABC, abstractmethod
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
|
class ApplicationHostBase(ABC):
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
def __init__(self): pass
|
||||||
|
|
||||||
|
@property
|
||||||
|
@abstractmethod
|
||||||
|
def start_time(self) -> datetime: pass
|
||||||
|
|
||||||
|
@start_time.setter
|
||||||
|
def start_time(self, start_time: datetime): pass
|
||||||
|
|
||||||
|
@property
|
||||||
|
@abstractmethod
|
||||||
|
def end_time(self): pass
|
||||||
|
|
||||||
|
@end_time.setter
|
||||||
|
def end_time(self, end_time: datetime): pass
|
0
src/sh_edraft/hosting/model/__init__.py
Normal file
0
src/sh_edraft/hosting/model/__init__.py
Normal file
@ -1,6 +1,6 @@
|
|||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
|
|
||||||
from sh_edraft.configuration import ApplicationHost
|
from sh_edraft.hosting.application_host import ApplicationHost
|
||||||
from sh_edraft.logging.model.logging_settings import LoggingSettings
|
from sh_edraft.logging.model.logging_settings import LoggingSettings
|
||||||
from sh_edraft.service.base.service_base import ServiceBase
|
from sh_edraft.service.base.service_base import ServiceBase
|
||||||
from sh_edraft.time.model.time_format_settings import TimeFormatSettings
|
from sh_edraft.time.model.time_format_settings import TimeFormatSettings
|
||||||
|
@ -4,7 +4,7 @@ import traceback
|
|||||||
from collections import Callable
|
from collections import Callable
|
||||||
from string import Template
|
from string import Template
|
||||||
|
|
||||||
from sh_edraft.configuration import ApplicationHost
|
from sh_edraft.hosting.application_host import ApplicationHost
|
||||||
from sh_edraft.logging.base.logger_base import LoggerBase
|
from sh_edraft.logging.base.logger_base import LoggerBase
|
||||||
from sh_edraft.logging.model import LoggingSettings
|
from sh_edraft.logging.model import LoggingSettings
|
||||||
from sh_edraft.logging.model.logging_level import LoggingLevel
|
from sh_edraft.logging.model.logging_level import LoggingLevel
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
"""
|
"""
|
||||||
sh_edraft.logging.model
|
sh_edraft.logging.base
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ sh_edraft.logging.model
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = 'sh_edraft.logging.model'
|
__title__ = 'sh_edraft.logging.base'
|
||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import traceback
|
import traceback
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from sh_edraft.configuration.model.configuration_model_base import ConfigurationModelBase
|
from sh_edraft.configuration.base.configuration_model_base import ConfigurationModelBase
|
||||||
from sh_edraft.logging.model.logging_settings_name import LogSettingsName
|
from sh_edraft.logging.model.logging_settings_name import LogSettingsName
|
||||||
from sh_edraft.utils.console import Console
|
from sh_edraft.utils.console import Console
|
||||||
from sh_edraft.logging.model.logging_level import LoggingLevel
|
from sh_edraft.logging.model.logging_level import LoggingLevel
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
"""
|
"""
|
||||||
sh_edraft.publishing.model
|
sh_edraft.publishing.base
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ sh_edraft.publishing.model
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = 'sh_edraft.publishing.model'
|
__title__ = 'sh_edraft.publishing.base'
|
||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import traceback
|
import traceback
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from sh_edraft.configuration.model import ConfigurationModelBase
|
from sh_edraft.configuration.base.configuration_model_base import ConfigurationModelBase
|
||||||
from sh_edraft.publishing.model import Template
|
from sh_edraft.publishing.model import Template
|
||||||
from sh_edraft.publishing.model.publish_settings_name import PublishSettingsName
|
from sh_edraft.publishing.model.publish_settings_name import PublishSettingsName
|
||||||
from sh_edraft.utils import Console
|
from sh_edraft.utils import Console
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from sh_edraft.source_code.model.version import Version
|
from sh_edraft.coding.model.version import Version
|
||||||
from sh_edraft.configuration.model import ConfigurationModelBase
|
from sh_edraft.configuration.base.configuration_model_base import ConfigurationModelBase
|
||||||
from sh_edraft.publishing.model.template_enum import TemplateEnum
|
from sh_edraft.publishing.model.template_enum import TemplateEnum
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
"""
|
"""
|
||||||
sh_edraft.service.model
|
sh_edraft.service.base
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ sh_edraft.service.model
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = 'sh_edraft.service.model'
|
__title__ = 'sh_edraft.service.base'
|
||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
||||||
|
@ -3,11 +3,10 @@ from inspect import signature, Parameter
|
|||||||
from typing import Type
|
from typing import Type
|
||||||
|
|
||||||
from sh_edraft.configuration.configuration import Configuration
|
from sh_edraft.configuration.configuration import Configuration
|
||||||
from sh_edraft.configuration.model.application_host_base import ApplicationHostBase
|
from sh_edraft.hosting.base.application_host_base import ApplicationHostBase
|
||||||
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_provider_base import ServiceProviderBase
|
from sh_edraft.service.base.service_provider_base import ServiceProviderBase
|
||||||
from sh_edraft.service.base.service_base import ServiceBase
|
from sh_edraft.service.base.service_base import ServiceBase
|
||||||
from sh_edraft.service.model.provide_state import ProvideState
|
|
||||||
|
|
||||||
|
|
||||||
class ServiceProvider(ServiceProviderBase):
|
class ServiceProvider(ServiceProviderBase):
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
"""
|
"""
|
||||||
sh_edraft.time.model
|
sh_edraft.time.base
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ sh_edraft.time.model
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__title__ = 'sh_edraft.time.model'
|
__title__ = 'sh_edraft.time.base'
|
||||||
__author__ = 'Sven Heidemann'
|
__author__ = 'Sven Heidemann'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import traceback
|
import traceback
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from sh_edraft.configuration.model import ConfigurationModelBase
|
from sh_edraft.configuration.base.configuration_model_base import ConfigurationModelBase
|
||||||
from sh_edraft.time.model.time_format_settings_names import TimeFormatSettingsNames
|
from sh_edraft.time.model.time_format_settings_names import TimeFormatSettingsNames
|
||||||
from sh_edraft.utils.console import Console
|
from sh_edraft.utils.console import Console
|
||||||
|
|
||||||
|
@ -4,9 +4,8 @@ import unittest
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from string import Template
|
from string import Template
|
||||||
|
|
||||||
from sh_edraft.configuration import ApplicationHost
|
from sh_edraft.hosting import ApplicationHost
|
||||||
from sh_edraft.logging import Logger
|
from sh_edraft.logging import Logger
|
||||||
from sh_edraft.logging.base import LoggerBase
|
|
||||||
from sh_edraft.logging.model import LoggingSettings
|
from sh_edraft.logging.model import LoggingSettings
|
||||||
from sh_edraft.time.model import TimeFormatSettings
|
from sh_edraft.time.model import TimeFormatSettings
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import os
|
|||||||
from sh_edraft.logging.base.logger_base import LoggerBase
|
from sh_edraft.logging.base.logger_base import LoggerBase
|
||||||
from sh_edraft.publishing.base import PublisherBase
|
from sh_edraft.publishing.base import PublisherBase
|
||||||
from sh_edraft.service.base import ServiceProviderBase
|
from sh_edraft.service.base import ServiceProviderBase
|
||||||
from sh_edraft.source_code.model import Version
|
from sh_edraft.coding.model import Version
|
||||||
from sh_edraft.publishing import Publisher
|
from sh_edraft.publishing import Publisher
|
||||||
from sh_edraft.publishing.model import Template
|
from sh_edraft.publishing.model import Template
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from sh_edraft.configuration import ApplicationHost
|
from sh_edraft.hosting import ApplicationHost
|
||||||
from sh_edraft.logging import Logger
|
from sh_edraft.logging import Logger
|
||||||
from sh_edraft.logging.base import LoggerBase
|
from sh_edraft.logging.base import LoggerBase
|
||||||
from sh_edraft.logging.model import LoggingSettings
|
from sh_edraft.logging.model import LoggingSettings
|
||||||
@ -10,7 +10,7 @@ from sh_edraft.publishing import Publisher
|
|||||||
from sh_edraft.publishing.base import PublisherBase
|
from sh_edraft.publishing.base import PublisherBase
|
||||||
from sh_edraft.publishing.model import Template
|
from sh_edraft.publishing.model import Template
|
||||||
from sh_edraft.publishing.model.publish_settings_model import PublishSettingsModel
|
from sh_edraft.publishing.model.publish_settings_model import PublishSettingsModel
|
||||||
from sh_edraft.source_code.model import Version
|
from sh_edraft.coding.model import Version
|
||||||
from sh_edraft.time.model import TimeFormatSettings
|
from sh_edraft.time.model import TimeFormatSettings
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from sh_edraft.configuration import ApplicationHost
|
from sh_edraft.hosting import ApplicationHost
|
||||||
from sh_edraft.configuration.model.application_host_base import ApplicationHostBase
|
|
||||||
from sh_edraft.logging import Logger
|
from sh_edraft.logging import Logger
|
||||||
from sh_edraft.logging.base import LoggerBase
|
from sh_edraft.logging.base import LoggerBase
|
||||||
from sh_edraft.logging.model import LoggingSettings
|
from sh_edraft.logging.model import LoggingSettings
|
||||||
|
Loading…
Reference in New Issue
Block a user