-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
OWAnnotator: add heuristics for choosing the right x and y #1046
Conversation
The test is currently not working. It continues to throw "PC1" as |
widget = self.create_widget(OWAnnotator) | ||
c = preprocess(Corpus.from_file("slo-opinion-corpus.tab")) | ||
self.send_signal(widget.Inputs.corpus, c[:20]) | ||
self.wait_until_finished() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you create a new widget within a test you need to pass it to the wait_until_finished:
self.wait_until_finished(widget=widget)
Beside that, the wait_until_finished has nothing to do with the attributes. It waits for run
to finish, i.e. on_done
to happen.
However, it should be called (wait_until_finished) anyway not to mess up the other tests.
self.send_signal(widget.Inputs.corpus, c[:20]) | ||
self.wait_until_finished() | ||
controls = widget.controls | ||
self.assertEqual(controls.attr_x, "t-SNE-x") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
controls.attr_x
is a QCombo
and not a string.
string is a corresponing property widget.attr_x.name
.
So you can either do:
self.assertEqual(controls.attr_x.currentText(), "t-SNE-x")
or
self.assertEqual(widget.attr_x.name, "t-SNE-x")
.
Another thing, your data has PCA instead of tSNE.
e1e97e1
to
edf91c8
Compare
edf91c8
to
a399811
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1046 +/- ##
==========================================
- Coverage 82.51% 82.25% -0.27%
==========================================
Files 92 93 +1
Lines 12400 12448 +48
Branches 1695 1699 +4
==========================================
+ Hits 10232 10239 +7
- Misses 1855 1896 +41
Partials 313 313 |
Issue
When a corpus contains continuous metas, they are used for plotting instead of t-SNE variables.
Description of changes
Use heuristics to set t-SNE variables as default variables for plotting.
Includes