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

Validate WDLs using miniwdl #385

Merged
merged 5 commits into from
Aug 26, 2022

Conversation

VJalili
Copy link
Member

@VJalili VJalili commented Aug 8, 2022

This PR implements a python script that uses the miniwdl python bindings to validate (only errors) a list of given WDL files.

@VJalili VJalili requested a review from mwalker174 August 8, 2022 18:28
scripts/test/miniwdl_validation.py Outdated Show resolved Hide resolved
Comment on lines 43 to 48
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.")
Copy link
Collaborator

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.

Copy link
Member Author

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?

Copy link
Collaborator

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.

Copy link
Member Author

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.

@VJalili VJalili merged commit 3f269e8 into broadinstitute:master Aug 26, 2022
@VJalili VJalili deleted the miniwdl-validation branch August 26, 2022 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants