-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mk_runtool use p_type #780
Comments
I was wondering if this change would simplify the runtool generation, but then immediately forgot about it... |
Me too, that's why I created the issue so we don't forget. I was also wondering if we can do things 'on the fly' instead of pre-generating each individual too/.par file -- but we probably have too many special cases (scripts(*), parnames that start with numbers, etc) that it's probably not worth the effort.) (*)Though I know Joe's team is working on converting the script to python so maybe that's one less barrier. |
Hmmm, so this is with CIAOX. When asking for
Wondering if it was because this was a boolean, I try with an integer value with min and max set and get even odder behaviour:
Aha. It seems to query when the value is not set (so for |
For reference, here's what happens when you have a list of options (here for
and the environment paths get expanded for you - e.g.
rather than returning |
Humm, not sure if the emails went through if you open w/ 'rH' (upper case) then you don't get prompted ... you still get the exception if the min/max isn't set In [3]: ff = pio.paramopen("dmstat", "rH")
In [6]: pio.pget(ff, "maxiter.p_min")
Out[6]: '1'
In [7]: pio.pget(ff, "maxiter.p_max")
/home/kjg/cxcds_param4/dmstat.par: parameter error? : maxiter.p_max
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[7], line 1
----> 1 pio.pget(ff, "maxiter.p_max")
ValueError: pget() Parameter not found and You can use 'p_value' to get the parameter value before it has been resolved, so In [1]: import paramio as pio
In [2]: zz = pio.paramopen("merge_obs", "rH")
In [3]: pio.pget(zz, "tmpdir.p_value")
Out[3]: '${ASCDS_WORK_PATH}'
In [4]: pio.pget(zz, "tmpdir")
Out[4]: '/tmp' |
Ta. Now get back to not-being-at-work! |
So, we tried this and it didn't work for 4.16. Let's leave this open in cae we change the |
With CIAO 4.16 we will have access to a parameter's
p_type
so together with using theplist
method we could replace the line parsingciao-contrib/mk_runtool.py
Lines 145 to 152 in 22bbae8
with individaul pget's to each of the
p_foo
properties (p_min
,p_max
,p_prompt
,p_value
, and nowp_type
).The text was updated successfully, but these errors were encountered: