Added publish logic

This commit is contained in:
2021-03-08 20:29:08 +01:00
parent 5f1b56f30b
commit f9826e28a5
44 changed files with 590 additions and 387 deletions

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'sh_cpl.cpl'
__title__ = 'src.cpl'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'cpl.application'
__title__ = 'src.cpl.application'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'cpl.configuration'
__title__ = 'src.cpl.configuration'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'cpl.console'
__title__ = 'src.cpl.console'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'cpl.database'
__title__ = 'src.cpl.database'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'cpl.database.connection'
__title__ = 'src.cpl.database.connection'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'cpl.database.context'
__title__ = 'src.cpl.database.context'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'cpl.dependency_injection'
__title__ = 'src.cpl.dependency_injection'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'cpl.environment'
__title__ = 'src.cpl.environment'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'cpl.logging'
__title__ = 'src.cpl.logging'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'cpl.mailing'
__title__ = 'src.cpl.mailing'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'cpl.time'
__title__ = 'src.cpl.time'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
sh_cpl sh-edraft Common Python library
~~~~~~~~~~~~~~~~~~~
Common Python Library
sh-edraft Common Python library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
:license: MITMIT, see LICENSE for more details.
"""
__title__ = 'cpl.utils'
__title__ = 'src.cpl.utils'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'

View File

@@ -1,25 +0,0 @@
# -*- coding: utf-8 -*-
"""
sh_cpl Common Python Library
~~~~~~~~~~~~~~~~~~~
Common Python Library
:copyright: (c) 2020 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
__title__ = 'cpl.version'
__author__ = 'Sven Heidemann'
__license__ = 'MIT'
__copyright__ = 'Copyright (c) 2020 sh-edraft.de'
__version__ = '2021.4.1'
from collections import namedtuple
# imports:
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
version_info = VersionInfo(major=2021, minor=4, micro=1)

View File

@@ -1,46 +0,0 @@
from typing import Optional
from cpl.configuration.configuration_model_abc import ConfigurationModelABC
from cpl.version.version_enum import VersionEnum
class Version(ConfigurationModelABC):
def __init__(
self,
major: int = None,
minor: int = None,
micro: float = None
):
ConfigurationModelABC.__init__(self)
self._major: Optional[int] = major
self._minor: Optional[int] = minor
self._micro: Optional[int] = micro
@property
def major(self) -> int:
return self._major
@property
def minor(self) -> int:
return self._minor
@property
def micro(self) -> float:
return self._micro
def to_str(self) -> str:
return f'{self._major}.{self._minor}.{self._micro}'
def from_dict(self, settings: dict):
self._major = int(settings[VersionEnum.Major.value])
self._minor = int(settings[VersionEnum.Minor.value])
self._micro = int(settings[VersionEnum.Micro.value])
def to_dict(self) -> dict:
return {
VersionEnum.Major.value: self._major,
VersionEnum.Minor.value: self._minor,
VersionEnum.Micro.value: self._micro
}

View File

@@ -1,8 +0,0 @@
from enum import Enum
class VersionEnum(Enum):
Major = 'Major'
Minor = 'Minor'
Micro = 'Micro'