Skip to content

Incorrect serialization for "Command to rerun" for BoolParameter and OptionalParameter #3363

@arteymix

Description

@arteymix

BoolParameter appear as "False" in the GUI. They should be omitted if False and present otherwise without a value. There is also the parsing attribute to take into consideration, as an explicit bool parameter expects true or false (and not the title-case one).

OptionalParameter appear as "". I think they should be simply omitted when the value of the task is None.

As an example, in our pipeline, the --rerun option is a boolean and --srr is optional.

Image

Running this command as-is produces an error.

$ luigi --module rnaseq_pipeline.sources.sra rnaseq_pipeline.sources.sra.DownloadSraExperiment --metadata "{\"experiment_id\": \"GSE266876\", \"sample_id\": \"GSM8255390\"}" --rerun "False" --srx "SRX24426707" --srr ""
usage: luigi [--local-scheduler] [--module CORE_MODULE] [--help] [--help-all] [--rnaseq-pipeline.sources.sra.DownloadSraExperiment-metadata RNASEQ_PIPELINE.SOURCES.SRA.DOWNLOADSRAEXPERIMENT_METADATA]
             [--metadata METADATA] [--rnaseq-pipeline.sources.sra.DownloadSraExperiment-rerun] [--rerun]
             [--rnaseq-pipeline.sources.sra.DownloadSraExperiment-srx RNASEQ_PIPELINE.SOURCES.SRA.DOWNLOADSRAEXPERIMENT_SRX] [--srx SRX]
             [--rnaseq-pipeline.sources.sra.DownloadSraExperiment-srr RNASEQ_PIPELINE.SOURCES.SRA.DOWNLOADSRAEXPERIMENT_SRR] [--srr SRR]
             [Required root task]
luigi: error: unrecognized arguments: False

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions