You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2022/03/29 22:41:34 UTC
[GitHub] [tinkerpop] spmallette opened a new pull request #1605: TINKERPOP-2525 Extended gherkin tests to cover SubgraphStrategy
spmallette opened a new pull request #1605:
URL: https://github.com/apache/tinkerpop/pull/1605
https://issues.apache.org/jira/browse/TINKERPOP-2525
@FlorianHockmann please take a look at the .NET changes. I wasn't familiar with the CompatibilitySuppressions.xml file and not sure I liked how i dealt with the `checkAdjacentVertices` option that was missing from `SubgraphStrategy`. Perhaps you could suggest a better way than how I did it?
All tests pass with `docker/build.sh -t -n -i`
VOTE +1
--
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-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] FlorianHockmann commented on a change in pull request #1605: TINKERPOP-2525 Extended gherkin tests to cover SubgraphStrategy
Posted by GitBox <gi...@apache.org>.
FlorianHockmann commented on a change in pull request #1605:
URL: https://github.com/apache/tinkerpop/pull/1605#discussion_r838250544
##########
File path: gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
##########
@@ -53,6 +54,10 @@ public SubgraphStrategy() : base(JavaFqcn)
Configuration["edges"] = edges;
if (vertexProperties != null)
Configuration["vertexProperties"] = vertexProperties;
+
+ // hate to write this by default so only going to write it if it's false which is the non-default value
+ if (!checkAdjacentVertices)
+ Configuration["checkAdjacentVertices"] = checkAdjacentVertices;
Review comment:
Really just a nit, but my IDE (Rider) is complaining that `checkAdjacentVertices` will always be `false` here and suggests to change this to `Configuration["checkAdjacentVertices"] = false;` to make this more obvious.
##########
File path: gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
##########
@@ -53,6 +54,10 @@ public SubgraphStrategy() : base(JavaFqcn)
Configuration["edges"] = edges;
if (vertexProperties != null)
Configuration["vertexProperties"] = vertexProperties;
+
+ // hate to write this by default so only going to write it if it's false which is the non-default value
Review comment:
Are we 100% sure that `true` will stay the default? Otherwise, we should maybe really just always add this so we don't at some point change the default in Java to `false` and then forget to update this here.
##########
File path: gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
##########
@@ -43,8 +43,9 @@ public SubgraphStrategy() : base(JavaFqcn)
/// <param name="vertices">Constrains vertices for the <see cref="ITraversal" />.</param>
/// <param name="edges">Constrains edges for the <see cref="ITraversal" />.</param>
/// <param name="vertexProperties">Constrains vertex properties for the <see cref="ITraversal" />.</param>
+ /// <param name="checkAdjacentVertices">Determines if filters are applied to the adjacent vertices of an edge.</param>
public SubgraphStrategy(ITraversal vertices = null, ITraversal edges = null,
- ITraversal vertexProperties = null)
+ ITraversal vertexProperties = null, bool checkAdjacentVertices = true)
Review comment:
You could also change this to `bool? checkAdjacentVertices = null` and then change the two lines below to:
```c#
if (checkAdjacentVertices != null)
Configuration["checkAdjacentVertices"] = checkAdjacentVertices.Value;
```
if you want this parameter to be optional and only set it if the user supplied a value here, irrespective of whether this value is `true` or `false`.
But we can also keep this as is from my side.
--
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-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] spmallette commented on a change in pull request #1605: TINKERPOP-2525 Extended gherkin tests to cover SubgraphStrategy
Posted by GitBox <gi...@apache.org>.
spmallette commented on a change in pull request #1605:
URL: https://github.com/apache/tinkerpop/pull/1605#discussion_r838521085
##########
File path: gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
##########
@@ -43,8 +43,9 @@ public SubgraphStrategy() : base(JavaFqcn)
/// <param name="vertices">Constrains vertices for the <see cref="ITraversal" />.</param>
/// <param name="edges">Constrains edges for the <see cref="ITraversal" />.</param>
/// <param name="vertexProperties">Constrains vertex properties for the <see cref="ITraversal" />.</param>
+ /// <param name="checkAdjacentVertices">Determines if filters are applied to the adjacent vertices of an edge.</param>
public SubgraphStrategy(ITraversal vertices = null, ITraversal edges = null,
- ITraversal vertexProperties = null)
+ ITraversal vertexProperties = null, bool checkAdjacentVertices = true)
Review comment:
this was what i wanted. i tried it but it didn't work for some reason yesterday. today, it's fine. 🤷
--
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-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] spmallette merged pull request #1605: TINKERPOP-2525 Extended gherkin tests to cover SubgraphStrategy
Posted by GitBox <gi...@apache.org>.
spmallette merged pull request #1605:
URL: https://github.com/apache/tinkerpop/pull/1605
--
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-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] FlorianHockmann commented on a change in pull request #1605: TINKERPOP-2525 Extended gherkin tests to cover SubgraphStrategy
Posted by GitBox <gi...@apache.org>.
FlorianHockmann commented on a change in pull request #1605:
URL: https://github.com/apache/tinkerpop/pull/1605#discussion_r838507018
##########
File path: gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
##########
@@ -182,16 +182,12 @@ private void OutputResults(List<ResultFeature> results)
foreach (var resultScenario in resultFeature.Scenarios)
{
totalScenarios++;
- WriteOutput($" Scenario: {resultScenario.Key.Name}");
Review comment:
This shortens the output to make it easier to see which scenarios are actually failing, right?
--
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-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] spmallette commented on a change in pull request #1605: TINKERPOP-2525 Extended gherkin tests to cover SubgraphStrategy
Posted by GitBox <gi...@apache.org>.
spmallette commented on a change in pull request #1605:
URL: https://github.com/apache/tinkerpop/pull/1605#discussion_r838502784
##########
File path: gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Strategy/Decoration/SubgraphStrategy.cs
##########
@@ -53,6 +54,10 @@ public SubgraphStrategy() : base(JavaFqcn)
Configuration["edges"] = edges;
if (vertexProperties != null)
Configuration["vertexProperties"] = vertexProperties;
+
+ // hate to write this by default so only going to write it if it's false which is the non-default value
Review comment:
decided to change it to always write it.
--
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-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] spmallette commented on a change in pull request #1605: TINKERPOP-2525 Extended gherkin tests to cover SubgraphStrategy
Posted by GitBox <gi...@apache.org>.
spmallette commented on a change in pull request #1605:
URL: https://github.com/apache/tinkerpop/pull/1605#discussion_r838521871
##########
File path: gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
##########
@@ -182,16 +182,12 @@ private void OutputResults(List<ResultFeature> results)
foreach (var resultScenario in resultFeature.Scenarios)
{
totalScenarios++;
- WriteOutput($" Scenario: {resultScenario.Key.Name}");
Review comment:
yeah - added a note about that to the commit comment. it was getting way too hard to find the errors.
--
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-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] FlorianHockmann commented on a change in pull request #1605: TINKERPOP-2525 Extended gherkin tests to cover SubgraphStrategy
Posted by GitBox <gi...@apache.org>.
FlorianHockmann commented on a change in pull request #1605:
URL: https://github.com/apache/tinkerpop/pull/1605#discussion_r838527326
##########
File path: gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
##########
@@ -182,16 +182,12 @@ private void OutputResults(List<ResultFeature> results)
foreach (var resultScenario in resultFeature.Scenarios)
{
totalScenarios++;
- WriteOutput($" Scenario: {resultScenario.Key.Name}");
Review comment:
Yeah makes sense, I've also ran into that problem in the past.
--
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-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org