Fix for ccpp_track_variables.py: Need "recursive=True" for glob on .meta files#581
Conversation
…rent directory levels
gold2718
left a comment
There was a problem hiding this comment.
def review_pr581(approved=False):
if not approved:
approved = review_pr581(approved=not approved)
return approved
dustinswales
left a comment
There was a problem hiding this comment.
@mkavulich This change looks good to me.
Should this PR be targeting the main branch?
|
@dustinswales @mkavulich I vote for targeting |
|
I'm a bit conflicted on the merge destination here: While I would love to merge directly to My preferred solution is that SCM can point directly to this hash on the |
Because of the change in directory structure for CCPP physics (ufs-community/ccpp-physics#99), there are now
.metafiles at different levels in the directory tree. Theccpp_track_variables.pyscript needs the location of these.metafiles as an input argument to the script, but the call toglob.globin the script does not use therecursive=Trueargument, so even if the user passes in the argument-m './physics/physics/**/'(which should include all subdirectories), the call toglob.globonly searches one level. Our simple test case only has.metafiles at a single directory level, so we never caught this issue.Simply adding the
recursive=Trueargument fixes this issue.User interface changes?: No
Fixes: #580 ccpp_track_variables.py is broken since CCPP physics directory structure was reorganized
Testing:
test removed: none
unit tests: Passing
system tests: none
manual testing: See Issue #580