-
Notifications
You must be signed in to change notification settings - Fork 449
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
Support bytecode-based requests for interactive engine #36
Conversation
/CC @yecol for a review, |
Codecov Report
@@ Coverage Diff @@
## main #36 +/- ##
==========================================
+ Coverage 77.26% 77.35% +0.09%
==========================================
Files 48 48
Lines 4336 4355 +19
==========================================
+ Hits 3350 3369 +19
Misses 986 986
Continue to review full report at Codecov.
|
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.
/cc @shirly121
|
||
It also has a method called `subgraph` which can extract some fragments | ||
from origin graph, produce a new, smaller but concise graph stored in vineyard, | ||
which lifetime is independent from the origin graph. | ||
|
||
Use `execute()` to submit a script, | ||
ans use `traversal_source()` to get a `GraphTraversalSource` for further traversal. |
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.
ans
-> and
.
Could you please use a more readable line-breaks in comment? The following would be better:
Use `execute()` to submit a script, and use `traversal_source()` to get a `GraphTraversalSource`
for further traversal.
That doesn't affect the generated docs but will benifit the readability of source code. It would be great to think you are writing a document or paper when writing docstring in comments.
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.
Yes, I already noticed the typo and have a fix locally, and I'm thinking combine the typo fixes with other comments to avoid another unnecessary CI.
|
||
Examples: | ||
|
||
..code:: python |
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.
Bad indent.
Examples:
.. code:: python
xxxxx
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 think sections are supposed to indent after the section header?
ref: https://www.sphinx-doc.org/en/master/usage/extensions/example_google.html#example-google
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 didn't realize the Examples:
is a directive here, but please double check the generated doc.
Returns: | ||
`GraphTraversalSource` | ||
""" | ||
return traversal().withRemote(DriverRemoteConnection(self._graph_url, "g")) |
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.
Is the parameter "g"
a hard-coded constant value?
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.
Not exactly, but suffice for out scenario, just like the Client
case before.
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.
Then could "g"
will be used repeatly?
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.
Yes if you are talking about using g
repeatedly across graph instances.
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.
What will happen on the same graph instance?
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.
Nothing happens, you can get two traversal source that works normally.
They are same if you look at the initialization of Client
in
self._client = Client(self._graph_url, "g") |
What do these changes do?
Support bytecode-based requests for interactive engine.
User can get a
GraphTraversalSource
to traversal a remote graph by usinginteractive.traversal_source()
whereinteractive
is created bysess.gremlin(graph)
.Examples:
Related issue number
Fixes #35