Added src/test/resources/corpora_repos.json, which describes corpora of public WDLs that we use for testing. There is an entry for each corpus (GitHub repository), and within each corpus are any number of entrypoints, each of which may be an individual WDL or a directory with multiple WDLs. In the latter case, some WDLs may be specifically included or excluded. The WDLs in an entrypoint may need to be fixed using the wdlTools fix command ("fix": true). The WDLs in an entrypoint may be expected to fail parsing or type-checking ("fail": true); if so, a reason is given.
The corpora WDLs are not committed to GitHub. Instead, the clone-corpora.sh script needs to be run first. The corpora tests are skipped if the src/test/resources/corpora directory does not exist.
This PR also fixes a number of issues uncovered by the test cases:
Allow primitive -> String coercion for WDL versions <= 1.0
Fixes the grammar for expressions, because the order of operations was not being respected for unary operations
A parameter_meta key that does not correspond to an input or output parameter is now ignored with a warning unless parsing in strict mode
Previously, imports were cached using their relative path, which could lead to unexpected results if two imports have the same relative path. Now absolute paths are used.
Fixes case where the fix tool would generate an invalid declaration
Added
src/test/resources/corpora_repos.json
, which describes corpora of public WDLs that we use for testing. There is an entry for each corpus (GitHub repository), and within each corpus are any number of entrypoints, each of which may be an individual WDL or a directory with multiple WDLs. In the latter case, some WDLs may be specifically included or excluded. The WDLs in an entrypoint may need to be fixed using thewdlTools fix
command ("fix": true
). The WDLs in an entrypoint may be expected to fail parsing or type-checking ("fail": true
); if so, a reason is given.The corpora WDLs are not committed to GitHub. Instead, the
clone-corpora.sh
script needs to be run first. The corpora tests are skipped if thesrc/test/resources/corpora
directory does not exist.This PR also fixes a number of issues uncovered by the test cases:
String
coercion for WDL versions <= 1.0parameter_meta
key that does not correspond to an input or output parameter is now ignored with a warning unless parsing instrict
modefix
tool would generate an invalid declaration