Skip to content

Commit

Permalink
Merge pull request #218 from OP-TED/feature/TED-588
Browse files Browse the repository at this point in the history
Feature/ted 588
  • Loading branch information
CaptainOfHacks authored Aug 30, 2022
2 parents 12719ca + af01801 commit 5ecd456
Show file tree
Hide file tree
Showing 40 changed files with 1,145 additions and 729 deletions.
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ apache-airflow==2.2.5
hvac==0.11.2
SPARQLWrapper==1.8.5
pandas==1.3.5
pymessagebus~=1.2
click~=8.1.0
openpyxl==3.0.9
colorama~=0.4
Expand Down
5 changes: 5 additions & 0 deletions ted_sws/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ def ID_MANAGER_API_HOST(self) -> str:
v: str = EnvConfigResolver().config_resolve()
return v if v else "localhost"

@property
def ID_MANAGER_OLD_API_HOST(self) -> str:
v: str = EnvConfigResolver().config_resolve()
return v if v else "localhost"

@property
def ID_MANAGER_API_PORT(self) -> int:
v: str = EnvConfigResolver().config_resolve()
Expand Down
3 changes: 1 addition & 2 deletions ted_sws/core/adapters/cmd_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
EventWriterToMongoDBHandler
from ted_sws.event_manager.adapters.event_handler_config import CLILoggerConfig
from ted_sws.event_manager.adapters.event_logger import EventLogger
from ted_sws.event_manager.adapters.log import SeverityLevelType
from ted_sws.event_manager.adapters.logger import LOG_ERROR_TEXT, LOG_SUCCESS_TEXT
from ted_sws.event_manager.adapters.log import SeverityLevelType, LOG_ERROR_TEXT, LOG_SUCCESS_TEXT
from ted_sws.event_manager.model.event_message import EventMessage, EventMessageLogSettings
from ted_sws.event_manager.services.logger_from_context import get_env_logger

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ted_sws.core.adapters.cmd_runner import CmdRunner as BaseCmdRunner, DEFAULT_MAPPINGS_PATH
from ted_sws.data_manager.adapters.mapping_suite_repository import TRANSFORM_PACKAGE_NAME, RESOURCES_PACKAGE_NAME
from ted_sws.data_manager.adapters.sparql_endpoint import SPARQLTripleStoreEndpoint, TripleStoreEndpointABC
from ted_sws.event_manager.adapters.logger import LOG_INFO_TEXT
from ted_sws.event_manager.adapters.log import LOG_INFO_TEXT
from ted_sws.resources import QUERIES_PATH, MAPPING_FILES_PATH

CELLAR_SPARQL_ENDPOINT_URL = "http://publications.europa.eu/webapi/rdf/sparql"
Expand Down
13 changes: 8 additions & 5 deletions ted_sws/event_manager/adapters/log/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

from ted_sws import RUN_ENV_NAME, RUN_TEST_ENV_VAL

from colorama import Fore

LOG_ERROR_TEXT = Fore.RED + "{}" + Fore.RESET
LOG_SUCCESS_TEXT = Fore.GREEN + "{}" + Fore.RESET
LOG_INFO_TEXT = Fore.CYAN + "{}" + Fore.RESET
LOG_WARN_TEXT = Fore.YELLOW + "{}" + Fore.RESET


EVENT_LOGGER_CONTEXT_KEY = '__event_logger__'


Expand All @@ -21,10 +29,5 @@ class ConfigHandlerType(Enum):
MongoDBHandler = "MongoDBHandler"


class LoggedBy(Enum):
DECORATOR = "decorator"
WRITER = "writer"


def is_env_logging_enabled() -> bool:
return os.environ[RUN_ENV_NAME] not in [RUN_TEST_ENV_VAL]
85 changes: 0 additions & 85 deletions ted_sws/event_manager/adapters/log/log_decorator.py

This file was deleted.

82 changes: 0 additions & 82 deletions ted_sws/event_manager/adapters/log/log_writer.py

This file was deleted.

73 changes: 0 additions & 73 deletions ted_sws/event_manager/adapters/log_repository.py

This file was deleted.

71 changes: 0 additions & 71 deletions ted_sws/event_manager/adapters/logger.py

This file was deleted.

Loading

0 comments on commit 5ecd456

Please sign in to comment.