-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
- Loading branch information
1 parent
87ad7f5
commit 1ce8753
Showing
8 changed files
with
198 additions
and
425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -369,4 +369,4 @@ legacyRecords/ | |
FAIR-DO-Lab/ | ||
tpm-test/ | ||
elastic-test/ | ||
src/legacy | ||
tmp/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# SPDX-FileCopyrightText: 2025 Karlsruhe Institute of Technology <maximilian.inckmann@kit.edu> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Copyright (c) 2025. Karlsruhe Institute of Technology | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import os | ||
from dotenv import load_dotenv | ||
|
||
load_dotenv() | ||
|
||
TPM_URL = os.getenv("TPM_URL") | ||
CHEMOTION_BASE_URL = os.getenv("CHEMOTION_BASE_URL") | ||
ELASTICSEARCH_URL = os.getenv("ELASTICSEARCH_URL") | ||
ELASTICSEARCH_INDEX = os.getenv("ELASTICSEARCH_INDEX") | ||
ELASTICSEARCH_APIKEY = os.getenv("ELASTICSEARCH_APIKEY") | ||
CACHE_DIR = os.getenv("CACHE_DIR") | ||
|
||
# Check if the environment variables are set | ||
if not TPM_URL: | ||
raise Exception("TPM_URL is not set") | ||
if not CHEMOTION_BASE_URL: | ||
raise Exception("CHEMOTION_BASE_URL is not set") | ||
if not ELASTICSEARCH_URL: | ||
raise Exception("ELASTICSEARCH_URL is not set") | ||
if not ELASTICSEARCH_INDEX: | ||
raise Exception("ELASTICSEARCH_INDEX is not set") | ||
if not ELASTICSEARCH_APIKEY: | ||
raise Exception("ELASTICSEARCH_APIKEY is not set") | ||
if not CACHE_DIR: | ||
raise Exception("CACHE_DIR is not set") | ||
|
||
# Check if the cache directory exists | ||
if not os.path.isdir(CACHE_DIR): | ||
os.makedirs(CACHE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.