-
Notifications
You must be signed in to change notification settings - Fork 100
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
Add displayName and display options to Params (See #10474) #3562
Conversation
These were initially suggested by Curtis during work on imagej-omero in order to allow storing the same info that's available in IJ2 plugins as params. No GUI code is currently consuming the fields, but if they are present for 5.1.0, then further PRs can.
Looks good. This reminds me that @jburel and I previously discussed a flag for scripts to indicate that they shouldn't show up in the scripts menu. E.g. populate_rois, or all the various Figure scripts. I just noticed that scripts UI is broken on trout (almost certainly not due to this PR!).. |
@will-moore : would "bool display" get you that? Or you would need that in the DB? |
@joshmoore Sounds good. Presumably this would be set in the script declaration?
|
Yes. With this PR in, we could try to update one of the existing scripts to make use of display, and see if that gets us anywhere. |
@joshmoore Yes, would be good to try it with Figure scripts. It looks like the currently broken script parameters is not just in web, but it's working OK in develop. @joshmoore @jburel Any ideas which PR may be causing this? |
Thanks, @joshmoore. |
@joshmoore Were you going to add script parameter for |
@will-moore's comment is more if we can hide the script itself not only one parameter |
@joshmoore No - it appears to me that that commit is about hiding a parameter. I'm asking about hiding a script. |
Ah, understood. I'll look into it. Thanks. |
So on this front: at the moment at least, you don't grab the scripts, only the file paths, correct? |
I actually grab the scripts to get the paths etc, so could easily test for 'display' at this point. |
I've added the field, @will-moore, but you'd have to individually load |
Ah, OK - understood. |
This is leading to marshaling exceptions (with hard to track down UI problems). Closing for the moment. Minimally we would need to invalidate all the params that are stored in the DB. |
The SciJava module framework's And the Here is the current thing that converts from So we already have mappings for type, description, required/optional, multiple choice, min and max. Relevant parameter-level fields that SciJava has which OMERO scripting does not yet have:
Relevant module-level fields that SciJava has which OMERO scripting does not yet have:
OK, I just saw that you closed this, so I'll stop writing a novel since we might not have the luxury of adding any fields in the near future... |
Not at all, @ctrueden. We're just trying a new schema of more proactively closing a PR when it's causing problems. This will be re-opened. I just have to find a good way to invalidate the script cache. |
OK, sounds good. Let me know if you have any questions about any of the above, then. |
The change to Scripts.ice effectively invalidated all script params stored in the DB. Unders some conditions (for some users and some scripts), the exceptions raised in the parse method did not lead to a null JobParams being returned, but rather to an incomplete one. This had an odd effect on clients: both insight and web failed to load the GUI while the CLI died with an exception: ``` File "lib/python/omero/plugins/script.py", line 513, in print_params self.ctx.out(" Type: %s" % v.prototype.ice_staticId()) AttributeError: 'NoneType' object has no attribute 'ice_staticId' ```
Pushed improved error handling. |
@ctrueden : from reading your novel, is an appropriate summary of things to consider (initially) |
Recommend:
Consider:
|
Before merging, I would recommend to double check that |
|
@pwalczysko I can confirm that scripts are working OK in trout. |
@jburel - I could imagine a situation where you might want the menu hierarchy to be organised differently or named differently than the actual file path. But, as discussed above re: |
I suppose it fits CSS somewhat: "visible" about if to display, "display" about how to display? |
I think we should not rush for 5.1, since we still need to discuss parameters to expose. I will close it for now and re-open during the 5.1.x or 5.2 |
I'm not sure it can be opened for 5.1.x; at least, we'll need to put some thought into whether or not it will cause any problems. (Need a cross-version test) |
Due to the busy schedule, 5.2 is probably more realistic |
Closing again for the moment then. Trello cards all appropriately filed. |
These were initially suggested by Curtis during work
on imagej-omero in order to allow storing the same
info that's available in IJ2 plugins as params. No
GUI code is currently consuming the fields, but if
they are present for 5.1.0, then further PRs can.
cc: @ctrueden @jburel @gusferguson @will-moore @knabar