Closed mosoriob closed 4 years ago
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.79. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
If the variable is a string. The result must be
./test.sh "${string_variable}
How can we know how to map parameters to their mic.yaml values? If two parameters share the same value there is no way to automatically know which is which. (without some type of standardized way to declare parameters)
.
.
.
parameters:
start_year:
default_value: 2015
type: int
description: start year
base_altitude:
default_value: 2015
type: int
description: starting altitude in meters
invocation:
./my_script.py 2015 2015 input.csv
current wrapper generated:
./my_script.py 2015 2015 ${input_csv}
wrapper we want:
./my_script.py ${start_year} ${base_altitude} ${input_csv}
or
./my_script.py ${int_variable_1} ${int_variable_2} ${input_csv}
The name of the variable is the key of the dictionary
./my_script.py ${start_year} ${base_altitude} ${input_csv}
Ups, I read it again. My previous comment was dumb.
The position is not a problem because you are going to detect the parameters from the command line invocation.
So the user would type the invocation using the parameter's name (instead of value)?
In this particular case the user would have to edit the yaml file, as there is no way for us to determine which parameter goes where. I think the same thing would happen if we had the same file read twice in different inputs.
If you detect the parameters automatically, you don't have the problem
On Mon, Jul 13, 2020, 6:36 PM Daniel Garijo notifications@github.com wrote:
In this particular case the user would have to edit the yaml file, as there is no way for us to determine which parameter goes where. I think the same thing would happen if we had the same file read twice in different inputs.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mintproject/mic/issues/254#issuecomment-657915293, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASBUJRIJBS4L3FPUOXYXGTR3OZBBANCNFSM4OYYUW3A .
Maybe I am missing something, but if my invocation command is
python myscript.py input1.csv input1.csv 5 5 5 5
How do I know which 5
is which parameter?
If you detect the parameters automatically. Then, you have an array with three values. P1, p2 and p3.
Next, you write in the mic.yaml.
On Mon, Jul 13, 2020, 6:51 PM Daniel Garijo notifications@github.com wrote:
Maybe I am missing something, but if my invocation command is python myscript.py input1.csv input1.csv 5 5 5 5 How do I know which 5 is which parameter?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mintproject/mic/issues/254#issuecomment-657919079, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASBUJXDDKUCMGCYEDU2HELR3O22LANCNFSM4OYYUW3A .
Four values *
On Mon, Jul 13, 2020, 6:55 PM Maximiliano Osorio maxiosorio@gmail.com wrote:
If you detect the parameters automatically. Then, you have an array with three values. P1, p2 and p3.
Next, you write in the mic.yaml.
On Mon, Jul 13, 2020, 6:51 PM Daniel Garijo notifications@github.com wrote:
Maybe I am missing something, but if my invocation command is python myscript.py input1.csv input1.csv 5 5 5 5 How do I know which 5 is which parameter?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mintproject/mic/issues/254#issuecomment-657919079, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASBUJXDDKUCMGCYEDU2HELR3O22LANCNFSM4OYYUW3A .
Right, that is the desired behavior indeed. Last time I checked this I had to change the values in src. I will have to retry again :)
@sirspock just to make sure we are on the same page. If the user's invocation line is
./my_script.py 2015 2015 input.csv
Then the auto generated invocation in run.sh should be
./my_script.py ${int_variable_1} ${int_variable_2} ${input_csv}
?
Im just worried we will lose information about the parameter unless we ask the user for a name/ description of what each parameter is for.
The parameters part is missing
Originally posted by @sirspock in https://github.com/mintproject/mic/issues/203#issuecomment-657736757