I need to make sure the scripting variable "params" has all the variables, even the defaults, when running from the command line so that they can easily be reported. Kristoff is interested in this. For example:
java -jar local/autoplot/opt/autoplot-dev/autoplot.devel.jar --headless --testPngFilename=foo.png --script='https://github.com/autoplot/dev/blob/master/rfe/sf/866/multiParamGraphic.jy' ncenter=5 ann=""
Interestingly ann="" doesn't seem to work, so I should check on that too.
Here's Jython code to print all the parameters, once this is done:
for p in params:
print '%s=%s' % ( p, params[p] )
I found that the command line path where we just read the script and go doesn't have all the defaults. I experimented with reading in the script first and getting all the parameters, which can be done in less than 50ms, which seems acceptible to me.
Alternatively, we could set the default values in params to as each getParam call is made, but this would require an update to the initialization script, which is a little difficult.
Don't print warning "parameter value was null" message because PWD is set to None, this is expected.
Also, there's a format argument to the constraints, which should reformat the timerange, for example. This should be reflected in the parameters.
See also https://sourceforge.net/p/autoplot/feature-requests/360/
Running the script from the script editor doesn't load the defaults.
This is fixed. Note .jyds scripts may not show preferences. Also rfe 360 has a new "getParam" routine which needs to be implemented. This will involve pushing new Jython codes out and is a pain.
It looks like I was dropping the PWD and dom values, so scripts like this:
were suddenly failing when run in the script editor.
This is fixed.
Darrelle was affected by this new feature. She had a script where two parameters had the same name by mistake. The script would run in old Autoplots fine, but in the new Autoplot both variables would have the last default value. This demos:
This points out a bug where this wasn't caught by old Autoplots, since there are some modes where this wouldn't work. I now detect this condition in getGetParams.
This is allowed:
This is done.