mintproject / mic

Model Insertion Checker
https://mic-cli.readthedocs.io/en/latest/
5 stars 3 forks source link

String parameters in commands fail in components due to extra quotes. #288

Closed dgarijo closed 4 years ago

dgarijo commented 4 years ago

Bug detected originally by @brandomr

Describe the bug I created a simple python component which takes a string parameter in the command line:

python linemodel.py config.json --p "parameter dos"

It just prints the --p parameter on the screen.

However, after declaring everything in the mic.yaml file: python linemodel.py config.json --p ${p}

When mic runs the component, there are errors:

./run   -i1 /tmp/mint/mic/executions/07_29_00_37_51/src/x.csv  -o1 y_csv.csv  -p1 10 -p2 "parameter dos"
+ pushd .
/tmp/mint/mic/executions/07_29_00_37_51/src /tmp/mint/mic/executions/07_29_00_37_51/src
+ python linemodel.py config.json --p '"parameterdos"'
Parameter d: 'Banana'
Parameter command line: "parameterdos"
+ popd
/tmp/mint/mic/executions/07_29_00_37_51/src
+ set +x

Mic added additional quotes around the parameter and removed the spaces, which is incorrect. Note that in the mic.yaml file the parameter does not appear with quotes.

To Reproduce See attached component, it has all the details and the executions produced by mic.

Expected behavior MIC should not add those double quotes if the parameter is already with quotes. mic.zip

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.99. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

mosoriob commented 4 years ago

Fixed v1.3.3