Skip to content

Commit

Permalink
minor changes in check_input_data_list
Browse files Browse the repository at this point in the history
  • Loading branch information
alperaltuntas committed Oct 16, 2024
1 parent 4dd9150 commit 58aa08e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/check_input_data_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def wrapper():
# Remove all remaining files with expandable variables, since they most likely correspond to output file names
files = {f for f in files if "$" not in f}

# For entries corresponding to relative or absolute paths, extract the file name:
# For entries corresponding to relative or absolute paths, retrieve only the file name:
files = {f.split("/")[-1] for f in files}

# Filter out known exceptions:
Expand Down Expand Up @@ -122,9 +122,10 @@ def extract_values(d):
# If not, print the missing files and raise an error
missing_files = mom_input_files - input_data_list_files
if missing_files:
print(
"The following files are in MOM_input.yaml but not in input_data_list.yaml:"
raise ValueError(
"Below parameter value(s) in MOM_input.yaml are suspected to be input file name(s), "
"but are not present in input_data_list.yaml. If these are indeed input files, "
"please add them to input_data_list.yaml. If not, please update this CI test module "
"to exclude them from the check e.g., by adding them to the EXCEPTIONS list.\n\n "
+ "\n ".join(missing_files)
)
for file in missing_files:
print(file)
raise ValueError("Above files are missing in input_data_list.yaml")

0 comments on commit 58aa08e

Please sign in to comment.