-
Notifications
You must be signed in to change notification settings - Fork 98
Resolve the NotifierNotFound error in testsuite #601
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
Changes from all commits
357263d
6e95485
1f174d9
9f64a74
c299e5a
4067035
51fcdce
0138600
306e8d9
9dc4ba1
7b54518
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |
| Instance, | ||
| Int, | ||
| List, | ||
| observe, | ||
| Property, | ||
| Str, | ||
| Trait, | ||
|
|
@@ -676,13 +677,12 @@ def _determine_axis(self): | |
| else: | ||
| return 0 | ||
|
|
||
| def __mapper_changed(self, event): | ||
| self.deselect() | ||
|
|
||
| def _axis_changed(self, old, new): | ||
| if old is not None: | ||
| self.plot.observe( | ||
| self.__mapper_changed, old + "_mapper", remove=True | ||
| ) | ||
| if new is not None: | ||
| self.plot.observe(self.__mapper_changed, new + "_mapper") | ||
| @observe([ | ||
| "component.index_mapper", | ||
| "component.value_mapper", | ||
| "_plot.index_mapper", | ||
| "_plot.value_mapper" | ||
|
Comment on lines
+681
to
+684
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually don't think we want this It is possible I am missing something here and we need to specify them as optional for some reason, but the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am happy to undo this revert if needed. @rahulporuri lmk what you think on this
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can't we just use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried doing this but the added test fails |
||
| ]) | ||
| def _axis_mapper_updated(self, event): | ||
| if event.name == self.axis + "_mapper": | ||
| self.deselect() | ||
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.
So
plotis_plotif it exists or else it iscomponent. If we're hooking things up directly tocomponent, then we're going to have bugs ifplotproperty i.e._plotis ever set.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.
i guess we can use
traitfrom observe and hook up_plot.index_mapperand_plot.value_mapperif_plotexists.Actually, what happens if we listen to
plot.index_mapperandplot.value_mapper?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.
In this case the added test
test_notifiers_connectedfails withdeselectnever being calledThere 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.
I added
_plot.index_mapperand_plot.value_mapperto the observe decorator, along with a test (which previously failed) for checking that if we do explicitly setplot, we still get notified of changes.