GitHub user okram opened a pull request:
https://github.com/apache/tinkerpop/pull/499
TINKERPOP-1520: Difference between 'has' step generated graphson2.0 in java
and python glv implementation
https://issues.apache.org/jira/browse/TINKERPOP-1520
This branch has done alot around testing and GraphSON.
* We now verify that all translators create Traversals with bytecode
identical to the original translated bytecode. (tested against all traversals
in ProcessSuite)
* We now verify that Gremlin-Python's GraphSON Bytecode representation is
identical to Gremlin-Java's. (tested against all traversals in ProcessSuite)
* We now verify that GraphTraversal is in one-to-one correspondence with
Bytecode. That is, has("name") -> [has,name]. (bad ass reflection technique
used here)
* There was a GraphSON 2.0 issue with Edge properties. Changed to the same
format a VertexProperties. Smaller footprint and only necessary information.
* Added VertexID ("vertex"-field) to VertexProperty in GraphSON 2.0 -- how
else will you attach?
* Added Element ("element"-field) to Property in GraphSON 2.0 -- how else
will you attach?
* Added TraversalStrategy classes to GryoMapper as we (@spmallette !!!
shame on you) simply dropped `withStrategies()` instructions in Gryo Bytecode
serialization.
* TranslationStrategy is now smart to remove itself from the Bytecode. No
longer do the Translators have to be wary of this (lots of code deleted).
* We now verify that Gryo created bytecode is identical to source bytecode.
...need I go on?
VOTE +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1520
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/499.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 #499
----
commit 6aa6fc5adc47170e1c049bc47970bcaaf54b5ff2
Author: Marko A. Rodriguez <[email protected]>
Date: 2016-11-16T23:08:19Z
TranslationStrategy (a test framework strategy) now verifies that the
Bytecode submitted to the translator is equal to the bytecode of the
generated/translated traversal. This was a nightmare to get everything working.
We had so many little nick nack bugs. In particular, VertexProperty and
Property GraphSON serialization needs to have their element() serialized or
else you can't attach/argument. This is still a problem in Gryo and we will
need to solve it for 3.3.0. In short, lots of test cases added, lots of tweaks
to the various translators made, graphson.py updated significantly (though
backwards compatible), etc. Crazy shiiiiiiiet.
commit 86e420f4c0e2ef9d163c87b3540ed2058193520e
Author: Marko A. Rodriguez <[email protected]>
Date: 2016-11-17T19:16:58Z
Element data in VertexProperty and Property are now minimilistic and only
what is necessay to attach the Property/VertexProperty. Added more test cases
accordingly.
commit 09bde87e57eb77da7806724a9cbf06181b97f040
Author: Marko A. Rodriguez <[email protected]>
Date: 2016-11-17T20:47:02Z
changed the Edge property GraphSON serialization to do key/value map like
VertexProperty metaProperties. Talking with @spmallette -- we believe the Edge
property serialization is a bug. Other random cleanups.
commit e86372d0733088a2bdd87a0827eaa7abdefcf141
Author: Marko A. Rodriguez <[email protected]>
Date: 2016-11-18T00:58:32Z
I just did Gods work. TranslationStrategy is now smart about removing
itself from the Bytecode so all the Translators no longer have to have
IS_TESTING in them. GraphTraversalTest has a sweet method that uses reflection
to generate fake arguments to ensure that the Bytecode instruction arguments
are identical to the method arguments. Found lots of redirects in
GraphTraversal that have since been fixed. Step->Instruction are in one-to-one
correspondence. More work on GraphSON and added more tests around serialization
in both Python and Java. Added an IS_TESTING extension to
PythonGraphSONTranslator that ensures that the GraphSON representaiton of the
java Bytecode is the same as the Python bytecode. TaDa. Added some more cool
helper methods to BytecodeHelper. Crazy cool stuff.
commit 31cdb4bf6cfb02e56cce35e536d85c6c13b03e97
Author: Marko A. Rodriguez <[email protected]>
Date: 2016-11-18T13:42:41Z
IoPropertyTest had to be tweaked cause graphson v2 without embedded types
was turning Neo4j ids to ints instead of longs. We really should get rid of
graphson v2-noembedding (@spmallette). Finally, along with doing string
comparison of the GraphSON from the bytecode of both Java and Python, I also
convert to a Map<String,Object> and test the .equals() of the two. Done with
this branch. What a whirl wind tour.
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---