New helper function to help with file downloads#55
New helper function to help with file downloads#55prototaxites merged 24 commits intonf-core:mainfrom
Conversation
Co-authored-by: Jim Downie <19718667+prototaxites@users.noreply.github.com>
prototaxites
left a comment
There was a problem hiding this comment.
Couple of other thoughts:
-
Is it worth having a plain
curlfunction that just downloads a file to a specific location without extracting? -
Do we want to support any other common archive formats -
.zip, for instance, with separate functions?
I thought about that, but Nextflow is already able to stage standalone files. Is
I can rename the function to
That could form |
This is true, but I was thinking that this might be helpful in cases where one might need to perform further operations on a file prior to usage - e.g., download a gzipped fasta and ungzip it.
I like that idea! |
|
Almost there. Will finish after dinner |
in case it cannot be automatically detected
|
I really like this, and for me, this is more settings things up outside Nextflow/nf-test, so we can rely less on modules to download and extract files we need for tests. |
prototaxites
left a comment
There was a problem hiding this comment.
This looks good to me! I will give it a quick build and try replacing my nf-test with it, to see that it handles a "real" use-case - but I suspect there will be no issues.
|
It does indeed work! |
|
Super ! Can you please merge, then ? I don't have write permissions |
Introducing
curlAndExtract.This function can be used when tests need a tailored database to be downloaded and unzipped/untarred before the test starts. One version of the method auto-detects the format based on the name, but I also provide another method for URLs that are a bit obscure.
cc @prototaxites : we have a few of those in our tests !