-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Async Table and View Constructor #1289
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sc1f
changed the title
Async Table and View constructors
Async Table and View constructor
Jan 12, 2021
sc1f
force-pushed
the
async-table-view
branch
from
January 12, 2021 23:02
b9c078c
to
7fbc586
Compare
sc1f
force-pushed
the
async-table-view
branch
from
January 15, 2021 23:10
a95cef2
to
8d0c2aa
Compare
4 tasks
sc1f
force-pushed
the
async-table-view
branch
3 times, most recently
from
January 19, 2021 16:36
5721e8a
to
14a5e11
Compare
sc1f
changed the title
Async Table and View constructor
Async Table and View Constructor
Jan 19, 2021
sc1f
force-pushed
the
async-table-view
branch
2 times, most recently
from
January 19, 2021 21:56
60c9c1e
to
3e3ad08
Compare
2 tasks
sc1f
force-pushed
the
async-table-view
branch
from
January 25, 2021 17:02
3e3ad08
to
392a660
Compare
WIP: await table.view() clean up server Fix rest of viewer, refactor perspective/api/server Fix examples, JS tests, jupyterlab to use async view constructor Fix examples and JS core tests, TODO: fix websocket tests Node server returns promise to view Fix filter test for computed Fix jupyterlab - use async view Async table constructor Fix examples and docs Fix tests, jupyterlab for async table constructor Fix engine tests Fix jupyterlab for remote table Fix jlab build - use fat build WIP: fix workspace tests wait_for_update must be true otherwise the screenshot happens before table is loaded async refactor jupyter widget rebase on master, fix docs, tests, benchmark rebase on master, fix docs, tests, benchmark suite fix jlab tests update jlab, webpack plugin to 0.6.0, remove test.run update jlab, webpack plugin to perspective 0.6.0 remove test.run async table/view on tornado client fix all tests Errors thrown with verbose message from WASM, remove closure compiler assert that we can load a promise Skip flaky d3fc tests rebase master
texodus
force-pushed
the
async-table-view
branch
from
February 12, 2021 01:44
392a660
to
900022c
Compare
texodus
approved these changes
Feb 12, 2021
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.
Looks good! Thanks for the PR!
I fixed up the regressions since 0.6.0
, and reverted the test changes (these are mostly fixed on master anyway and I'm not sure this PR's test fixes do ..)
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes a breaking public API change:
The
table()
andview()
constructors in Javascript and the Python Tornado client are nowasync/await
. In Javascript,perspective.table()
andtable.view()
now return Promises that will resolve to a Table or View, or be rejected with an error. This allows for much clearer error handling during table and view construction, especially in the client/server model where it is important for the client to know why a table/view could not be constructed and to act on that error information. Additionally, this enables better error reporting fromperspective-viewer
itself, as the viewer canload()
aPromise() => Table
and display the error if the promise is rejected.Additionally, this PR also improves the error reporting of the WASM binding. Previously, an error message was logged to
console.warning
and anError("Abort()"
was thrown:This PR simplifies error reporting by throwing an
Error
with the custom error message that was previously just logged, which should simplify the way errors are thrown and make the error condition more clear:Changelog
Table
andView
constructors in JS, and Python Tornado clientperspective-viewer
,perspective-viewer-jupyterlab
to use async/await constructorsRunning benchmarks on this PR, 0.6.0, and 0.5.6 shows that performance is not impacted by this API change: