Skip to content
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

Document params-file and improve self-update #2673

Merged
merged 5 commits into from
Apr 23, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,12 @@ facilitates rapid iterations, inspections of any pipeline as well as debugging.
$ nextflow run nextflow-io/hello -with-tower


- Invoke the nextflow pipeline execution with a custom parameters ``YML`` file.
abhi18av marked this conversation as resolved.
Show resolved Hide resolved
The parameters which are specified through this mechanism are merged with the resolved configuration (base configuration and profiles) and only the common fields are overwritten by the ``YML`` file.::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The params file can be YAML or JSON. I would say YAML/JSON file instead of YML file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also @pditommaso we should clarify what happens if you provide params through a config file and a params file via CLI arguments. I think the params file takes priority but I'm not certain.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this question has come up recently #2662

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was missing this conversation. The CLI params overrides the ones the json/yaml file.

You can see it here, it reads the params file and put it into the result map. then if there are cli params copy them over the result map.

final result = [:]
final file = getParamsFile()
if( file ) {
def path = validateParamsFile(file)
def type = path.extension.toLowerCase() ?: null
if( type == 'json' )
readJsonFile(path, configVars, result)
else if( type == 'yml' || type == 'yaml' )
readYamlFile(path, configVars, result)
}
// set the CLI params
if( !params )
return result
for( Map.Entry<String,String> entry : params ) {
addParam( result, entry.key, entry.value )
}

abhi18av marked this conversation as resolved.
Show resolved Hide resolved

$ nextflow run main.nf -params-file pipeline_params.yml


--------------------
self-update
--------------------
Expand All @@ -1284,7 +1290,8 @@ Update the nextflow runtime to the latest available version.

**Description**

The ``self-update`` command directs the ``nextflow`` cli to update itself to the latest stable release.
The ``self-update`` command directs the ``nextflow`` cli to update itself to the latest stable release.
The ``self-update`` command also updates the `Nextflow launcher script <https://github.com/nextflow-io/nextflow/blob/master/nextflow>`_ in addition to the Java artifacts, whereas the ``NXF_VER`` environment variables only updates the Java artifacts.
abhi18av marked this conversation as resolved.
Show resolved Hide resolved


**Examples**
Expand Down