-
Notifications
You must be signed in to change notification settings - Fork 58
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 automated summaries #136
Conversation
@irgolic, if you confirm the design (you'll need this PR and https://github.com/biolab/orange3/pull/5308/files, but you can easily try other widgets, too), I'll remove summaries from other widgets, too. |
This is what I get upon opening any widget (tried File, Concatenate, Select Rows). Glad to hear it looks good. :D |
Oops, I forgot to push the PR in orange3 repo. Please pull biolab/orange3@087a2ae again. |
Please check the tooltip for multiple inputs in Concatenate. It is ... acceptable, but any suggestions are welcome. |
That looks amazing actually. Now that you've changed it to a form-type layout, the indents on a MultiInput (dots) may be redundant. Also, the top line in the message is redundant. That might be tricky to change though, as warnings use the same MessageWidget, and there, the top line is not redundant. And, can you |
I've made a few more changes to the tooltip. As you've seen, it's html with css. Please edit at will, you're much better at this than I am. Skipping space after comma was intentional; though grammatically incorrect, I wanted to keep those numbers closer. But feel free to add space. I like this so much that I have already changed all widgets (= removed the summary-related code). The only widget I left is |
No, I add it myself, specifically in the tool tip. I think it looks nicer, but you can remove it if you think it's better without. |
Or maybe even this: Now imagine the entries being selectable. On click, a transient Data Table window opens. @janezd, let me know which one of these I should push into the PR. |
Oh, I'm sorry about the line. I thought that you disliked the I really like V1, but bear in mind that the table's name can be As for locale separators, I've no strong opinion, but leaning towards commas because Orange is in English. Spaces instead of commas in the summary: if you like it better, do it. It's not much of an issue, it's not very common. |
I left separate commits in case we'd like to revert some. But at the end, yes, squash without mercy. (My last commit's message included "to be squashed".)
Which version? With this PR, as currently on github (just my commits, without any of your changes), it doesn't show any separators. |
Ah sorry, I've pushed now. |
Separators are still not shown. But I guess you've done all you can --
I pushed some more changes (simplified arguments). Please pull before changing further or squashing. |
I can get the separator to work if I set the locale within python code, e.g. import locale
locale.setlocale(locale.LC_ALL,
locale.getdefaultlocale()) I suspect locale is only broken in our dev environments, where it's set to C.UTF-8. Even so, I think I'd prefer to set it to en_US.UTF-8 for everyone, for now. |
Issue
Provide automated summaries for inputs and outputs. Ref: biolab/orange3#5108.
For proper effect, must be merged with biolab/orange3#5308, but nothing should break if not.
Also: resolves #109.
Description of changes
send
(only new-style signals are supported; this is intentionally as the "old-style" are deprecated for many many years)Auto-summary is generated if
auto_summary
flag is not explicitly set toFalse
,Summarizing functions are registered by adding another type to single-dispatched
orangewidget.utils.signals.summarize
, which must return an instance oforangewidget.utils.signals.PartialSummary
, e.g.The summary (first argument), can be
None
,int
or rich textstr
(it has to be html-safe!), and the second isNone
(if also the first isNone
) or a rich textstr
.(Non-consequential?) imcompatibility: if a widget already implement sets the output summary, the one who acts last will override the one who's first. That is, either nothing will change or the summary will (probably) improve.
Includes