[GitHub] incubator-tinkerpop pull request #333: if there is no edge label in the Grap...

2016-06-08 Thread spmallette
Github user spmallette commented on a diff in the pull request:

https://github.com/apache/incubator-tinkerpop/pull/333#discussion_r66296879
  
--- Diff: 
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
 ---
@@ -721,14 +732,18 @@ public static void assertCrewGraph(final Graph g1, 
final boolean lossyForId) {
 }
 
 public static void assertClassicGraph(final Graph g1, final boolean 
assertDouble, final boolean lossyForId) {
-assertToyGraph(g1, assertDouble, lossyForId, false);
+assertToyGraph(g1, assertDouble, lossyForId, false, true);
+}
+
+public static void assertNoEdgeGraph(final Graph g1, final boolean 
assertDouble, final boolean lossyForId) {
+assertToyGraph(g1, assertDouble, lossyForId, false, false);
 }
 
 public static void assertModernGraph(final Graph g1, final boolean 
assertDouble, final boolean lossyForId) {
-assertToyGraph(g1, assertDouble, lossyForId, true);
+assertToyGraph(g1, assertDouble, lossyForId, true, true);
 }
 
-private static void assertToyGraph(final Graph g1, final boolean 
assertDouble, final boolean lossyForId, final boolean assertSpecificLabel) {
+private static void assertToyGraph(final Graph g1, final boolean 
assertDouble, final boolean lossyForId, final boolean assertSpecificLabel, 
final boolean assertEdgeLabel) {
--- End diff --

right - but you've modified a core piece of code with `assertToyGraph` by 
adding logic that really doesn't generally apply to anything else that would 
use that logic besides `shouldReadGraphMLWithNoEdgeLabels` which is testing a 
version of "toy graph" that is not even a legitimate representation of our toy 
graph because it has no labels. 

I would prefer that you simplify your `shouldReadGraphMLWithNoEdgeLabels` 
test to read some graphml with just two vertices and an edge with no label and 
then assert that entirely within that test method. Then your test and changes 
are isolated specifically to just `shouldReadGraphMLWithNoEdgeLabels` and that 
core logic remains unchanged.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-tinkerpop pull request #333: if there is no edge label in the Grap...

2016-06-08 Thread SergeVil
Github user SergeVil commented on a diff in the pull request:

https://github.com/apache/incubator-tinkerpop/pull/333#discussion_r66295517
  
--- Diff: 
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
 ---
@@ -721,14 +732,18 @@ public static void assertCrewGraph(final Graph g1, 
final boolean lossyForId) {
 }
 
 public static void assertClassicGraph(final Graph g1, final boolean 
assertDouble, final boolean lossyForId) {
-assertToyGraph(g1, assertDouble, lossyForId, false);
+assertToyGraph(g1, assertDouble, lossyForId, false, true);
+}
+
+public static void assertNoEdgeGraph(final Graph g1, final boolean 
assertDouble, final boolean lossyForId) {
+assertToyGraph(g1, assertDouble, lossyForId, false, false);
 }
 
 public static void assertModernGraph(final Graph g1, final boolean 
assertDouble, final boolean lossyForId) {
-assertToyGraph(g1, assertDouble, lossyForId, true);
+assertToyGraph(g1, assertDouble, lossyForId, true, true);
 }
 
-private static void assertToyGraph(final Graph g1, final boolean 
assertDouble, final boolean lossyForId, final boolean assertSpecificLabel) {
+private static void assertToyGraph(final Graph g1, final boolean 
assertDouble, final boolean lossyForId, final boolean assertSpecificLabel, 
final boolean assertEdgeLabel) {
--- End diff --

That is basically what I do - I produce tinkerpop-no-edge-labels.xml. The 
assert function needs to know if it should check the particular labels values 
or just to assume that they have default values and check them. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-tinkerpop pull request #333: if there is no edge label in the Grap...

2016-06-07 Thread SergeVil
GitHub user SergeVil opened a pull request:

https://github.com/apache/incubator-tinkerpop/pull/333

if there is no edge label in the GraphML file, then use Edge.DEFAULT

As per suggestion in 
https://groups.google.com/forum/?utm_medium=email_source=footer#!topic/gremlin-users/56CI2PTWueg

I'm commiting the change

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/SergeVil/incubator-tinkerpop tp31-graphml

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-tinkerpop/pull/333.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #333


commit 73427e2e4e99d5332cc82e6e1f67295a91df05b6
Author: Serge Vilvovsky 
Date:   2016-06-07T17:17:55Z

if there is no edge label in the GraphML file, then use Edge.DEFAULT




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---