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

Conversation

abhi18av
Copy link
Member

Updated the documentation for --params-file and self-update

docs/cli.rst Outdated Show resolved Hide resolved
docs/cli.rst Outdated Show resolved Hide resolved
docs/cli.rst Outdated
@@ -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.
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 )
}

Copy link
Member Author

@abhi18av abhi18av left a comment

Choose a reason for hiding this comment

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

Accomodate Ben's review about the JSON optoin.

docs/cli.rst Outdated Show resolved Hide resolved
docs/cli.rst Outdated Show resolved Hide resolved
Copy link
Member

@pditommaso pditommaso left a comment

Choose a reason for hiding this comment

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

Ok, updated it removing the refence to the NXF_VER. Eventually it could be added into a tip section

@pditommaso pditommaso merged commit 1e008f4 into master Apr 23, 2022
@pditommaso pditommaso deleted the abhinav/update-docs branch April 23, 2022 09:24
@pditommaso pditommaso added this to the 22.04.0 milestone Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants