You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SciJava Ops descriptions output is confusing, can we improve it? #146
The first two filter.gauss entries accept a Double [] while the last two only accept a single Double. Whats the difference? (Is it possible to add a docstring like description to the ops.descriptions() output?).
Are all these parameters required? (I know the "?" signifies that the OutOfBoundFactory is optional, but I think we need something more obvious...can't we just add [optional] to the op's description unicode output?)
Things I like about the output:
I think the spacing of the output from ops.descriptions is great. I like the indent scheme, it helped my eyes navigate what is usually a mess.
(I know the "?" signifies that the OutOfBoundFactory is optional, but I think we need something more obvious...can't we just add [optional] to the op's description unicode output?)
More and more I think we need more than one output mode: at least two, like "short" and "full" or some such. Seeing the fully qualified class names annoys me, and seeing "[Optional]" would also annoy me.
(Is it possible to add a docstring like description to the ops.descriptions() output?).
I heartily agree with this suggestion. Maybe we could model the "full" mode after Python's help presentation a bit more?
Speaking of which, I really think there should be a function ops.help which presents the information in this way. It is a much friendlier name than descriptions. I would rename descriptions to list actually, since that's what it's doing: giving a list of ops. And it could return an OpList object which implements List<OpInfo>, and which stringifies nicely—it could even have methods like help() and help(boolean shortMode) to control details of the stringification. I would actually put these help methods on the OpInfo interface itself, and then make OpList just loop its OpInfo objects to generate a concatenated string.
Relatedly: @tpietzsch expressed the desire to query the ops system for candidate matches, without necessarily invoking all the fancier subsystems like adaptation and simplification. The hints mechanism should help with this, but it makes me think that a really good place for this list/help functionality would be as methods of the op builder classes. Being able to obtain an OpList from a partially or fully built query would be really nice.
@gselzerscijava/incubator#95 is great! I think you addressed all my concerns with regard to finding ops. My remaining point that needs to be addressed is if we can improve how we present an optional parameter. While I think the ? works, I'm afraid its not obvious enough to potential users. Just to be clear, this is not a hill I'm willing to die on. But I'd like your thoughts on it.
Activity
ctrueden commentedon Oct 24, 2023
More and more I think we need more than one output mode: at least two, like "short" and "full" or some such. Seeing the fully qualified class names annoys me, and seeing "[Optional]" would also annoy me.
I heartily agree with this suggestion. Maybe we could model the "full" mode after Python's
helppresentation a bit more?Speaking of which, I really think there should be a function
ops.helpwhich presents the information in this way. It is a much friendlier name thandescriptions. I would renamedescriptionstolistactually, since that's what it's doing: giving a list of ops. And it could return anOpListobject which implementsList<OpInfo>, and which stringifies nicely—it could even have methods likehelp()andhelp(boolean shortMode)to control details of the stringification. I would actually put thesehelpmethods on theOpInfointerface itself, and then makeOpListjust loop itsOpInfoobjects to generate a concatenated string.ctrueden commentedon Oct 24, 2023
Relatedly: @tpietzsch expressed the desire to query the ops system for candidate matches, without necessarily invoking all the fancier subsystems like adaptation and simplification. The hints mechanism should help with this, but it makes me think that a really good place for this
list/helpfunctionality would be as methods of the op builder classes. Being able to obtain anOpListfrom a partially or fully built query would be really nice.gselzer commentedon Nov 28, 2023
@elevans with scijava/incubator#95 merged, what else do you want to see here?
elevans commentedon Nov 29, 2023
@gselzer scijava/incubator#95 is great! I think you addressed all my concerns with regard to finding ops. My remaining point that needs to be addressed is if we can improve how we present an optional parameter. While I think the
?works, I'm afraid its not obvious enough to potential users. Just to be clear, this is not a hill I'm willing to die on. But I'd like your thoughts on it.hinerm commentedon Nov 29, 2023
@elevans @gselzer How do you feel about parentheticals?
Merge pull request #100 from scijava/scijava/scijava-ops-engine/clari…
Merge pull request #146 from scijava/scijava-ops-indexer/rename-op-files