You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which example.txt file should the workflow read? Should it be the one in the root directory example.txt or the nested directory nested/example.txt? Or should it be relative to the WDL file itself?
Also, if the input JSON is a URL instead, for example: miniwdl run https://example.com/test.wdl -i https://example.com/test.json
Assuming the server has the same WDL/JSON files for test.wdl and test.json, should example.txt in this case refer to the url https://example.com/example.txt or a local file on the machine?
The text was updated successfully, but these errors were encountered:
The prohibition would be on using relative paths in path literals in WDL files. For your use case it would probably be better to allow the user to pass a relative path on the command line or in an input.json rather than hard-code a relative path in the WDL.
To answer the original question - I think the only thing that can work is for paths to be relative to the folder that contains the .json input file. This is an implementation detail left up to the execution engine, but I think it should at least be suggested in the spec to handle relative paths in this way.
Right now Toil is interpreting the paths relative to the directory you are in when you launch the workflow, and then we have special magic code for when the JSON comes from a Github URL to interpret them as relative to the repository root. This is ugly and doesn't make a lot of sense; I think it happens for free because we see the path and we just try and open it.
Given a directory structure like this:
If
nested/test.wdl
is executed with a JSON input ofnested/test.json
where test.wdl and test.json are:Which
example.txt
file should the workflow read? Should it be the one in the root directoryexample.txt
or the nested directorynested/example.txt
? Or should it be relative to the WDL file itself?Also, if the input JSON is a URL instead, for example:
miniwdl run https://example.com/test.wdl -i https://example.com/test.json
Assuming the server has the same WDL/JSON files for
test.wdl
andtest.json
, shouldexample.txt
in this case refer to the urlhttps://example.com/example.txt
or a local file on the machine?The text was updated successfully, but these errors were encountered: