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 WDL dir contents in tests #76

Open
4 tasks
sckott opened this issue Jan 23, 2025 · 4 comments
Open
4 tasks

Validate WDL dir contents in tests #76

sckott opened this issue Jan 23, 2025 · 4 comments
Assignees
Labels
infrastructure Infrastructure fix to execute WDL GitHub Actions

Comments

@sckott
Copy link
Collaborator

sckott commented Jan 23, 2025

So there's some expectations that we have of contents in each WDL dir (what others call unit tests) that are not checked right now in code, but should be:

  • validate that the .wdl file in the dir has the same exact name as the dir name
  • inputs.json and options.json: we look for these, but at least in 1 case, there was an inputs file that was a different name and so we just silently didn't load it, leading to confusion. probably warn if there's some other files (json or otherwise) so the program doesn't stop but there's a warning at least - or maybe error since a warning could be missed?
  • validate that if there's an inputs.json file there's only 1, same for options.json
  • anything else?
@sckott sckott added the infrastructure Infrastructure fix to execute WDL GitHub Actions label Jan 23, 2025
@tefirman
Copy link
Collaborator

Love this idea. And I'm assuming we would want all of the other GitHub actions to "depend" on this one? i.e. they will only run if this check completes successfully first?

Might also want to check for the data subdirectory in case each test needs example data (see arrayOperations)

One other thing we might eventually want to check for is a "cromwell.conf" configuration file, but not now.

@sitapriyamoorthi
Copy link
Collaborator

Maybe relevant but from what I know about womtools it only accepts 1 JSON file so if there are workflows that have two input jsons (for example sometime one may write a json that specifes parameters as a separate json) both of those wont be parsed and the validate will fail.

@sckott
Copy link
Collaborator Author

sckott commented Jan 23, 2025

@tefirman

And I'm assuming we would want all of the other GitHub actions to "depend" on this one?

No, I'm not proposing a new gh action file. The logic would be in python code for both the api and java classes https://github.com/FredHutch/wdl-unit-tests/blob/main/tests/cromwellapi/cromwell.py and https://github.com/FredHutch/wdl-unit-tests/blob/main/tests/cromwelljava/utils.py

@sckott
Copy link
Collaborator Author

sckott commented Jan 23, 2025

thanks @sitapriyamoorthi

the way the Womtool class works in https://github.com/FredHutch/wdl-unit-tests/blob/main/tests/cromwelljava/utils.py is it look for a file called inputs.json and only uses that as input in addition to the wdl file, so any additional files would be ignored. this does mean (just as for the CromwellJava class) that we need to check that files names are in the accepted set - which we'll do as discussed here

@sckott sckott self-assigned this Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Infrastructure fix to execute WDL GitHub Actions
Projects
None yet
Development

No branches or pull requests

3 participants