Skip to content
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

Correctly sync shared datasources #1254

Merged
merged 1 commit into from
Apr 9, 2017
Merged

Correctly sync shared datasources #1254

merged 1 commit into from
Apr 9, 2017

Conversation

philippjfr
Copy link
Member

Adds a context manager which ensures that while updating a composite plot any datasources shared among multiple subplots are appropriately synced, avoiding warnings and bokehjs errors. Fixes #1135.

@philippjfr philippjfr added tag: backend: bokeh type: bug Something isn't correct or isn't working labels Apr 8, 2017
def update_frame(self, key, ranges=None):
"""
Update the internal state of the Plot to represent the given
key tuple (where integers represent frames). Returns this
state.
"""
source_cols = self.handles.get('source_cols', {})
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

@@ -1224,6 +1224,45 @@ def test_shared_axes_disable(self):
self.assertEqual((x_range.start, x_range.end), (-.5, .5))
self.assertEqual((y_range.start, y_range.end), (-.5, .5))

def test_layout_shared_source_synced_update(self):
hmap = HoloMap({i: Dataset({chr(65+j): np.random.rand(i+2)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comments and check source_cols is A, B, C, D

@jlstevens
Copy link
Contributor

Happy to merge once you've addressed those two comments.

@philippjfr
Copy link
Member Author

Addressed the comments, ready to merge when tests pass.

@jlstevens
Copy link
Contributor

Had to restart the tests due to transients but they are all passing now. Merging.

@jlstevens jlstevens merged commit d408876 into master Apr 9, 2017
@philippjfr philippjfr deleted the shared_source_fix branch April 11, 2017 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag: backend: bokeh type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants