You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by rd...@apache.org on 2018/10/05 11:37:55 UTC
[33/48] tinkerpop git commit: Renamed `TP` to `TextP` as proposed by
@robertdale
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f057fb36/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py
index 266e23d..2d32d47 100644
--- a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py
+++ b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphsonV3d0.py
@@ -27,7 +27,7 @@ from aenum import Enum
from gremlin_python import statics
from gremlin_python.statics import FloatType, FunctionType, IntType, LongType, TypeType, DictType, ListType, SetType
-from gremlin_python.process.traversal import Binding, Bytecode, P, TP, Traversal, Traverser, TraversalStrategy, T
+from gremlin_python.process.traversal import Binding, Bytecode, P, TextP, Traversal, Traverser, TraversalStrategy, T
from gremlin_python.structure.graph import Edge, Property, Vertex, VertexProperty, Path
# When we fall back to a superclass's serializer, we iterate over this map.
@@ -284,15 +284,15 @@ class PSerializer(_GraphSONTypeIO):
return GraphSONUtil.typedValue("P", out)
-class TPSerializer(_GraphSONTypeIO):
- python_type = TP
+class TextPSerializer(_GraphSONTypeIO):
+ python_type = TextP
@classmethod
def dictify(cls, p, writer):
out = {"predicate": p.operator,
"value": [writer.toDict(p.value), writer.toDict(p.other)] if p.other is not None else
writer.toDict(p.value)}
- return GraphSONUtil.typedValue("TP", out)
+ return GraphSONUtil.typedValue("TextP", out)
class BindingSerializer(_GraphSONTypeIO):
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f057fb36/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index 151d6d5..4777ef3 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -21,7 +21,7 @@ import json
import re
from gremlin_python.structure.graph import Graph, Path
from gremlin_python.process.graph_traversal import __
-from gremlin_python.process.traversal import Barrier, Cardinality, P, TP, Pop, Scope, Column, Order, Direction, T, Pick, Operator, IO
+from gremlin_python.process.traversal import Barrier, Cardinality, P, TextP, Pop, Scope, Column, Order, Direction, T, Pick, Operator, IO
from radish import given, when, then
from hamcrest import *
@@ -256,7 +256,7 @@ def _make_traversal(g, traversal_string, params):
"Direction": Direction,
"Order": Order,
"P": P,
- "TP": TP,
+ "TextP": TextP,
"IO": IO,
"Pick": Pick,
"Pop": Pop,
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f057fb36/gremlin-test/features/filter/Has.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Has.feature b/gremlin-test/features/filter/Has.feature
index 9d2bf4f..e272c05 100644
--- a/gremlin-test/features/filter/Has.feature
+++ b/gremlin-test/features/filter/Has.feature
@@ -563,7 +563,7 @@ Feature: Step - has()
Given the modern graph
And the traversal of
"""
- g.V().has("name", TP.contains("ark"))
+ g.V().has("name", TextP.contains("ark"))
"""
When iterated to list
Then the result should be unordered
@@ -574,7 +574,7 @@ Feature: Step - has()
Given the modern graph
And the traversal of
"""
- g.V().has("name", TP.startsWith("mar"))
+ g.V().has("name", TextP.startsWith("mar"))
"""
When iterated to list
Then the result should be unordered
@@ -585,7 +585,7 @@ Feature: Step - has()
Given the modern graph
And the traversal of
"""
- g.V().has("name", TP.endsWith("as"))
+ g.V().has("name", TextP.endsWith("as"))
"""
When iterated to list
Then the result should be unordered
@@ -596,7 +596,7 @@ Feature: Step - has()
Given the modern graph
And the traversal of
"""
- g.V().has("person", "name", TP.contains("o").and(P.lt("m")))
+ g.V().has("person", "name", TextP.contains("o").and(P.lt("m")))
"""
When iterated to list
Then the result should be unordered
@@ -607,7 +607,7 @@ Feature: Step - has()
Given the modern graph
And the traversal of
"""
- g.V().has("name", P.gt("m").and(TP.contains("o")))
+ g.V().has("name", P.gt("m").and(TextP.contains("o")))
"""
When iterated to list
Then the result should be unordered
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f057fb36/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
index cb4abab..8f7d035 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
@@ -23,7 +23,7 @@ import org.apache.tinkerpop.gremlin.LoadGraphWith;
import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
import org.apache.tinkerpop.gremlin.process.traversal.P;
-import org.apache.tinkerpop.gremlin.process.traversal.TP;
+import org.apache.tinkerpop.gremlin.process.traversal.TextP;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
import org.apache.tinkerpop.gremlin.structure.Edge;
@@ -791,27 +791,27 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
@Override
public Traversal<Vertex, Vertex> get_g_V_hasXname_containsXarkXX() {
- return g.V().has("name", TP.contains("ark"));
+ return g.V().has("name", TextP.contains("ark"));
}
@Override
public Traversal<Vertex, Vertex> get_g_V_hasXname_startsWithXmarXX() {
- return g.V().has("name", TP.startsWith("mar"));
+ return g.V().has("name", TextP.startsWith("mar"));
}
@Override
public Traversal<Vertex, Vertex> get_g_V_hasXname_endsWithXasXX() {
- return g.V().has("name", TP.endsWith("as"));
+ return g.V().has("name", TextP.endsWith("as"));
}
@Override
public Traversal<Vertex, Vertex> get_g_V_hasXperson_name_containsXoX_andXltXmXXX() {
- return g.V().has("person","name", TP.contains("o").and(P.lt("m")));
+ return g.V().has("person","name", TextP.contains("o").and(P.lt("m")));
}
@Override
public Traversal<Vertex, Vertex> get_g_V_hasXname_gtXmX_andXcontainsXoXXX() {
- return g.V().has("name", P.gt("m").and(TP.contains("o")));
+ return g.V().has("name", P.gt("m").and(TextP.contains("o")));
}
}
}
\ No newline at end of file