You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by jo...@apache.org on 2017/11/23 08:16:06 UTC
[31/50] tinkerpop git commit: Used a closure to solve concat issue in
feature test setup
Used a closure to solve concat issue in feature test setup
Ended up going this route on the master branch and decided to backport it to tp32 CTR
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/691ee9b2
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/691ee9b2
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/691ee9b2
Branch: refs/heads/TINKERPOP-1827
Commit: 691ee9b269765aea86ddccc953cfa98f8f52fc0b
Parents: 78a1095
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Nov 22 14:10:28 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Nov 22 14:10:28 2017 -0500
----------------------------------------------------------------------
gremlin-python/src/main/jython/radish/terrain.py | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/691ee9b2/gremlin-python/src/main/jython/radish/terrain.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/terrain.py b/gremlin-python/src/main/jython/radish/terrain.py
index 5897852..0c749eb 100644
--- a/gremlin-python/src/main/jython/radish/terrain.py
+++ b/gremlin-python/src/main/jython/radish/terrain.py
@@ -95,20 +95,6 @@ def __create_lookup_e(remote):
# hold a map of the "name"/edge for use in asserting results - "name" in this context is in the form of
# outgoingV-label->incomingV
- projection_of_edges = g.E().group(). \
- by(project("o", "l", "i").
- by(outV().values("name")).
- by(label()).
- by(inV().values("name"))). \
+ return g.E().group(). \
+ by(lambda: ("it.outVertex().value('name') + '-' + it.label() + '->' + it.inVertex().value('name')", "gremlin-groovy")). \
by(tail()).next()
- edges = {}
-
- # in GraphSON 3.0 the "key" will be a dictionary and this can work more nicely - right now it's stuck as
- # a string and has to be parsed
- for key, value in projection_of_edges.items():
- o = re.search("o=(.+?)[,\}]", key).group(1)
- l = re.search("l=(.+?)[,\}]", key).group(1)
- i = re.search("i=(.+?)[,\}]", key).group(1)
- edges[o + "-" + l + "->" + i] = value
-
- return edges