-
Notifications
You must be signed in to change notification settings - Fork 52
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
Zip URI imports locally in local WDL #610
Comments
@yunhailuo Thank you for the detailed report 👍 The assert in question was supposed to be a sanity check for the usual case when the imported WDL does share some common prefix with the importing WDL, but forgot to allow/ignore the case where there's no common prefix at all. I put your example as a regression test and the log shows how the URL is rewritten:
(The intent of the commonprefix business is to abbreviate the URL-derived subdirectory when all the relevant WDLs are at least on the same server) |
Thank you very much for the quick fix. Tested and work like a charm
Close this and look forward to the next release. |
First, thank you for the great tool!
To start with, I come from @rhpvorderman 's recommendation and try to package LOCAL WDL with http(s) imports. To be clear, I haven't tested zip http(s) main wdl but my reading of the code seems suggesting that could work find.
Key errors
MCVE
Sorry I might missed the discussion thread for #550 . My preliminary understanding on how
zip
works is__outside_wdl
fromos.path.commonprefix
below and rewrite imports accordingly.file://
, zipped locally due to the common prefix error mentioned above.Guess on intention
I'm guessing the initial design might be download and put http(s) imports under
__outside_wdl/http(s)/
? I think this is a great design. But what I get lost is this code section: https://github.com/chanzuckerberg/miniwdl/blob/main/WDL/Zip.py#L116-L118 :abspath2
for all http(s) imports will becomehttp(s)_*
main_dir
goes through the same transformation but my issue here ismain_dir
is local so it's still/*
prefix = os.path.commonprefix
will always be empty thus failed the assertionI'm wondering if I misunderstand the design and use zip in a wrong way. Briefly, my development need is I have a local WDL workflow/repo imported some public http(s) wdl and want to package it locally. Is the best practice pushing to http(s) repo before packaging the workflow and there are complications I missed if I don't zip it that way?
The text was updated successfully, but these errors were encountered: