[PR] Bump github/codeql-action from 2 to 3 [tinkerpop]
dependabot[bot] opened a new pull request, #2400: URL: https://github.com/apache/tinkerpop/pull/2400 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. Release notes Sourced from https://github.com/github/codeql-action/releases";>github/codeql-action's releases. CodeQL Bundle v2.15.4 Bundles CodeQL CLI v2.15.4 (https://github.com/github/codeql-cli-binaries/blob/HEAD/CHANGELOG.md";>changelog, https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4";>release) Includes the following CodeQL language packs from https://github.com/github/codeql/tree/codeql-cli/v2.15.4";>github/codeql@codeql-cli/v2.15.4: codeql/cpp-queries (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/cpp/ql/src/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/cpp/ql/src";>source) codeql/cpp-all (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/cpp/ql/lib/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/cpp/ql/lib";>source) codeql/csharp-queries (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/csharp/ql/src/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/csharp/ql/src";>source) codeql/csharp-all (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/csharp/ql/lib/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/csharp/ql/lib";>source) codeql/go-queries (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/go/ql/src/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/go/ql/src";>source) codeql/go-all (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/go/ql/lib/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/go/ql/lib";>source) codeql/java-queries (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/java/ql/src/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/java/ql/src";>source) codeql/java-all (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/java/ql/lib/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/java/ql/lib";>source) codeql/javascript-queries (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/javascript/ql/src/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/javascript/ql/src";>source) codeql/javascript-all (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/javascript/ql/lib/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/javascript/ql/lib";>source) codeql/python-queries (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/python/ql/src/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/python/ql/src";>source) codeql/python-all (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/python/ql/lib/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/python/ql/lib";>source) codeql/ruby-queries (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/ruby/ql/src/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/ruby/ql/src";>source) codeql/ruby-all (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/ruby/ql/lib/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/ruby/ql/lib";>source) codeql/swift-queries (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/swift/ql/src/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/swift/ql/src";>source) codeql/swift-all (https://github.com/github/codeql/tree/codeql-cli/v2.15.4/swift/ql/lib/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.4/swift/ql/lib";>source) CodeQL Bundle Bundles CodeQL CLI v2.15.3 (https://github.com/github/codeql-cli-binaries/blob/HEAD/CHANGELOG.md";>changelog, https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.3";>release) Includes the following CodeQL language packs from https://github.com/github/codeql/tree/codeql-cli/v2.15.3";>github/codeql@codeql-cli/v2.15.3: codeql/cpp-queries (https://github.com/github/codeql/tree/codeql-cli/v2.15.3/cpp/ql/src/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.3/cpp/ql/src";>source) codeql/cpp-all (https://github.com/github/codeql/tree/codeql-cli/v2.15.3/cpp/ql/lib/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.3/cpp/ql/lib";>source) codeql/csharp-queries (https://github.com/github/codeql/tree/codeql-cli/v2.15.3/csharp/ql/src/CHANGELOG.md";>changelog, https://github.com/github/codeql/tree/codeql-cli/v2.15.3/csharp/ql/src";>source) codeql/csharp-all (https://github.com/github/codeql/tree/codeql-cli/v2.15.3/csharp/ql/lib/CHANGELOG.md";>changelog, https://github.co
(tinkerpop) branch dependabot/github_actions/3.6-dev/github/codeql-action-3 created (now 3d0ec09284)
This is an automated email from the ASF dual-hosted git repository. github-bot pushed a change to branch dependabot/github_actions/3.6-dev/github/codeql-action-3 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git at 3d0ec09284 Bump github/codeql-action from 2 to 3 No new revisions were added by this update.
Re: [PR] Bump github/codeql-action from 2 to 3 [tinkerpop]
codecov-commenter commented on PR #2400: URL: https://github.com/apache/tinkerpop/pull/2400#issuecomment-1855965407 ## [Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/2400?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report All modified and coverable lines are covered by tests :white_check_mark: > Comparison is base [(`b48fd8c`)](https://app.codecov.io/gh/apache/tinkerpop/commit/b48fd8c0ff06715dd2ae198b413f22befb85f95a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 75.19% compared to head [(`3d0ec09`)](https://app.codecov.io/gh/apache/tinkerpop/pull/2400?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 71.23%. Additional details and impacted files ```diff @@ Coverage Diff @@ ## 3.6-dev#2400 +/- ## = - Coverage 75.19% 71.23% -3.97% = Files 1057 25-1032 Lines 63450 3772 -59678 Branches69350-6935 = - Hits 47712 2687 -45025 + Misses 13171 898 -12273 + Partials2567 187-2380 ``` [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/tinkerpop/pull/2400?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache). :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(tinkerpop) 02/03: Merge branch '3.6-dev' into 3.7-dev
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 2730fb0ad43bac084590afd9de561e453eff4422 Merge: 679b784941 67b8a334eb Author: Stephen Mallette AuthorDate: Thu Dec 14 08:56:10 2023 -0500 Merge branch '3.6-dev' into 3.7-dev CHANGELOG.asciidoc | 1 + .../gremlin/process/traversal/dsl/graph/GraphTraversal.java | 12 .../test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 1 + gremlin-go/driver/cucumber/gremlin.go| 1 + .../javascript/gremlin-javascript/test/cucumber/gremlin.js | 1 + gremlin-python/src/main/python/radish/gremlin.py | 1 + .../tinkerpop/gremlin/test/features/filter/Has.feature | 11 ++- 7 files changed, 27 insertions(+), 1 deletion(-)
(tinkerpop) branch master updated (cabf821f0f -> 5ec257f5ea)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from cabf821f0f Fixed broken dependency for neo4j CTR new 67b8a334eb TINKERPOP-3022 Fixed JavaTranslator issues with has(String,null) new 2730fb0ad4 Merge branch '3.6-dev' into 3.7-dev new 5ec257f5ea Merge branch '3.7-dev' The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc | 1 + .../gremlin/process/traversal/dsl/graph/GraphTraversal.java | 12 .../test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 1 + gremlin-go/driver/cucumber/gremlin.go| 1 + .../javascript/gremlin-javascript/test/cucumber/gremlin.js | 1 + gremlin-python/src/main/python/radish/gremlin.py | 1 + .../tinkerpop/gremlin/test/features/filter/Has.feature | 11 ++- 7 files changed, 27 insertions(+), 1 deletion(-)
(tinkerpop) 03/03: Merge branch '3.7-dev'
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 5ec257f5ea776dd1f37081b52882b21ceda69389 Merge: cabf821f0f 2730fb0ad4 Author: Stephen Mallette AuthorDate: Thu Dec 14 09:22:40 2023 -0500 Merge branch '3.7-dev' CHANGELOG.asciidoc | 1 + .../gremlin/process/traversal/dsl/graph/GraphTraversal.java | 12 .../test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 1 + gremlin-go/driver/cucumber/gremlin.go| 1 + .../javascript/gremlin-javascript/test/cucumber/gremlin.js | 1 + gremlin-python/src/main/python/radish/gremlin.py | 1 + .../tinkerpop/gremlin/test/features/filter/Has.feature | 11 ++- 7 files changed, 27 insertions(+), 1 deletion(-)
(tinkerpop) branch 3.7-dev updated (679b784941 -> 2730fb0ad4)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch 3.7-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 679b784941 Merge branch '3.6-dev' into 3.7-dev add 67b8a334eb TINKERPOP-3022 Fixed JavaTranslator issues with has(String,null) add 2730fb0ad4 Merge branch '3.6-dev' into 3.7-dev No new revisions were added by this update. Summary of changes: CHANGELOG.asciidoc | 1 + .../gremlin/process/traversal/dsl/graph/GraphTraversal.java | 12 .../test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 1 + gremlin-go/driver/cucumber/gremlin.go| 1 + .../javascript/gremlin-javascript/test/cucumber/gremlin.js | 1 + gremlin-python/src/main/python/radish/gremlin.py | 1 + .../tinkerpop/gremlin/test/features/filter/Has.feature | 11 ++- 7 files changed, 27 insertions(+), 1 deletion(-)
(tinkerpop) branch 3.6-dev updated (b48fd8c0ff -> 67b8a334eb)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a change to branch 3.6-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from b48fd8c0ff Add ARM64 console docker images (#2391) add 67b8a334eb TINKERPOP-3022 Fixed JavaTranslator issues with has(String,null) No new revisions were added by this update. Summary of changes: CHANGELOG.asciidoc | 1 + .../gremlin/process/traversal/dsl/graph/GraphTraversal.java | 12 .../test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 1 + gremlin-go/driver/cucumber/gremlin.go| 1 + .../javascript/gremlin-javascript/test/cucumber/gremlin.js | 1 + gremlin-python/src/main/python/radish/gremlin.py | 1 + .../tinkerpop/gremlin/test/features/filter/Has.feature | 11 ++- 7 files changed, 27 insertions(+), 1 deletion(-)
(tinkerpop) 01/03: TINKERPOP-3022 Fixed JavaTranslator issues with has(String,null)
This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 67b8a334ebb312ebfafa404c39285d52e275ad2d Author: Stephen Mallette AuthorDate: Wed Dec 13 11:44:05 2023 -0500 TINKERPOP-3022 Fixed JavaTranslator issues with has(String,null) Needed to better handle defaults for has(String,Traversal) on the case where reflection in JavaTranslator chose that method for has(String,null). CTR --- CHANGELOG.asciidoc | 1 + .../gremlin/process/traversal/dsl/graph/GraphTraversal.java | 12 .../test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 1 + gremlin-go/driver/cucumber/gremlin.go| 1 + .../javascript/gremlin-javascript/test/cucumber/gremlin.js | 1 + gremlin-python/src/main/python/radish/gremlin.py | 1 + .../tinkerpop/gremlin/test/features/filter/Has.feature | 11 ++- 7 files changed, 27 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 60307513e1..fa3f2608fa 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima * Improved error message from `JavaTranslator` by including exception source. * Added tests for error handling for GLV's if tx.commit() is called remotely for graphs without transactions support. * Introduced multi-architecture AMD64/ARM64 docker images for gremlin-console. +* Fixed bug in `JavaTranslator` where `has(String, null)` could call `has(String, Traversal)` to generate an error. [[release-3-6-6]] === TinkerPop 3.6.6 (November 20, 2023) diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java index d92d2e09e7..7fbfbd8a00 100644 --- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java +++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java @@ -1564,6 +1564,11 @@ public interface GraphTraversal extends Traversal { * @since 3.0.0-incubating */ public default GraphTraversal has(final String propertyKey, final P predicate) { +// Groovy can get the overload wrong for has(T, null) which should probably go at has(T,Object). users could +// explicit cast but a redirect here makes this a bit more seamless +if (null == predicate) +return has(propertyKey, (Object) null); + this.asAdmin().getBytecode().addStep(Symbols.has, propertyKey, predicate); return TraversalHelper.addHasContainer(this.asAdmin(), new HasContainer(propertyKey, predicate)); } @@ -1710,6 +1715,13 @@ public interface GraphTraversal extends Traversal { * @since 3.0.0-incubating */ public default GraphTraversal has(final String propertyKey, final Traversal propertyTraversal) { +// the translation here of null to has(String, Object) is likely what was intended. a null Traversal doesn't +// really make much sense. this should resolve issues with JavaTranslator grabbing this method when bytecode +// uses null as the second argument. we've taken this tactic for other overloads of has() as well, so just +// continuing with that pattern. +if (null == propertyTraversal) +return has(propertyKey, (Object) null); + this.asAdmin().getBytecode().addStep(Symbols.has, propertyKey, propertyTraversal); return this.asAdmin().addStep( new TraversalFilterStep<>(this.asAdmin(), propertyTraversal.asAdmin().addStep(0, diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs index 0044b6853d..ce4b3d75ab 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs @@ -226,6 +226,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin {"g_V_hasXlabel_personX", new List, ITraversal>> {(g,p) =>g.V().Has(T.Label,"person")}}, {"g_V_hasXlabel_eqXpersonXX", new List, ITraversal>> {(g,p) =>g.V().Has(T.Label,P.Eq("person"))}}, {"g_V_hasXlabel_isXpersonXX", new List, ITraversal>> {(g,p) =>g.V().Has(T.Label,__.Is("person"))}}, + {"g_V_hasXname_nullX", new List, ITraversal>> {(g,p) =>g.V().Has("name",(object) null)}}, {"g_V_hasIdXemptyX_count", new List, ITraversal>> {(g,p) =>g.V().HasId(p["xx1"]).Count()}}, {"g_V_hasIdXwithinXemptyXX_count", new List, ITraversal>> {(g,p) =>g.V().HasId(p["xx1"]).Count()}}, {"g_V_h
(tinkerpop) branch 3.6-dev updated: Add missing int16 serialization type to graphson in python (#2396)
This is an automated email from the ASF dual-hosted git repository. xiazcy pushed a commit to branch 3.6-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/3.6-dev by this push: new 7b2580e520 Add missing int16 serialization type to graphson in python (#2396) 7b2580e520 is described below commit 7b2580e520f11b300e0987b5cd39e2fca552c1ce Author: Yang Xia <55853655+xia...@users.noreply.github.com> AuthorDate: Thu Dec 14 08:48:39 2023 -0800 Add missing int16 serialization type to graphson in python (#2396) --- CHANGELOG.asciidoc | 1 + .../gremlin_python/structure/io/graphsonV2d0.py| 26 +++- .../gremlin_python/structure/io/graphsonV3d0.py| 28 +- .../src/main/python/tests/driver/test_client.py| 9 +++ .../python/tests/structure/io/test_graphsonV2d0.py | 8 +++ .../python/tests/structure/io/test_graphsonV3d0.py | 8 +++ 6 files changed, 78 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index fa3f2608fa..59cd8b9940 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -24,6 +24,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima === TinkerPop 3.6.7 (NOT OFFICIALLY RELEASED YET) * Improved error message from `JavaTranslator` by including exception source. +* Added missing `short` serialization (`gx:Int16`) to GraphSONV2 and GraphSONV3 in `gremlin-python` * Added tests for error handling for GLV's if tx.commit() is called remotely for graphs without transactions support. * Introduced multi-architecture AMD64/ARM64 docker images for gremlin-console. * Fixed bug in `JavaTranslator` where `has(String, null)` could call `has(String, Traversal)` to generate an error. diff --git a/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV2d0.py b/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV2d0.py index 1b05989ade..d75dbb8ca0 100644 --- a/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV2d0.py +++ b/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV2d0.py @@ -30,7 +30,7 @@ from aenum import Enum from isodate import parse_duration, duration_isoformat from gremlin_python import statics -from gremlin_python.statics import FloatType, FunctionType, IntType, LongType, TypeType, SingleByte, ByteBufferType, SingleChar +from gremlin_python.statics import FloatType, FunctionType, ShortType, IntType, LongType, TypeType, SingleByte, ByteBufferType, SingleChar from gremlin_python.process.traversal import Binding, Bytecode, P, TextP, Traversal, Traverser, TraversalStrategy from gremlin_python.structure.graph import Edge, Property, Vertex, VertexProperty, Path from gremlin_python.structure.io.util import SymbolUtil @@ -498,6 +498,30 @@ class Int32IO(Int64IO): return GraphSONUtil.typed_value(cls.graphson_base_type, n) +class Int16IO(Int64IO): +python_type = ShortType +graphson_type = "gx:Int16" +graphson_base_type = "Int16" + +@classmethod +def dictify(cls, n, writer): +# if we exceed Java int range then we need a long +if isinstance(n, bool): +return n +elif n < -9223372036854775808 or n > 9223372036854775807: +return GraphSONUtil.typed_value("BigInteger", str(n), "gx") +elif n < -2147483648 or n > 2147483647: +return GraphSONUtil.typed_value("Int64", n) +elif n < -32768 or n > 32767: +return GraphSONUtil.typed_value("Int32", n) +else: +return GraphSONUtil.typed_value(cls.graphson_base_type, n, "gx") + +@classmethod +def objectify(cls, v, _): +return int.__new__(ShortType, v) + + class ByteIO(_NumberIO): python_type = SingleByte graphson_type = "gx:Byte" diff --git a/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV3d0.py b/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV3d0.py index b7a165a5cd..e80bdbd45f 100644 --- a/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV3d0.py +++ b/gremlin-python/src/main/python/gremlin_python/structure/io/graphsonV3d0.py @@ -14,6 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + import calendar import datetime import json @@ -28,7 +29,7 @@ from aenum import Enum from isodate import parse_duration, duration_isoformat from gremlin_python import statics -from gremlin_python.statics import FloatType, FunctionType, IntType, LongType, TypeType, DictType, ListType, SetType, SingleByte, ByteBufferType, SingleChar +from gremlin_python.statics import FloatType, FunctionType, ShortType, IntType, LongType, TypeType, DictType, ListType, SetType, SingleByte, ByteBufferType, SingleChar from gremlin_python.process.traversal import Bind
(tinkerpop) 01/01: Merge branch '3.6-dev' into 3.7-dev
This is an automated email from the ASF dual-hosted git repository. xiazcy pushed a commit to branch 3.7-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit b4f33076bc290fc8b34aae03d1675b1a2b38775b Merge: 2730fb0ad4 7b2580e520 Author: Yang Xia <55853655+xia...@users.noreply.github.com> AuthorDate: Thu Dec 14 08:49:03 2023 -0800 Merge branch '3.6-dev' into 3.7-dev CHANGELOG.asciidoc | 1 + .../gremlin_python/structure/io/graphsonV2d0.py| 26 - .../gremlin_python/structure/io/graphsonV3d0.py| 27 +- .../src/main/python/tests/driver/test_client.py| 9 .../python/tests/structure/io/test_graphsonV2d0.py | 8 +++ .../python/tests/structure/io/test_graphsonV3d0.py | 8 +++ 6 files changed, 77 insertions(+), 2 deletions(-)
(tinkerpop) branch master updated (5ec257f5ea -> 0cd78443b3)
This is an automated email from the ASF dual-hosted git repository. xiazcy pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 5ec257f5ea Merge branch '3.7-dev' add 7b2580e520 Add missing int16 serialization type to graphson in python (#2396) add b4f33076bc Merge branch '3.6-dev' into 3.7-dev new 0cd78443b3 Merge branch '3.7-dev' The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc | 1 + .../gremlin_python/structure/io/graphsonV2d0.py| 26 - .../gremlin_python/structure/io/graphsonV3d0.py| 27 +- .../src/main/python/tests/driver/test_client.py| 9 .../python/tests/structure/io/test_graphsonV2d0.py | 8 +++ .../python/tests/structure/io/test_graphsonV3d0.py | 8 +++ 6 files changed, 77 insertions(+), 2 deletions(-)
Re: [PR] Add missing int16 serialization type to graphson in gremlin-python [tinkerpop]
xiazcy merged PR #2396: URL: https://github.com/apache/tinkerpop/pull/2396 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(tinkerpop) branch 3.7-dev updated (2730fb0ad4 -> b4f33076bc)
This is an automated email from the ASF dual-hosted git repository. xiazcy pushed a change to branch 3.7-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 2730fb0ad4 Merge branch '3.6-dev' into 3.7-dev add 7b2580e520 Add missing int16 serialization type to graphson in python (#2396) new b4f33076bc Merge branch '3.6-dev' into 3.7-dev The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc | 1 + .../gremlin_python/structure/io/graphsonV2d0.py| 26 - .../gremlin_python/structure/io/graphsonV3d0.py| 27 +- .../src/main/python/tests/driver/test_client.py| 9 .../python/tests/structure/io/test_graphsonV2d0.py | 8 +++ .../python/tests/structure/io/test_graphsonV3d0.py | 8 +++ 6 files changed, 77 insertions(+), 2 deletions(-)
(tinkerpop) 01/01: Merge branch '3.7-dev'
This is an automated email from the ASF dual-hosted git repository. xiazcy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 0cd78443b3011da20a58901d78451defbf2766e4 Merge: 5ec257f5ea b4f33076bc Author: Yang Xia <55853655+xia...@users.noreply.github.com> AuthorDate: Thu Dec 14 08:49:25 2023 -0800 Merge branch '3.7-dev' CHANGELOG.asciidoc | 1 + .../gremlin_python/structure/io/graphsonV2d0.py| 26 - .../gremlin_python/structure/io/graphsonV3d0.py| 27 +- .../src/main/python/tests/driver/test_client.py| 9 .../python/tests/structure/io/test_graphsonV2d0.py | 8 +++ .../python/tests/structure/io/test_graphsonV3d0.py | 8 +++ 6 files changed, 77 insertions(+), 2 deletions(-) diff --cc gremlin-python/src/main/python/tests/driver/test_client.py index b52ec07931,75048a647f..f7356afd49 --- a/gremlin-python/src/main/python/tests/driver/test_client.py +++ b/gremlin-python/src/main/python/tests/driver/test_client.py @@@ -298,9 -297,18 +298,18 @@@ def test_multi_thread_pool(client) assert len(results[2][0]) == 6 assert results[3][0][0].object == 6 + def test_client_bytecode_with_short(client): + g = Graph().traversal() + t = g.V().has('age', short(16)).count() + message = RequestMessage('traversal', 'bytecode', {'gremlin': t.bytecode, 'aliases': {'g': 'gmodern'}}) + result_set = client.submit(message) + results = [] + for result in result_set: + results += result + assert len(results) == 1 def test_client_bytecode_with_long(client): -g = Graph().traversal() +g = GraphTraversalSource(Graph(), TraversalStrategies()) t = g.V().has('age', long(851401972585122)).count() message = RequestMessage('traversal', 'bytecode', {'gremlin': t.bytecode, 'aliases': {'g': 'gmodern'}}) result_set = client.submit(message)
(tinkerpop) branch master updated: CTR fix python test failure
This is an automated email from the ASF dual-hosted git repository. xiazcy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/master by this push: new 6405e102ae CTR fix python test failure 6405e102ae is described below commit 6405e102ae77c9d9d85ce2aa62e2071281fb7702 Author: Yang Xia <55853655+xia...@users.noreply.github.com> AuthorDate: Thu Dec 14 09:33:58 2023 -0800 CTR fix python test failure --- gremlin-python/src/main/python/tests/driver/test_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gremlin-python/src/main/python/tests/driver/test_client.py b/gremlin-python/src/main/python/tests/driver/test_client.py index f7356afd49..fa3e0b7722 100644 --- a/gremlin-python/src/main/python/tests/driver/test_client.py +++ b/gremlin-python/src/main/python/tests/driver/test_client.py @@ -299,7 +299,7 @@ def test_multi_thread_pool(client): assert results[3][0][0].object == 6 def test_client_bytecode_with_short(client): -g = Graph().traversal() +g = GraphTraversalSource(Graph(), TraversalStrategies()) t = g.V().has('age', short(16)).count() message = RequestMessage('traversal', 'bytecode', {'gremlin': t.bytecode, 'aliases': {'g': 'gmodern'}}) result_set = client.submit(message)
Re: [PR] TINKERPOP-2995 Create Sample Applications in each GLV 3.6 [tinkerpop]
Cole-Greer merged PR #2299: URL: https://github.com/apache/tinkerpop/pull/2299 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(tinkerpop) branch 3.6-dev updated: TINKERPOP-2995 Create Sample Applications in each GLV 3.6 (#2299)
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch 3.6-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/3.6-dev by this push: new 9f97af5a87 TINKERPOP-2995 Create Sample Applications in each GLV 3.6 (#2299) 9f97af5a87 is described below commit 9f97af5a879a237027a3eef19cb986d6752586b7 Author: Ryan Tan <65996005+r...@users.noreply.github.com> AuthorDate: Thu Dec 14 14:50:55 2023 -0800 TINKERPOP-2995 Create Sample Applications in each GLV 3.6 (#2299) Created sample applications for each GLV in Java, Python, C#, JS, and Go which includes connection, basic Gremlin, and simple traversal examples. --- bin/run-examples.sh| 119 docs/src/dev/developer/release.asciidoc| 1 + docs/src/reference/gremlin-variants.asciidoc | 170 +-- .../Examples/BasicGremlin/BasicGremlin.cs | 54 .../Examples/BasicGremlin/BasicGremlin.csproj | 30 ++ gremlin-dotnet/Examples/Connections/Connections.cs | 74 + .../Examples/Connections/Connections.csproj| 30 ++ gremlin-dotnet/Examples/Examples.sln | 37 +++ .../Examples/ModernTraversals/ModernTraversals.cs | 71 + .../ModernTraversals/ModernTraversals.csproj | 30 ++ gremlin-driver/pom.xml | 9 + .../src/main/java/examples/BasicGremlin.java | 56 .../src/main/java/examples/Connections.java| 116 .../src/main/java/examples/ModernTraversals.java | 71 + gremlin-driver/src/main/java/examples/pom.xml | 91 ++ gremlin-go/example/go.sum | 315 - gremlin-go/examples/basic_gremlin.go | 69 + .../example.go => examples/connections.go} | 59 ++-- gremlin-go/{example => examples}/go.mod| 8 +- gremlin-go/examples/go.sum | 44 +++ gremlin-go/examples/modern_traversals.go | 77 + gremlin-javascript/examples/.gitignore | 1 + gremlin-javascript/examples/basic-gremlin.js | 51 gremlin-javascript/examples/connections.js | 65 + gremlin-javascript/examples/modern-traversals.js | 69 + gremlin-javascript/examples/package-lock.json | 47 +++ gremlin-javascript/examples/package.json | 14 + gremlin-python/src/main/python/example.py | 52 .../src/main/python/examples/basic_gremlin.py | 54 .../src/main/python/examples/connections.py| 101 +++ .../src/main/python/examples/modern_traversals.py | 69 + .../src/main/python/examples/requirements.txt | 29 ++ 32 files changed, 1678 insertions(+), 405 deletions(-) diff --git a/bin/run-examples.sh b/bin/run-examples.sh new file mode 100755 index 00..5548404ec8 --- /dev/null +++ b/bin/run-examples.sh @@ -0,0 +1,119 @@ +#!/bin/bash + +#Licensed to the Apache Software Foundation (ASF) under one +#or more contributor license agreements. See the NOTICE file +#distributed with this work for additional information +#regarding copyright ownership. The ASF licenses this file +#to you under the Apache License, Version 2.0 (the +#"License"); you may not use this file except in compliance +#with the License. You may obtain a copy of the License at +# +#http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, +#software distributed under the License is distributed on an +#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +#KIND, either express or implied. See the License for the +#specific language governing permissions and limitations +#under the License. + +function cleanup { + if [ -n "$(docker ps -q -f name=glv-examples)" ] + then +echo -n "Shutting down container: " +docker stop glv-examples + fi + if [ -n "$(docker ps -q -f name=glv-examples-modern)" ] + then +echo -n "Shutting down container: " +docker stop glv-examples-modern + fi +} +trap cleanup EXIT + +open -a Docker +docker pull tinkerpop/gremlin-server +docker run -d --rm -p 8182:8182 --name glv-examples --health-cmd="curl -f http://localhost:8182/ || exit 1" --health-interval=5s --health-timeout=3s tinkerpop/gremlin-server + +echo +echo "Not having docker open initially may cause an error loop. If so, simply restart this script." +echo -n "Starting Gremlin server on port 8182..." +until docker inspect --format '{{.State.Health.Status}}' glv-examples | grep -q "healthy"; do + echo -n "." + sleep 1 +done +echo + +cd ../gremlin-driver/src/main/java/examples || exit +mvn clean install + +echo +echo "Running Java examples" +java -cp target/run-examples-shaded.jar examples.Connections +java -cp target/run-examples-shaded.jar examples.BasicGremlin +cd ../../../../.. || exit + +echo +echo "Running python examples:" +python3 gremlin-python/
(tinkerpop) 01/01: Merge branch '3.6-dev' into 3.7-dev
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch 3.7-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit df1d4538ee158db7db08e3bf8f5a19ce28f08f2c Merge: b4f33076bc 9f97af5a87 Author: Cole-Greer AuthorDate: Thu Dec 14 14:51:45 2023 -0800 Merge branch '3.6-dev' into 3.7-dev
(tinkerpop) branch 3.7-dev updated (b4f33076bc -> df1d4538ee)
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a change to branch 3.7-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from b4f33076bc Merge branch '3.6-dev' into 3.7-dev add 9f97af5a87 TINKERPOP-2995 Create Sample Applications in each GLV 3.6 (#2299) new df1d4538ee Merge branch '3.6-dev' into 3.7-dev The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes:
Re: [PR] TINKERPOP-2995 Create Sample Applications in each GLV [tinkerpop]
Cole-Greer merged PR #2298: URL: https://github.com/apache/tinkerpop/pull/2298 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(tinkerpop) branch 3.7-dev updated: TINKERPOP-2995 Create Sample Applications in each GLV for 3.7 (#2298)
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch 3.7-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/3.7-dev by this push: new 6fbafc436c TINKERPOP-2995 Create Sample Applications in each GLV for 3.7 (#2298) 6fbafc436c is described below commit 6fbafc436cc6e385c0c2f84bf68f18f5ac91f599 Author: Ryan Tan <65996005+r...@users.noreply.github.com> AuthorDate: Thu Dec 14 14:53:11 2023 -0800 TINKERPOP-2995 Create Sample Applications in each GLV for 3.7 (#2298) Created sample applications for each GLV in Java, Python, C#, JS, and Go which includes connection, basic Gremlin, and simple traversal examples. --- bin/run-examples.sh| 119 docs/src/dev/developer/release.asciidoc| 1 + docs/src/reference/gremlin-variants.asciidoc | 170 +-- .../Examples/BasicGremlin/BasicGremlin.cs | 54 .../Examples/BasicGremlin/BasicGremlin.csproj | 30 ++ gremlin-dotnet/Examples/Connections/Connections.cs | 74 + .../Examples/Connections/Connections.csproj| 30 ++ gremlin-dotnet/Examples/Examples.sln | 37 +++ .../Examples/ModernTraversals/ModernTraversals.cs | 71 + .../ModernTraversals/ModernTraversals.csproj | 30 ++ gremlin-driver/pom.xml | 9 + .../src/main/java/examples/BasicGremlin.java | 56 .../src/main/java/examples/Connections.java| 116 .../src/main/java/examples/ModernTraversals.java | 71 + gremlin-driver/src/main/java/examples/pom.xml | 91 ++ gremlin-go/example/go.sum | 315 - gremlin-go/examples/basic_gremlin.go | 69 + .../example.go => examples/connections.go} | 59 ++-- gremlin-go/{example => examples}/go.mod| 8 +- gremlin-go/examples/go.sum | 44 +++ gremlin-go/examples/modern_traversals.go | 77 + gremlin-javascript/examples/.gitignore | 1 + gremlin-javascript/examples/basic-gremlin.js | 51 gremlin-javascript/examples/connections.js | 65 + gremlin-javascript/examples/modern-traversals.js | 69 + gremlin-javascript/examples/package-lock.json | 47 +++ gremlin-javascript/examples/package.json | 14 + gremlin-python/src/main/python/example.py | 52 .../src/main/python/examples/basic_gremlin.py | 54 .../src/main/python/examples/connections.py| 101 +++ .../src/main/python/examples/modern_traversals.py | 69 + .../src/main/python/examples/requirements.txt | 29 ++ 32 files changed, 1678 insertions(+), 405 deletions(-) diff --git a/bin/run-examples.sh b/bin/run-examples.sh new file mode 100755 index 00..5548404ec8 --- /dev/null +++ b/bin/run-examples.sh @@ -0,0 +1,119 @@ +#!/bin/bash + +#Licensed to the Apache Software Foundation (ASF) under one +#or more contributor license agreements. See the NOTICE file +#distributed with this work for additional information +#regarding copyright ownership. The ASF licenses this file +#to you under the Apache License, Version 2.0 (the +#"License"); you may not use this file except in compliance +#with the License. You may obtain a copy of the License at +# +#http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, +#software distributed under the License is distributed on an +#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +#KIND, either express or implied. See the License for the +#specific language governing permissions and limitations +#under the License. + +function cleanup { + if [ -n "$(docker ps -q -f name=glv-examples)" ] + then +echo -n "Shutting down container: " +docker stop glv-examples + fi + if [ -n "$(docker ps -q -f name=glv-examples-modern)" ] + then +echo -n "Shutting down container: " +docker stop glv-examples-modern + fi +} +trap cleanup EXIT + +open -a Docker +docker pull tinkerpop/gremlin-server +docker run -d --rm -p 8182:8182 --name glv-examples --health-cmd="curl -f http://localhost:8182/ || exit 1" --health-interval=5s --health-timeout=3s tinkerpop/gremlin-server + +echo +echo "Not having docker open initially may cause an error loop. If so, simply restart this script." +echo -n "Starting Gremlin server on port 8182..." +until docker inspect --format '{{.State.Health.Status}}' glv-examples | grep -q "healthy"; do + echo -n "." + sleep 1 +done +echo + +cd ../gremlin-driver/src/main/java/examples || exit +mvn clean install + +echo +echo "Running Java examples" +java -cp target/run-examples-shaded.jar examples.Connections +java -cp target/run-examples-shaded.jar examples.BasicGremlin +cd ../../../../.. || exit + +echo +echo "Running python examples:" +python3 gremlin
(tinkerpop) branch master updated (6405e102ae -> 307ebbcbcd)
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 6405e102ae CTR fix python test failure add 9f97af5a87 TINKERPOP-2995 Create Sample Applications in each GLV 3.6 (#2299) add df1d4538ee Merge branch '3.6-dev' into 3.7-dev add 6fbafc436c TINKERPOP-2995 Create Sample Applications in each GLV for 3.7 (#2298) new 0d43110833 Merge branch '3.7-dev' new 307ebbcbcd CTR Update examples to use new with() syntax when creating g The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: bin/run-examples.sh| 119 docs/src/dev/developer/release.asciidoc| 1 + docs/src/reference/gremlin-variants.asciidoc | 170 +-- .../Examples/BasicGremlin/BasicGremlin.cs | 54 .../Examples/BasicGremlin/BasicGremlin.csproj | 56 ++-- gremlin-dotnet/Examples/Connections/Connections.cs | 74 + .../Examples/Connections/Connections.csproj| 56 ++-- gremlin-dotnet/Examples/Examples.sln | 37 +++ .../Examples/ModernTraversals/ModernTraversals.cs | 71 + .../ModernTraversals/ModernTraversals.csproj | 24 +- gremlin-driver/pom.xml | 9 + .../src/main/java/examples/BasicGremlin.java | 56 .../src/main/java/examples/Connections.java| 116 .../src/main/java/examples/ModernTraversals.java | 71 + gremlin-driver/src/main/java/examples/pom.xml | 91 ++ gremlin-go/example/go.sum | 315 - gremlin-go/examples/basic_gremlin.go | 69 + .../example.go => examples/connections.go} | 55 ++-- gremlin-go/{example => examples}/go.mod| 8 +- gremlin-go/examples/go.sum | 44 +++ gremlin-go/examples/modern_traversals.go | 77 + gremlin-javascript/examples/.gitignore | 1 + gremlin-javascript/examples/basic-gremlin.js | 51 gremlin-javascript/examples/connections.js | 65 + gremlin-javascript/examples/modern-traversals.js | 69 + gremlin-javascript/examples/package-lock.json | 47 +++ gremlin-javascript/examples/package.json | 14 + gremlin-python/src/main/python/example.py | 52 .../src/main/python/examples/basic_gremlin.py | 54 .../src/main/python/examples/connections.py| 101 +++ .../src/main/python/examples/modern_traversals.py | 69 + .../__init__.py => examples/requirements.txt} | 15 +- 32 files changed, 1642 insertions(+), 469 deletions(-) create mode 100755 bin/run-examples.sh create mode 100644 gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.cs copy gremlin-console/src/test/resources/logback-silent.xml => gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.csproj (67%) create mode 100644 gremlin-dotnet/Examples/Connections/Connections.cs copy gremlin-console/src/test/resources/logback-silent.xml => gremlin-dotnet/Examples/Connections/Connections.csproj (67%) create mode 100644 gremlin-dotnet/Examples/Examples.sln create mode 100644 gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.cs copy gremlin-console/src/test/resources/logback-test.xml => gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.csproj (69%) create mode 100644 gremlin-driver/src/main/java/examples/BasicGremlin.java create mode 100644 gremlin-driver/src/main/java/examples/Connections.java create mode 100644 gremlin-driver/src/main/java/examples/ModernTraversals.java create mode 100644 gremlin-driver/src/main/java/examples/pom.xml delete mode 100644 gremlin-go/example/go.sum create mode 100644 gremlin-go/examples/basic_gremlin.go rename gremlin-go/{example/example.go => examples/connections.go} (58%) rename gremlin-go/{example => examples}/go.mod (81%) create mode 100644 gremlin-go/examples/go.sum create mode 100644 gremlin-go/examples/modern_traversals.go create mode 100644 gremlin-javascript/examples/.gitignore create mode 100644 gremlin-javascript/examples/basic-gremlin.js create mode 100644 gremlin-javascript/examples/connections.js create mode 100644 gremlin-javascript/examples/modern-traversals.js create mode 100644 gremlin-javascript/examples/package-lock.json create mode 100644 gremlin-javascript/examples/package.json delete mode 100644 gremlin-python/src/main/python/example.py create mode 100644 gremlin-python/src/main/python/examples/basic_gremlin.py create mode 100644 gremlin-python/src/main/python/examples/connections.py create mode 100644 gremlin-python/src/main/python/examples/modern_traversals.py copy gremlin-python/src/main/python/{gremlin_
(tinkerpop) 02/02: CTR Update examples to use new with() syntax when creating g
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 307ebbcbcd72de6f3666b73c1288f500fbc2181a Author: Cole-Greer AuthorDate: Thu Dec 14 15:25:09 2023 -0800 CTR Update examples to use new with() syntax when creating g --- gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.cs | 2 +- gremlin-dotnet/Examples/Connections/Connections.cs | 2 +- gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.cs | 2 +- gremlin-driver/src/main/java/examples/BasicGremlin.java | 2 +- gremlin-driver/src/main/java/examples/Connections.java | 8 gremlin-driver/src/main/java/examples/ModernTraversals.java | 2 +- gremlin-go/examples/basic_gremlin.go | 4 ++-- gremlin-javascript/examples/basic-gremlin.js | 2 +- gremlin-javascript/examples/connections.js | 2 +- gremlin-javascript/examples/modern-traversals.js | 2 +- gremlin-python/src/main/python/examples/basic_gremlin.py | 2 +- gremlin-python/src/main/python/examples/connections.py | 2 +- gremlin-python/src/main/python/examples/modern_traversals.py | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.cs b/gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.cs index 91820bfe09..9971ef1809 100644 --- a/gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.cs +++ b/gremlin-dotnet/Examples/BasicGremlin/BasicGremlin.cs @@ -27,7 +27,7 @@ public class BasicGremlinExample { var server = new GremlinServer("localhost", 8182); using var remoteConnection = new DriverRemoteConnection(new GremlinClient(server), "g"); -var g = Traversal().WithRemote(remoteConnection); +var g = Traversal().With(remoteConnection); // Basic Gremlin: adding and retrieving data var v1 = g.AddV("person").Property("name", "marko").Next(); diff --git a/gremlin-dotnet/Examples/Connections/Connections.cs b/gremlin-dotnet/Examples/Connections/Connections.cs index 26490f750b..d5a4e648f8 100644 --- a/gremlin-dotnet/Examples/Connections/Connections.cs +++ b/gremlin-dotnet/Examples/Connections/Connections.cs @@ -36,7 +36,7 @@ public class ConnectionExample { var server = new GremlinServer("localhost", 8182); using var remoteConnection = new DriverRemoteConnection(new GremlinClient(server), "g"); -var g = Traversal().WithRemote(remoteConnection); +var g = Traversal().With(remoteConnection); // Drop existing vertices g.V().Drop().Iterate(); diff --git a/gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.cs b/gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.cs index fab7073530..b112254556 100644 --- a/gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.cs +++ b/gremlin-dotnet/Examples/ModernTraversals/ModernTraversals.cs @@ -30,7 +30,7 @@ public class ModernTraversalExample { var server = new GremlinServer("localhost", 8182); using var remoteConnection = new DriverRemoteConnection(new GremlinClient(server), "g"); -var g = Traversal().WithRemote(remoteConnection); +var g = Traversal().With(remoteConnection); /* This example requires the Modern toy graph to be preloaded upon launching the Gremlin server. diff --git a/gremlin-driver/src/main/java/examples/BasicGremlin.java b/gremlin-driver/src/main/java/examples/BasicGremlin.java index a5075d4606..46542a6e25 100644 --- a/gremlin-driver/src/main/java/examples/BasicGremlin.java +++ b/gremlin-driver/src/main/java/examples/BasicGremlin.java @@ -31,7 +31,7 @@ import static org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalS public class BasicGremlin { public static void main(String[] args) { Graph graph = TinkerGraph.open(); -GraphTraversalSource g = traversal().withEmbedded(graph); +GraphTraversalSource g = traversal().with(graph); // Basic Gremlin: adding and retrieving data Vertex v1 = g.addV("person").property("name","marko").next(); diff --git a/gremlin-driver/src/main/java/examples/Connections.java b/gremlin-driver/src/main/java/examples/Connections.java index 458d5c8fd5..d388cad824 100644 --- a/gremlin-driver/src/main/java/examples/Connections.java +++ b/gremlin-driver/src/main/java/examples/Connections.java @@ -45,7 +45,7 @@ public class Connections { // Creating an embedded graph private static void withEmbedded() throws Exception { Graph graph = TinkerGraph.open(); -GraphTraversalSource g = traversal().withEmbedded(graph); +GraphTraversalSource g = traversal().with(graph); g.addV().iterate(); long count = g.V().count().next(); @@ -57,7 +57,7 @@ public class Connections { // Connecting to the server private static void
(tinkerpop) 01/02: Merge branch '3.7-dev'
This is an automated email from the ASF dual-hosted git repository. colegreer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 0d43110833230100394aa0593f925967cac170c0 Merge: 6405e102ae 6fbafc436c Author: Cole-Greer AuthorDate: Thu Dec 14 14:55:51 2023 -0800 Merge branch '3.7-dev' bin/run-examples.sh| 119 docs/src/dev/developer/release.asciidoc| 1 + docs/src/reference/gremlin-variants.asciidoc | 170 +-- .../Examples/BasicGremlin/BasicGremlin.cs | 54 .../Examples/BasicGremlin/BasicGremlin.csproj | 30 ++ gremlin-dotnet/Examples/Connections/Connections.cs | 74 + .../Examples/Connections/Connections.csproj| 30 ++ gremlin-dotnet/Examples/Examples.sln | 37 +++ .../Examples/ModernTraversals/ModernTraversals.cs | 71 + .../ModernTraversals/ModernTraversals.csproj | 30 ++ gremlin-driver/pom.xml | 9 + .../src/main/java/examples/BasicGremlin.java | 56 .../src/main/java/examples/Connections.java| 116 .../src/main/java/examples/ModernTraversals.java | 71 + gremlin-driver/src/main/java/examples/pom.xml | 91 ++ gremlin-go/example/go.sum | 315 - gremlin-go/examples/basic_gremlin.go | 69 + .../example.go => examples/connections.go} | 55 ++-- gremlin-go/{example => examples}/go.mod| 8 +- gremlin-go/examples/go.sum | 44 +++ gremlin-go/examples/modern_traversals.go | 77 + gremlin-javascript/examples/.gitignore | 1 + gremlin-javascript/examples/basic-gremlin.js | 51 gremlin-javascript/examples/connections.js | 65 + gremlin-javascript/examples/modern-traversals.js | 69 + gremlin-javascript/examples/package-lock.json | 47 +++ gremlin-javascript/examples/package.json | 14 + gremlin-python/src/main/python/example.py | 52 .../src/main/python/examples/basic_gremlin.py | 54 .../src/main/python/examples/connections.py| 101 +++ .../src/main/python/examples/modern_traversals.py | 69 + .../src/main/python/examples/requirements.txt | 29 ++ 32 files changed, 1675 insertions(+), 404 deletions(-) diff --cc gremlin-go/examples/connections.go index ec2652191c,3e1f1de174..284720ab44 --- a/gremlin-go/examples/connections.go +++ b/gremlin-go/examples/connections.go @@@ -21,21 -21,20 +21,18 @@@ package mai import ( "fmt" - gremlingo "github.com/apache/tinkerpop/gremlin-go/driver" - -- "github.com/apache/tinkerpop/gremlin-go/v3/driver" ) - // syntactic sugar - var __ = gremlingo.T__ - var gt = gremlingo.P.Gt - var order = gremlingo.Order - func main() { - // Creating the connection to the server. - driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection("ws://localhost:8182/gremlin", - func(settings *gremlingo.DriverRemoteConnectionSettings) { - settings.TraversalSource = "gmodern" - }) + withRemote() + withConfigs() + } + + func withRemote() { -// Creating the connection to the server -driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection("ws://localhost:8182/gremlin") ++ // Creating the connection to the server ++ driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection("ws://localhost:8182/gremlin") + + // Error handling if err != nil { fmt.Println(err) return @@@ -43,16 -43,39 +41,39 @@@ // Cleanup defer driverRemoteConnection.Close() -// Creating the graph traversal - g := gremlingo.Traversal_().WithRemote(driverRemoteConnection) + // Creating graph traversal + g := gremlingo.Traversal_().With(driverRemoteConnection) - // Perform traversal - result, err := g.V().HasLabel("person").Has("age", __.Is(gt(28))).Order().By("age", order.Desc).Values("name").ToList() -// Drop existing vertices -prom := g.V().Drop().Iterate() -<-prom ++ // Drop existing vertices ++ prom := g.V().Drop().Iterate() ++ <-prom + -// Simple query to verify connection -g.AddV().Iterate() -count, _ := g.V().Count().Next() -fmt.Println("Vertex count:", *count) ++ // Simple query to verify connection ++ g.AddV().Iterate() ++ count, _ := g.V().Count().Next() ++ fmt.Println("Vertex count:", *count) + } + + func withConfigs() { + // Connecting to the server with customized configurations + driverRemoteConnection, err := gremlingo.NewDriverRemoteConnection("ws://localhost:8182/gremlin", + func(settings *gremlingo.DriverRemoteConnectionSettings) { + settings.Travers
(tinkerpop) branch 3.6-dev updated (9f97af5a87 -> d4fc477a5c)
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a change to branch 3.6-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 9f97af5a87 TINKERPOP-2995 Create Sample Applications in each GLV 3.6 (#2299) add b4e79889f5 Add requestIds to server HTTP error response. new d4fc477a5c Merge pull request #2365 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc | 1 + .../driver/handler/HttpGremlinResponseDecoder.java | 24 --- .../gremlin_python/driver/aiohttp/transport.py | 4 +- .../main/python/gremlin_python/driver/protocol.py | 46 +++--- gremlin-python/src/main/python/tests/conftest.py | 21 ++ .../driver/test_driver_remote_connection_http.py | 10 + .../handler/HttpBasicAuthorizationHandler.java | 15 +-- .../server/handler/HttpGremlinEndpointHandler.java | 18 + .../gremlin/server/handler/HttpHandlerUtil.java| 12 +- .../gremlin/server/HttpDriverIntegrateTest.java| 34 10 files changed, 142 insertions(+), 43 deletions(-)
Re: [PR] Add requestIds to server HTTP error response. [tinkerpop]
kenhuuu merged PR #2365: URL: https://github.com/apache/tinkerpop/pull/2365 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
(tinkerpop) 01/01: Merge pull request #2365
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a commit to branch 3.6-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit d4fc477a5c89906626e4290ecca335cbb7e1b367 Merge: 9f97af5a87 b4e79889f5 Author: kenhuuu <106191785+kenh...@users.noreply.github.com> AuthorDate: Thu Dec 14 19:17:02 2023 -0800 Merge pull request #2365 Add requestIds to server HTTP error response. CHANGELOG.asciidoc | 1 + .../driver/handler/HttpGremlinResponseDecoder.java | 24 --- .../gremlin_python/driver/aiohttp/transport.py | 4 +- .../main/python/gremlin_python/driver/protocol.py | 46 +++--- gremlin-python/src/main/python/tests/conftest.py | 21 ++ .../driver/test_driver_remote_connection_http.py | 10 + .../handler/HttpBasicAuthorizationHandler.java | 15 +-- .../server/handler/HttpGremlinEndpointHandler.java | 18 + .../gremlin/server/handler/HttpHandlerUtil.java| 12 +- .../gremlin/server/HttpDriverIntegrateTest.java| 34 10 files changed, 142 insertions(+), 43 deletions(-)
(tinkerpop) 01/01: Merge branch '3.6-dev' into 3.7-dev
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a commit to branch 3.7-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit c9750b18e942708ac7484e52dbe6da4108761ee0 Merge: 6fbafc436c d4fc477a5c Author: Ken Hu <106191785+kenh...@users.noreply.github.com> AuthorDate: Thu Dec 14 19:28:34 2023 -0800 Merge branch '3.6-dev' into 3.7-dev CHANGELOG.asciidoc | 1 + .../driver/handler/HttpGremlinResponseDecoder.java | 25 +--- .../gremlin_python/driver/aiohttp/transport.py | 4 +- .../main/python/gremlin_python/driver/protocol.py | 46 +++--- gremlin-python/src/main/python/tests/conftest.py | 21 ++ .../driver/test_driver_remote_connection_http.py | 10 + .../handler/HttpBasicAuthorizationHandler.java | 15 +-- .../server/handler/HttpGremlinEndpointHandler.java | 18 + .../gremlin/server/handler/HttpHandlerUtil.java| 12 +- .../gremlin/server/HttpDriverIntegrateTest.java| 34 10 files changed, 144 insertions(+), 42 deletions(-) diff --cc gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java index ec19b28e6d,662ed48a36..665cf1ef3c --- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java +++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/HttpGremlinEndpointHandler.java @@@ -244,20 -239,7 +246,20 @@@ public class HttpGremlinEndpointHandle final List results = requestMessage.getOp().equals(Tokens.OPS_BYTECODE) ? (List) IteratorUtils.asList(o).stream().map(r -> new DefaultRemoteTraverser(r, 1)).collect(Collectors.toList()) : IteratorUtils.asList(o); + +if (mp.isPresent() && mp.get().equals(Tokens.MATERIALIZE_PROPERTIES_TOKENS)) { +final Object firstElement = results.get(0); + +if (firstElement instanceof Element) { +for (int i = 0; i < results.size(); i++) +results.set(i, ReferenceFactory.detach((Element) results.get(i))); +} else if (firstElement instanceof AbstractTraverser) { +for (final Object item : results) +((AbstractTraverser) item).detach(); +} +} + - final ResponseMessage responseMessage = ResponseMessage.build(requestMessage.getRequestId()) + final ResponseMessage responseMessage = ResponseMessage.build(requestId) .code(ResponseStatusCode.SUCCESS) .result(results).create();
(tinkerpop) branch 3.7-dev updated (6fbafc436c -> c9750b18e9)
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a change to branch 3.7-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 6fbafc436c TINKERPOP-2995 Create Sample Applications in each GLV for 3.7 (#2298) add b4e79889f5 Add requestIds to server HTTP error response. add d4fc477a5c Merge pull request #2365 new c9750b18e9 Merge branch '3.6-dev' into 3.7-dev The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc | 1 + .../driver/handler/HttpGremlinResponseDecoder.java | 25 +--- .../gremlin_python/driver/aiohttp/transport.py | 4 +- .../main/python/gremlin_python/driver/protocol.py | 46 +++--- gremlin-python/src/main/python/tests/conftest.py | 21 ++ .../driver/test_driver_remote_connection_http.py | 10 + .../handler/HttpBasicAuthorizationHandler.java | 15 +-- .../server/handler/HttpGremlinEndpointHandler.java | 18 + .../gremlin/server/handler/HttpHandlerUtil.java| 12 +- .../gremlin/server/HttpDriverIntegrateTest.java| 34 10 files changed, 144 insertions(+), 42 deletions(-)
(tinkerpop) branch master updated (307ebbcbcd -> fdf8ee5227)
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git from 307ebbcbcd CTR Update examples to use new with() syntax when creating g add b4e79889f5 Add requestIds to server HTTP error response. add d4fc477a5c Merge pull request #2365 add c9750b18e9 Merge branch '3.6-dev' into 3.7-dev new fdf8ee5227 Merge branch '3.7-dev' The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: CHANGELOG.asciidoc | 1 + .../driver/handler/HttpGremlinResponseDecoder.java | 25 +--- .../gremlin_python/driver/aiohttp/transport.py | 4 +- .../main/python/gremlin_python/driver/protocol.py | 46 +++--- gremlin-python/src/main/python/tests/conftest.py | 21 ++ .../driver/test_driver_remote_connection_http.py | 10 + .../handler/HttpBasicAuthorizationHandler.java | 15 +-- .../server/handler/HttpGremlinEndpointHandler.java | 18 + .../gremlin/server/handler/HttpHandlerUtil.java| 12 +- .../gremlin/server/HttpDriverIntegrateTest.java| 34 10 files changed, 144 insertions(+), 42 deletions(-)
(tinkerpop) 01/01: Merge branch '3.7-dev'
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit fdf8ee5227a2605098fa4710a8b39c24bc124924 Merge: 307ebbcbcd c9750b18e9 Author: Ken Hu <106191785+kenh...@users.noreply.github.com> AuthorDate: Thu Dec 14 19:37:06 2023 -0800 Merge branch '3.7-dev' CHANGELOG.asciidoc | 1 + .../driver/handler/HttpGremlinResponseDecoder.java | 25 +--- .../gremlin_python/driver/aiohttp/transport.py | 4 +- .../main/python/gremlin_python/driver/protocol.py | 46 +++--- gremlin-python/src/main/python/tests/conftest.py | 21 ++ .../driver/test_driver_remote_connection_http.py | 10 + .../handler/HttpBasicAuthorizationHandler.java | 15 +-- .../server/handler/HttpGremlinEndpointHandler.java | 18 + .../gremlin/server/handler/HttpHandlerUtil.java| 12 +- .../gremlin/server/HttpDriverIntegrateTest.java| 34 10 files changed, 144 insertions(+), 42 deletions(-)
(tinkerpop) branch 3.7-dev updated: CTR update serializer package in HttpGremlinResponseDecoder
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a commit to branch 3.7-dev in repository https://gitbox.apache.org/repos/asf/tinkerpop.git The following commit(s) were added to refs/heads/3.7-dev by this push: new 94553476b7 CTR update serializer package in HttpGremlinResponseDecoder 94553476b7 is described below commit 94553476b782e6bba2e1518aa0c8fe8aa8e4df86 Author: Ken Hu <106191785+kenh...@users.noreply.github.com> AuthorDate: Thu Dec 14 19:59:02 2023 -0800 CTR update serializer package in HttpGremlinResponseDecoder --- .../gremlin/driver/handler/HttpGremlinResponseDecoder.java | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/HttpGremlinResponseDecoder.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/HttpGremlinResponseDecoder.java index d6d7ccea39..9b46db27ee 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/HttpGremlinResponseDecoder.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/handler/HttpGremlinResponseDecoder.java @@ -24,11 +24,11 @@ import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToMessageDecoder; import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.HttpResponseStatus; -import org.apache.tinkerpop.gremlin.driver.MessageSerializer; -import org.apache.tinkerpop.gremlin.driver.Tokens; -import org.apache.tinkerpop.gremlin.driver.message.ResponseMessage; -import org.apache.tinkerpop.gremlin.driver.message.ResponseStatusCode; -import org.apache.tinkerpop.gremlin.driver.ser.SerTokens; +import org.apache.tinkerpop.gremlin.util.MessageSerializer; +import org.apache.tinkerpop.gremlin.util.Tokens; +import org.apache.tinkerpop.gremlin.util.message.ResponseMessage; +import org.apache.tinkerpop.gremlin.util.message.ResponseStatusCode; +import org.apache.tinkerpop.gremlin.util.ser.SerTokens; import org.apache.tinkerpop.shaded.jackson.databind.JsonNode; import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
(tinkerpop) branch 37-copy created (now 90c1ae3fe0)
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a change to branch 37-copy in repository https://gitbox.apache.org/repos/asf/tinkerpop.git at 90c1ae3fe0 CTR serializer name change in HttpDriverIntegrateTest This branch includes the following new commits: new 90c1ae3fe0 CTR serializer name change in HttpDriverIntegrateTest The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
(tinkerpop) 01/01: CTR serializer name change in HttpDriverIntegrateTest
This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a commit to branch 37-copy in repository https://gitbox.apache.org/repos/asf/tinkerpop.git commit 90c1ae3fe032761778b8c321879a502167a0cc48 Author: Ken Hu <106191785+kenh...@users.noreply.github.com> AuthorDate: Thu Dec 14 21:03:21 2023 -0800 CTR serializer name change in HttpDriverIntegrateTest --- .../org/apache/tinkerpop/gremlin/server/HttpDriverIntegrateTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/HttpDriverIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/HttpDriverIntegrateTest.java index 8c922383a7..2d08b7722f 100644 --- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/HttpDriverIntegrateTest.java +++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/HttpDriverIntegrateTest.java @@ -209,7 +209,7 @@ public class HttpDriverIntegrateTest extends AbstractGremlinServerIntegrationTes public void shouldDeserializeErrorWithGraphBinary() throws Exception { final Cluster cluster = TestClientFactory.build() .channelizer(Channelizer.HttpChannelizer.class) -.serializer(Serializers.GRAPHBINARY_V1D0) +.serializer(Serializers.GRAPHBINARY_V1) .create(); try { final GraphTraversalSource g = traversal().withRemote(DriverRemoteConnection.using(cluster, "doesNotExist")); @@ -226,7 +226,7 @@ public class HttpDriverIntegrateTest extends AbstractGremlinServerIntegrationTes public void shouldDeserializeErrorWithGraphSON() throws Exception { final Cluster cluster = TestClientFactory.build() .channelizer(Channelizer.HttpChannelizer.class) -.serializer(Serializers.GRAPHSON_V3D0) +.serializer(Serializers.GRAPHSON_V3) .create(); try { final GraphTraversalSource g = traversal().withRemote(DriverRemoteConnection.using(cluster, "doesNotExist"));