-
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
problem with runtool update #816
Comments
Darn it. I was thinking it was becasue of #815 (comment) but after 2s of reflection I think it's because
|
Actually, it is related to my earlier concern. Here's the CIAO 4.15 code:
whereas we now have
The problem is that the |
So, we can
I'm leaning towards the former but open to input. |
I'm not sure what it does with the min/max redirects ... if all it does is additional work to evaluate them then I'm not sure it's worth it. It look like it's checked when the parameter is set rather than when the tool is run ... so order matters ... so if i set the max before the min, I can set the max to anything and an error is raised when the tools is run: >>> from ciao_contrib.runtool import csmooth
>>> csmooth.sclmax = 1
>>> csmooth.sclmin = 10
>>> csmooth()
pset: parameter below minimum : sclmax
/tmp/tmp3cuuw3xx.csmooth.par: parameter below minimum : sclmax
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/export/ciao_from_source/ciao-4.15/contrib/lib/python3.9/site-packages/ciao_contrib/runtool.py", line 1836, in __call__
stackfiles = self._update_parfile(parfile)
File "/export/ciao_from_source/ciao-4.15/contrib/lib/python3.9/site-packages/ciao_contrib/runtool.py", line 1396, in _update_parfile
self._update_parfile_verify(parfile, stackfiles)
File "/export/ciao_from_source/ciao-4.15/contrib/lib/python3.9/site-packages/ciao_contrib/runtool.py", line 1326, in _update_parfile_verify
oval = _to_python(ptype, pio.pget(fp, oname))
ValueError: pget() Parameter not found vs. if I set the min first, then the value is validated >>> from ciao_contrib.runtool import csmooth
>>> csmooth.sclmin=10
>>> csmooth.sclmax = 1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/export/ciao_from_source/ciao-4.15/contrib/lib/python3.9/site-packages/ciao_contrib/runtool.py", line 1107, in __setattr__
self._validate(pname, val, store=True)
File "/export/ciao_from_source/ciao-4.15/contrib/lib/python3.9/site-packages/ciao_contrib/runtool.py", line 1051, in _validate
raise ValueError(f"{self._toolname}.{pname} must be >= {pinfo.lo} but set to {pstr}")
ValueError: csmooth.sclmax must be >= )sclmin but set to 1 so what it's currently doing looks a little fragile. A quick grep through and it looks like |
The current design is to apply the constraint (on min/max) when the parameter is set, not when the command is actually run, I think but haven't checked. I could also add it at run time. Not that that helps with this particular issue. |
If we don't think there's a fix coming can we revert this back to the original? This casues the |
I hit an error running regression tests this week w/ the changes in #815 . The
csmooth
sclmax
parameter with the parameter redirect isn't working.gives
if I take out the
sclmax
line it runs.The text was updated successfully, but these errors were encountered: