diff --git a/Makefile b/Makefile index bae5d74c4..420abbeb6 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ PROJECT_PATH = $(shell pwd) AIRFLOW_INFRA_FOLDER ?= ${PROJECT_PATH}/.airflow RML_MAPPER_PATH = ${PROJECT_PATH}/.rmlmapper/rmlmapper.jar XML_PROCESSOR_PATH = ${PROJECT_PATH}/.saxon/saxon-he-10.6.jar - +LOGGING_TYPE = PY #----------------------------------------------------------------------------- # Dev commands #----------------------------------------------------------------------------- @@ -154,8 +154,8 @@ stop-metabase: init-rml-mapper: @ echo -e "RMLMapper folder initialisation!" - @ wget -c https://github.com/RMLio/rmlmapper-java/releases/download/v5.0.0/rmlmapper-5.0.0-r362-all.jar -P .rmlmapper/ - @ mv .rmlmapper/rmlmapper-5.0.0-r362-all.jar .rmlmapper/rmlmapper.jar 2>/dev/null + @ mkdir -p ./.rmlmapper + @ wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1MckjzpvrCoChy_IRYC2S54tf3dFQNwEt' -O- | sed -rn \'s/.*confirm=\([0-9A-Za-z_]+).*/\1\n/p\'\)&id=1MckjzpvrCoChy_IRYC2S54tf3dFQNwEt" -O ./.rmlmapper/rmlmapper.jar && rm -rf /tmp/cookies.txt init-saxon: @ echo -e "$(BUILD_PRINT)Saxon folder initialization $(END_BUILD_PRINT)" @@ -193,7 +193,7 @@ staging-dotenv-file: guard-VAULT_ADDR guard-VAULT_TOKEN vault-installed @ echo ELK_HOST=localhost >> .env @ echo ELK_PORT=5959 >> .env @ echo ELK_VERSION=1 >> .env - @ echo LOGGING_TYPE=PY,ELK >> .env + @ echo LOGGING_TYPE=${LOGGING_TYPE} >> .env @ echo XML_PROCESSOR_PATH=${XML_PROCESSOR_PATH} >> .env @ echo AIRFLOW_INFRA_FOLDER=~/airflow-infra/staging >> .env @ vault kv get -format="json" ted-staging/airflow | jq -r ".data.data | keys[] as \$$k | \"\(\$$k)=\(.[\$$k])\"" >> .env @@ -212,7 +212,7 @@ dev-dotenv-file: guard-VAULT_ADDR guard-VAULT_TOKEN vault-installed @ echo ELK_HOST=localhost >> .env @ echo ELK_PORT=5959 >> .env @ echo ELK_VERSION=1 >> .env - @ echo LOGGING_TYPE=PY,ELK >> .env + @ echo LOGGING_TYPE=${LOGGING_TYPE} >> .env @ echo XML_PROCESSOR_PATH=${XML_PROCESSOR_PATH} >> .env @ echo AIRFLOW_INFRA_FOLDER=${AIRFLOW_INFRA_FOLDER} >> .env @ vault kv get -format="json" ted-dev/airflow | jq -r ".data.data | keys[] as \$$k | \"\(\$$k)=\(.[\$$k])\"" >> .env @@ -232,7 +232,7 @@ prod-dotenv-file: guard-VAULT_ADDR guard-VAULT_TOKEN vault-installed @ echo ELK_HOST=localhost >> .env @ echo ELK_PORT=5959 >> .env @ echo ELK_VERSION=1 >> .env - @ echo LOGGING_TYPE=PY,ELK >> .env + @ echo LOGGING_TYPE=${LOGGING_TYPE} >> .env @ echo XML_PROCESSOR_PATH=${XML_PROCESSOR_PATH} >> .env @ echo AIRFLOW_INFRA_FOLDER=~/airflow-infra/prod >> .env @ vault kv get -format="json" ted-prod/airflow | jq -r ".data.data | keys[] as \$$k | \"\(\$$k)=\(.[\$$k])\"" >> .env @@ -259,7 +259,7 @@ elk-add-dotenv-file: logging-add-dotenv-file: @ echo -e "$(BUILD_PRINT)Add logging config to local .env file $(END_BUILD_PRINT)" @ sed -i '/^LOGGING_TYPE/d' .env - @ echo LOGGING_TYPE=PY,ELK >> .env + @ echo LOGGING_TYPE=${LOGGING_TYPE} >> .env refresh-mapping-files: @ python -m ted_sws.data_manager.entrypoints.generate_mapping_resources diff --git a/README.md b/README.md index cb38f7aa4..b49039113 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,15 @@ -#TED Semantic Web Services +# TED Semantic Web Services + +
+ +## Table of contents + +- [Developer documentation](#developer-documentation) +- [Installation](#installation) +- [Usage](#usage) + + +
## Developer documentation @@ -7,6 +18,8 @@ If you contribute to this project please refer to the following project document * [Enterprise architecture model file (in development)](https://drive.google.com/file/d/1YB2dPYe9E9bAR2peVraQaUANS-hXetms/view?usp=sharing) * [Meaningfy google Drive of the project (restricted)](https://drive.google.com/drive/folders/1wfWYDAtcaJrYTuB14VzTixr1mJUkCHYl?usp=sharing) +
+ ## Installation ### Installation of ted-sws package within external projects using terminal #### 1. Using the package manager pip @@ -36,6 +49,8 @@ install: make setup ``` +
+ ## Usage ### CLI tools (commands/console-scripts) for notice mapping suite manipulation @@ -180,6 +195,10 @@ mapping_suite_processor -c COMMAND1 -c COMMAND2 ... ``` to set custom commands (order) to be executed +
+ ## Contributions +
+ ## Licence \ No newline at end of file diff --git a/infra/airflow/Dockerfile b/infra/airflow/Dockerfile index bad3df082..e23391f3e 100644 --- a/infra/airflow/Dockerfile +++ b/infra/airflow/Dockerfile @@ -12,8 +12,8 @@ COPY requirements.txt /opt/airflow # working in the /opt/airflow WORKDIR /opt/airflow -RUN wget -c https://github.com/RMLio/rmlmapper-java/releases/download/v5.0.0/rmlmapper-5.0.0-r362-all.jar -P .rmlmapper/ -RUN mv .rmlmapper/rmlmapper-5.0.0-r362-all.jar .rmlmapper/rmlmapper.jar 2>/dev/null +RUN mkdir -p ./.rmlmapper +RUN wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1MckjzpvrCoChy_IRYC2S54tf3dFQNwEt' -O- | sed -rn \'s/.*confirm=\([0-9A-Za-z_]+).*/\1\n/p\'\)&id=1MckjzpvrCoChy_IRYC2S54tf3dFQNwEt" -O ./.rmlmapper/rmlmapper.jar && rm -rf /tmp/cookies.txt RUN pip install --upgrade pip RUN pip install --no-cache-dir -r requirements.txt --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.2.5/constraints-no-providers-3.8.txt" diff --git a/ted_sws/__init__.py b/ted_sws/__init__.py index 0364bd397..417845e50 100644 --- a/ted_sws/__init__.py +++ b/ted_sws/__init__.py @@ -66,6 +66,7 @@ def RML_MAPPER_PATH(self) -> str: class ELKConfig: + @property def ELK_HOST(self) -> str: return VaultAndEnvConfigResolver().config_resolve() @@ -82,6 +83,7 @@ def ELK_VERSION(self) -> int: class LoggingConfig: + @property def LOGGING_TYPE(self) -> str: return VaultAndEnvConfigResolver().config_resolve()