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

Removed caching of Table values #850

Merged
merged 5 commits into from
Sep 7, 2016
Merged

Removed caching of Table values #850

merged 5 commits into from
Sep 7, 2016

Conversation

jlstevens
Copy link
Contributor

This PR allows Tables to be updated with streams by disabling the caching of cell values in TablePlot. I've tested that streams now work but I won't be confident that everything is working as it should until the tests pass.

@jlstevens
Copy link
Contributor Author

One consequence of using streams is that it isn't possible for TablePlot to adjust the size of the table based on future (unknown) values. This will always be an issue using DynamicMap so I only want to point out this problem as I'm not sure how it can be solved.

@@ -117,7 +115,7 @@ def initialize_plot(self, ranges=None):
for col in range(element.cols):
if summarize and row > half_rows:
adjusted_row = (element.rows - self.max_rows + row)
cell_value = self.cell_values[self.keys[-1]][(row, col)]
cell_value = element.pprint_cell(row, col)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't both of these calls also pass the return value through the pprint_value method on TablePlot, I'm not sure why both the element and the plot need a pprint method but I assume there was a reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well spotted! I've just pushed a commit to fix this.

@philippjfr
Copy link
Member

Looks good now. Happy to merge when tests pass.

@philippjfr philippjfr merged commit 24d1137 into master Sep 7, 2016
@philippjfr philippjfr deleted the table_update_fix branch September 27, 2016 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants