mintproject / mic

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

If parameter is string white space gets removed #152

Open Cmheidelberg opened 4 years ago

Cmheidelberg commented 4 years ago

Describe the bug White space from string parameters gets removed when run

To Reproduce

root@chris-ubuntu20:/home/chris/Desktop/tests/docker_issue  (master)# mic encapsulate step6
Downloading the base image and building your image
Adding inputs
The execution directory is available /home/chris/Desktop/tests/docker_issue/executions/06_12_11_44_27/src
Running 
 ./run   -i1 inp.in  -p1 params work and the white space is getting removed
+++ Run Log +++
| python my-script.py paramsworkandthewhitespaceisgettingremoved
| Hello World!
|  paramsworkandthewhitespaceisgettingremoved
| set -e
| cd /tmp/mint
| . /tmp/mint/output.sh
+++ End Log +++
Run complete
Success
root@chris-ubuntu20:/home/chris/Desktop/tests/docker_issue  (master)# cat mic.yaml 
inputs:
  inp_in:
    path: data/inp.in
    description: ''  # insert description left of this comment
parameters:
  parameter1:
    default_value: "params work and the white space is getting removed"  # value added by MIC. Replace with your own default value
    description: ''  # insert description left of this comment
step: 6
last_execution_dir: /home/chris/Desktop/tests/docker_issue/executions/06_12_11_44_27/src
root@chris-ubuntu20:/home/chris/Desktop/tests/docker_issue  (master)# 

As you can see the parameter is declared with spaces between the words but passed with no white space.

Potential Solution: string parameters should be passed with quotes around the message

Example

+++ Run Log +++
| python my-script.py "params work and the whitespace is getting removed" 
| Hello World!
|  params work and the whitespace is getting removed
| set -e
| cd /tmp/mint
| . /tmp/mint/output.sh
+++ End Log +++
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.97. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

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