-
Notifications
You must be signed in to change notification settings - Fork 73
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
Validate WDLs using miniwdl #385
Conversation
scripts/test/miniwdl_validation.py
Outdated
wdl_filenames = [] | ||
for filename in args.files: | ||
if filename.endswith(".wdl"): | ||
wdl_filenames.append(filename) | ||
if len(wdl_filenames) != len(args.files): | ||
print(f"Warning! Of {len(args.files)} provided files, {len(wdl_filenames)} are WDL.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular use case you're thinking of with this check? I could see this being useful if a directory were being searched, but since each file is specified I would simply expect validation to fail if one of them isn't a WDL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be a useful check if the script is invoked as python miniwdl_validation.py wdl/*.*
where the wdl
directory contains files other than *.wdl
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see yes that would be useful, although we usually don't need to validate every wdl, just ones that are part of the "canonical" pipeline i.e. have test inputs available (see validation.sh script for how we do that). Either way, fine to leave it like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. I removed this filtering to simplify the script.
Co-authored-by: Mark Walker <[email protected]>
This PR implements a python script that uses the miniwdl python bindings to validate (only errors) a list of given WDL files.