-
Notifications
You must be signed in to change notification settings - Fork 208
Refactor pipeline downloads command to use nextflow inspect
for container detection
#3634
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
base: dev
Are you sure you want to change the base?
Changes from 101 commits
ae0d4dd
bbd297f
a9b2b00
2797752
dc333b3
fbc09ac
fee7182
c507d9e
aba5233
0403a37
159c34e
693da64
c5379fb
9bf7bb3
5dc30e2
563a330
8ee8eed
71ab538
a141820
4133c90
2b8fbd6
72b6d60
7813f30
cb71d42
2d8cb4d
4bfb45e
d6b8f6c
4abd736
31f5627
06d3760
3857fae
31fe914
02cc2ca
397ff11
0107a6c
141d4d8
b648bc1
467ba3f
ea4bc89
8038046
e4327f1
208daca
a446ee9
b9b8388
40be0b6
cb8a93b
7ca0875
1684127
0739df0
9913e56
c65d09f
0e0a5b8
8160181
9b695f2
7670666
b64a77f
35df64b
a18f611
6b44e74
41c7332
c5cf8e0
275adab
56a76b5
d58c282
1964d50
6de9f41
d1ce487
05adb4d
ced8df1
7a2da94
7dba881
a49ee12
a413d93
e2ddf3d
af44891
f4c5e66
cb6cfc9
7d7b391
1e414cd
4b5f617
828f1eb
414b81d
f4c7450
5bc767b
c48886e
c898730
da0a94f
caeacce
0afb74a
39af8e3
36cc046
bde85f9
bb84582
0141a16
cbd54fa
b444f1a
696230c
d6c4895
d9b0107
eb46d9c
29506be
b3c0677
3686f23
f13b067
af744e7
934fd7c
7615309
06262d6
a19b2c6
1f9669d
6cac4b3
8e4033f
ec703ef
be145e1
37d183d
1b5b2ea
fe1da84
1876ccc
66513ac
ad2130c
006b19e
951bbe7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ | |
) | ||
from nf_core.components.components_completion import autocomplete_modules, autocomplete_subworkflows | ||
from nf_core.components.constants import NF_CORE_MODULES_REMOTE | ||
from nf_core.pipelines.download import DownloadError | ||
from nf_core.pipelines.download.download import DownloadError | ||
from nf_core.pipelines.list import autocomplete_pipelines | ||
from nf_core.utils import check_if_outdated, nfcore_logo, rich_force_colors, setup_nfcore_dir | ||
|
||
|
@@ -400,33 +400,33 @@ def command_pipelines_lint( | |
@click.option( | ||
"-s", | ||
"--container-system", | ||
type=click.Choice(["none", "singularity"]), | ||
type=click.Choice(["none", "singularity", "docker"]), | ||
help="Download container images of required software.", | ||
) | ||
@click.option( | ||
"-l", | ||
"--container-library", | ||
multiple=True, | ||
help="Container registry/library or mirror to pull images from.", | ||
help="Container registry/library or mirror to pull images from. Not available for Docker containers.", | ||
) | ||
@click.option( | ||
"-u", | ||
"--container-cache-utilisation", | ||
type=click.Choice(["amend", "copy", "remote"]), | ||
help="Utilise a `singularity.cacheDir` in the download process, if applicable.", | ||
help="Utilise a `singularity.cacheDir` in the download process, if applicable. Not available for Docker containers.", | ||
) | ||
@click.option( | ||
"-i", | ||
"--container-cache-index", | ||
type=str, | ||
help="List of images already available in a remote `singularity.cacheDir`.", | ||
help="List of images already available in a remote `singularity.cacheDir`. Not available for Docker containers.", | ||
) | ||
@click.option( | ||
"-d", | ||
"--parallel-downloads", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think, @mirpedrol and @mashehu are quite strict on renaming existing CLI arguments, since breaking changes would, according to SemVer, require a new major version release (4.0.0). But maybe Click would map a Apart from that, CLI parameters in download are mostly standardized in a way that the first letter of the last term is their short flag: What was the reason you wish to rename? As far as I remember, it used to be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can be sloppy enough to see a long name change of a parameter not as a breaking change, especially if it is just because of semantics 🙂 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with this. I wouldn't change unless there is a good reason to. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair. But particularly because there is a short flag, I also do not necessarily see the need to abbreviate the long form. But that is not a hill to die on for me, so have it as you like. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do as you see fit, I will also not fight anyone on this :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. joining late to the party, but I would vote for keeping the long There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the interest of not changing the API I think I agree with you and others @mirpedrol -- I'll switch back the change. I think Julians suggestion with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we decided to not use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At NGI, we continue calling it Tower, since Platform is simply a more cumbersome generic name. But I doubt that many will still remember the old parameters - judged by the Slack discussions, very few people ever used that functionality anyway. So fine with me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see -- slightly annoying then that platform/tower perfectly cover the two normal parallelism short flags... I've reverted the change now 👍 |
||
"--parallel", | ||
type=int, | ||
default=4, | ||
help="Number of parallel image downloads", | ||
help="Number of allowed parallel tasks", | ||
) | ||
@click.pass_context | ||
def command_pipelines_download( | ||
|
@@ -443,7 +443,7 @@ def command_pipelines_download( | |
container_library, | ||
container_cache_utilisation, | ||
container_cache_index, | ||
parallel_downloads, | ||
parallel, | ||
): | ||
""" | ||
Download a pipeline, nf-core/configs and pipeline singularity images. | ||
|
@@ -462,7 +462,7 @@ def command_pipelines_download( | |
container_library, | ||
container_cache_utilisation, | ||
container_cache_index, | ||
parallel_downloads, | ||
parallel, | ||
) | ||
|
||
|
||
|
@@ -2359,7 +2359,7 @@ def command_create_params_file(pipeline, revision, output, force, show_hidden): | |
@click.option( | ||
"-s", | ||
"--container-system", | ||
type=click.Choice(["none", "singularity"]), | ||
type=click.Choice(["none", "singularity", "docker"]), | ||
help="Download container images of required software.", | ||
) | ||
@click.option( | ||
|
Uh oh!
There was an error while loading. Please reload this page.