Improved configuration and testing
This commit is contained in:
@@ -98,7 +98,7 @@ class Configuration(ConfigurationBase):
|
||||
self._print_error(__name__, f'Cannot load config file: {file}! -> {e}')
|
||||
return {}
|
||||
|
||||
def add_configuration(self, key_type: type, value: object):
|
||||
def add_configuration(self, key_type: type, value: ConfigurationModelBase):
|
||||
self._config[key_type] = value
|
||||
|
||||
def get_configuration(self, search_type: type) -> ConfigurationModelBase:
|
||||
|
@@ -22,7 +22,7 @@ from collections import namedtuple
|
||||
# imports:
|
||||
from .template import Template
|
||||
from .template_enum import TemplateEnum
|
||||
from .publish_settings_model import PublishSettingsModel
|
||||
from .publish_settings_model import PublishSettings
|
||||
from .publish_settings_name import PublishSettingsName
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
|
@@ -7,7 +7,7 @@ from sh_edraft.publishing.model.publish_settings_name import PublishSettingsName
|
||||
from sh_edraft.utils import Console
|
||||
|
||||
|
||||
class PublishSettingsModel(ConfigurationModelBase):
|
||||
class PublishSettings(ConfigurationModelBase):
|
||||
|
||||
def __init__(self):
|
||||
ConfigurationModelBase.__init__(self)
|
||||
|
@@ -4,17 +4,17 @@ from string import Template as stringTemplate
|
||||
|
||||
from sh_edraft.logging.base.logger_base import LoggerBase
|
||||
from sh_edraft.publishing.base.publisher_base import PublisherBase
|
||||
from sh_edraft.publishing.model.publish_settings_model import PublishSettingsModel
|
||||
from sh_edraft.publishing.model.publish_settings_model import PublishSettings
|
||||
from sh_edraft.publishing.model.template import Template
|
||||
|
||||
|
||||
class Publisher(PublisherBase):
|
||||
|
||||
def __init__(self, logger: LoggerBase, publish_settings: PublishSettingsModel):
|
||||
def __init__(self, logger: LoggerBase, publish_settings: PublishSettings):
|
||||
PublisherBase.__init__(self)
|
||||
|
||||
self._logger: LoggerBase = logger
|
||||
self._publish_settings: PublishSettingsModel = publish_settings
|
||||
self._publish_settings: PublishSettings = publish_settings
|
||||
|
||||
@property
|
||||
def source_path(self) -> str:
|
||||
|
Reference in New Issue
Block a user