Improved comments of environment
This commit is contained in:
@@ -20,7 +20,7 @@ __version__ = '2021.4.1.post1'
|
||||
from collections import namedtuple
|
||||
|
||||
# imports:
|
||||
from .environment_abc import EnvironmentABC
|
||||
from .environment_abc import ApplicationEnvironmentABC
|
||||
from .environment_name_enum import EnvironmentNameEnum
|
||||
from .application_environment import ApplicationEnvironment
|
||||
|
||||
|
@@ -1,14 +1,19 @@
|
||||
from socket import gethostname
|
||||
from typing import Optional
|
||||
|
||||
from cpl.environment.environment_abc import EnvironmentABC
|
||||
from cpl.environment.environment_abc import ApplicationEnvironmentABC
|
||||
from cpl.environment.environment_name_enum import EnvironmentNameEnum
|
||||
|
||||
|
||||
class ApplicationEnvironment(EnvironmentABC):
|
||||
class ApplicationEnvironment(ApplicationEnvironmentABC):
|
||||
|
||||
def __init__(self, name: EnvironmentNameEnum = EnvironmentNameEnum.production, crp: str = './'):
|
||||
EnvironmentABC.__init__(self)
|
||||
"""
|
||||
Represents environment of the application
|
||||
:param name:
|
||||
:param crp:
|
||||
"""
|
||||
ApplicationEnvironmentABC.__init__(self)
|
||||
|
||||
self._environment_name: Optional[EnvironmentNameEnum] = name
|
||||
self._app_name: Optional[str] = None
|
||||
|
@@ -1,31 +1,35 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
||||
class EnvironmentABC(ABC):
|
||||
class ApplicationEnvironmentABC(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self): pass
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
ABC of application environment
|
||||
"""
|
||||
pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def environment_name(self) -> str: pass
|
||||
|
||||
|
||||
@environment_name.setter
|
||||
@abstractmethod
|
||||
def environment_name(self, environment_name: str): pass
|
||||
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def application_name(self) -> str: pass
|
||||
|
||||
|
||||
@application_name.setter
|
||||
@abstractmethod
|
||||
def application_name(self, application_name: str): pass
|
||||
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def customer(self) -> str: pass
|
||||
|
||||
|
||||
@customer.setter
|
||||
@abstractmethod
|
||||
def customer(self, customer: str): pass
|
||||
|
Reference in New Issue
Block a user