Skip to content

Commit

Permalink
addjst to cached API response for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Griesfeller committed Sep 9, 2024
1 parent 647dd11 commit cb2217a
Show file tree
Hide file tree
Showing 2 changed files with 83,774 additions and 16 deletions.
22 changes: 6 additions & 16 deletions src/pyaro_readers/actrisebas/ActrisEbasReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,12 @@ def __init__(
self._def_data = self._read_definitions(file=DEFINITION_FILE)
for var in vars_to_read:
self._metadata[var] = {}
# for testing since the API is error-prone and slow
if test_flag:
test_file = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
"..",
"..",
"..",
"tests",
"testdata",
"ACTRIS_EBAS",
f"{var}.json",
)
if not os.path.exists(test_file):
raise ActrisEbasTestDataNotFoundException(
f"test file not found: {test_file}"
)
# for testing since the API is error-prone and slow at the time of this writing
test_file = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
f"{var}.json",
)
if os.path.exists(test_file) and test_flag:
with open(test_file, "r") as f:
json_resp = json.load(f)
else:
Expand Down
Loading

0 comments on commit cb2217a

Please sign in to comment.