-
Notifications
You must be signed in to change notification settings - Fork 646
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
Evolution of Nextflow command line interface #3595
Comments
I think we should refactor the For example, we would replace |
Not sure, then there could be an argument to change an of them. It would be nice if the user expectation is just to add an extra |
There are currently three types of version help: $ nextflow -v
nextflow version 23.01.0-edge.5834
$ nextflow -version
N E X T F L O W
version 23.01.0-edge build 5834
created 14-01-2023 17:31 UTC (11:31 CDT)
cite doi:10.1038/nbt.3820
http://nextflow.io
$ nextflow info
Version: 23.01.0-edge build 5834
Created: 14-01-2023 17:31 UTC (11:31 CDT)
System: Linux 4.19.104-microsoft-standard
Runtime: Groovy 3.0.14 on OpenJDK 64-Bit Server VM 17.0.6+10
Encoding: UTF-8 (UTF-8) I think we should simplify this in the v2 CLI by making $ nextflow -v
nextflow version 23.01.0-edge.5834
$ nextflow -version
nextflow version 23.01.0-edge.5834
$ nextflow info
Version: 23.01.0-edge build 5834
Created: 14-01-2023 17:31 UTC (11:31 CDT)
System: Linux 4.19.104-microsoft-standard
Runtime: Groovy 3.0.14 on OpenJDK 64-Bit Server VM 17.0.6+10
Encoding: UTF-8 (UTF-8)
Cite: doi:10.1038/nbt.3820
Website: http://nextflow.io |
I think the main goal should be just to mirror the existing functionality in this iteration, and plan to address inconsistencies in a second step. |
I don't think there should be any conversion whatsoever. The types of parameters should be fully at the control of workflow developers. I recall an issue in nf-core where it was required that |
On In the interest of simplicity I would remove them, and perhaps rely on a more generic solution as with the current |
Do you mean doing
or
The latter is a bit more generic (it allows commands to be built progressively), though the former is more intuitive to most users I suspect. The former gets a bit spicey when you have positional arguments in a CLI, but I don't think you have that for nextflow run (everything requires a name). |
@pditommaso I would like some clarity on this one as well. Do you want options like |
This is open for discussion. My preference is for the latter option, but it also depends on the constraints on the implementation side. |
We can support either syntax with picocli. I think it would be good to go through the options that you want to support multiple values. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Just chiming in here because I've been hitting my head on some of these issues lately. There are two issues with the current CLI as far as I see it, here are my (completely unsolicited) opinions on both: 1
Personally I would expect to be able to set any part of the config nest map hierarchy with something like 2Config object values are type AnsibleTheir approach is to have two ways to specify config params on the command line, simple ini format In our case that would mean having to do something like I find json literals on the command line to be pretty ugly, but it does offer unambiguous flexibility and I think its something most users can understand intuitively DBTDBT takes an approach similar to ansible, but its a little bit more palatable since they are allowing YAML literals For example:
YAML has a whole typing syntax that users are probably familiar with and is a little less verbose. However you open yourself up to the wide world of inconsistent YAML-spec implementations (the YAML spec is really wide ranging, most libs implement it incompletely or just wrong), unsafe parsing, etc. So I probably wouldn't recommend bringing YAML into a project that hasn't been exposed to it already. TerraformIn terraform all config variables (known as
A type and description must be declared for all variables. Thus config variables can be specified with a simple syntax Making users declare all their params would be huge design change from how nextflow works now, which alone is probably a nonstarter, sounds like a tough upgrade path. Another option that nobody usesOne possibility which I've never seen anyone use in a major framework is to just put a type hint in the cli argument itself: Something like this:
I think its probably self explanatory why this approach is not popular but it could work. If no type hint is provided you could default to string so at least it would be backwards compatible. However this approach will make the command line parsing code much worse, and probably wouldn't be very compatible with frameworks like |
After thinking on it, I don't think we should try to expose all config settings over the command line, even though a few scopes like Not to mention, the configuration overhaul (#2723) could render the whole feature moot if it goes in a different direction. I think we should keep the existing options, because we might as well, and if anything just make them more GNU compliant (i.e. |
However the problem here is that the As a best practice, users should not enable things like docker and conda by default in their pipeline config, instead they should enable them in profiles. That way they won't need to use e.g. |
Nextflow CLI is quite flexible, however, there are some legacy problems hard to solve without re-engineering it.
Common problems are:
-long-option
instead of more --common--long-option
--fooBar
and--foo-bar
) for pipeline params can create ambiguity and unexpected errorsThe goal of this issue is to introduce a nextflow command line tool, named
nf
to address the above issue and keep backward compatibility with the existing command line whenever possible.The following features should be supported
-
is only used for single char options and the prefix--
is used for options for two or more characters.--
separate e.g.nextflow run <pipeline> --resume -- --foo --bar
See also #556
The text was updated successfully, but these errors were encountered: