-
Notifications
You must be signed in to change notification settings - Fork 2
WIP: Update for 3.x #2
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
base: master
Are you sure you want to change the base?
WIP: Update for 3.x #2
Conversation
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.
Please hit the '...' on the top-right and select 'view file' to see the rendered version.
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.
Please hit the '...' on the top-right and select 'view file' to see the rendered version.
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.
LGTM apart from:
- As the readme is specially treated on GitHub and in IDEs, it would be nice if the contents of the sample notebook could be displayed there, even if it's just a verbatim copy of the sample notebook as-rendedered.
- It would be nice to have variable interpolation back, which is gone unless I'm mistaken. I also don't really like the idea of setting the result to a top-level namespace variable, which may have unintended behaviour. If you don't like providing the variable name as an argument, perhaps it could be accessed via a
last_result
class variable of the module instead? Moving values in and out of different modules and extensions is pretty key for Jupyter, so it's important that these features work smoothly.
Must do:
What is the goal of this PR?
Updates the plugin for TypeDB 3.x. The simplified driver implementation & protocol has also allowed us to move to a different architecture. Major changes include:
Major new 'features'
%typedb
line magic for general administrative commands, and%%typeql
cell magic for running queriesSubtle UX changes
_typeql_result
variable (as well as returning it to the cell) - no magic parameter to specify the variable name. Just re-assign it in the next cell.Missing features:
What are the changes implemented in this PR?
I've taken inspiration from the 2.x version, but also taken the freedom to move to a more opinionated architecture which resembles TypeDB console. Specifically:
%typedb
and%%typeql
magics.SubCommand
s reflecting each%typedb <sub-command>
I'm not married to any of these and it should be straightforward to re-implement them if there's demand for it.