Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[develop] Bugfix find task function in setup.py #745

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ush/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1276,17 +1276,19 @@ def get_location(xcs, fmt, expt_cfg):
def dict_find(user_dict, substring):

if not isinstance(user_dict, dict):
return
return False

for key, value in user_dict.items():
if substring in key:
return True
if isinstance(value, dict):
dict_find(value, substring)
if dict_find(value, substring):
return True

return False

run_make_ics = dict_find(rocoto_tasks, "task_make_ics")
run_make_lbcs = dict_find(rocoto_tasks, "task_make_ics")
run_make_lbcs = dict_find(rocoto_tasks, "task_make_lbcs")
run_run_fcst = dict_find(rocoto_tasks, "task_run_fcst")
run_any_coldstart_task = run_make_ics or \
run_make_lbcs or \
Expand Down