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

Web launch tool previews JSON with quotes #717

Closed
ewels opened this issue Mar 26, 2021 · 2 comments
Closed

Web launch tool previews JSON with quotes #717

ewels opened this issue Mar 26, 2021 · 2 comments
Labels
bug Something isn't working high-priority High priority pipeline-tools Interfaces for working with pipelines interactively

Comments

@ewels
Copy link
Member

ewels commented Mar 26, 2021

The web launch final JSON preview wraps non-string entities in quotes. If copied into a params file for Nextflow, this breaks with the new schema validation code as that checks variable types and complains that everything is a string.

Steps to reproduce:

  • Clicking Launch on a pipeline such as nf-core/eager
  • Fill in the form, setting some boolean and numeric values
  • Check the Launch parameters saved page after submission - preview JSON has quotes around booleans and numeric fields:

For example:

{
    "run_bam_filtering": "true",
    "bamutils_clip_half_udg_left": "2"
}

Should be:

{
    "run_bam_filtering": true,
    "bamutils_clip_half_udg_left": 2
}

If running nf-core launch --id xxx to pull these results, they go via the command line tools and the correct types seem to be used in the output JSON (though that has its own problems still!).

@ewels ewels added bug Something isn't working high-priority High priority pipeline-tools Interfaces for working with pipelines interactively labels Mar 26, 2021
@mashehu
Copy link
Contributor

mashehu commented Mar 26, 2021

oh, I think I fixed the number parsing for the builder, but didn't know that the launch does a similar thing: https://github.com/nf-core/nf-co.re/pull/565/files. We solved the boolean parsing there with: https://github.com/mashehu/nf-co.re/blob/master/public_html/assets/js/nf-core-schema-builder.js#L388-L396. Something similar should work here.

@mashehu
Copy link
Contributor

mashehu commented Jun 4, 2021

Tested it now and seems to be fixed.

@mashehu mashehu closed this as completed Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority High priority pipeline-tools Interfaces for working with pipelines interactively
Projects
None yet
Development

No branches or pull requests

2 participants