Repository: tinkerpop Updated Branches: refs/heads/master 5f95ba414 -> e533b7911
Updated docs for IO test generation CTR Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/222408c2 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/222408c2 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/222408c2 Branch: refs/heads/master Commit: 222408c21dbad6cb899a4b9b8453b943b3890322 Parents: 5f95ba4 Author: Stephen Mallette <sp...@genoprime.com> Authored: Wed Jan 24 09:37:59 2018 -0500 Committer: Stephen Mallette <sp...@genoprime.com> Committed: Wed Jan 24 09:41:34 2018 -0500 ---------------------------------------------------------------------- docs/src/dev/developer/for-committers.asciidoc | 8 ++++++-- docs/src/dev/io/graphson.asciidoc | 5 ++++- docs/src/dev/io/gryo.asciidoc | 5 ++++- 3 files changed, 14 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/222408c2/docs/src/dev/developer/for-committers.asciidoc ---------------------------------------------------------------------- diff --git a/docs/src/dev/developer/for-committers.asciidoc b/docs/src/dev/developer/for-committers.asciidoc index 8b917b4..87d3f34 100644 --- a/docs/src/dev/developer/for-committers.asciidoc +++ b/docs/src/dev/developer/for-committers.asciidoc @@ -473,6 +473,12 @@ This command will generate two directories in the `/target` output directory of and `dev-docs`. The contents of `test-case-data` represents the serialized `Model` objects that can be copied to the test resources and the contents of the `dev-docs` contains asciidoc snippets that can be copied to the IO documentation. +Generating data files in the fashion mentioned above with Maven is only good for versions of TinkerPop on the 3.3.x +line because the `gremlin-io-test` module did not exist in 3.2.x. Of course, compatibility is still tested back to +those older versions. To generate test data from 3.2.x, there are Groovy scripts in the comments of the +`gryo.asciidoc` and `graphson.asciidoc` files that can copy/pasted to the Gremlin Console. They will generate the +batch of test files needed for `gremlin-io-test`. + When does this command need to be executed? 1. If a new object is added to the `Model` - in this case, the newly created data files should be copied to the @@ -514,5 +520,3 @@ being careful to match the appropriate "mapper" to the right version. At this point, all of the IO tests are rigged up properly and assuming the test resources are available a standard `mvn clean install` should execute the compatibility tests and validate that everything is working as expected and that there are no breaks in serialization processes. - - http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/222408c2/docs/src/dev/io/graphson.asciidoc ---------------------------------------------------------------------- diff --git a/docs/src/dev/io/graphson.asciidoc b/docs/src/dev/io/graphson.asciidoc index d6875a2..defebb3 100644 --- a/docs/src/dev/io/graphson.asciidoc +++ b/docs/src/dev/io/graphson.asciidoc @@ -15,7 +15,9 @@ See the License for the specific language governing permissions and limitations under the License. ******************************************************************************* -* The following groovy script generates the data samples for GraphSON. +* The following groovy script generates the data samples for GraphSON and is +* used when older versions of TinkerPop need data generation for the tests, +* specifically, the 3.2.x line before gremlin-io-test was a module. ******************************************************************************* import java.time.* mapper = GraphSONMapper.build(). @@ -253,6 +255,7 @@ file.withWriter { writer -> writer.write("\n") writer.write("=== Graph Structure\n\n") writer.write(toJson(graph.edges().next(), "Edge", "", "v2d0-no-types")) + writer.write(toJson(g.V().out().out().path().next(), "Path", "", "v2d0-no-types")) writer.write(toJson(graph.edges().next().properties().next(), "Property", "", "v2d0-no-types")) writer.write(toJson(new org.apache.tinkerpop.gremlin.structure.util.star.DirectionalStarGraph(org.apache.tinkerpop.gremlin.structure.util.star.StarGraph.of(graph.vertices().next()), Direction.BOTH), "StarGraph", "", "v2d0-no-types")) writer.write(toJson(graph, "TinkerGraph", "`TinkerGraph` has a custom serializer that is registered as part of the `TinkerIoRegistry`.", "v2d0-no-types")) http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/222408c2/docs/src/dev/io/gryo.asciidoc ---------------------------------------------------------------------- diff --git a/docs/src/dev/io/gryo.asciidoc b/docs/src/dev/io/gryo.asciidoc index a26a880..c824063 100644 --- a/docs/src/dev/io/gryo.asciidoc +++ b/docs/src/dev/io/gryo.asciidoc @@ -16,7 +16,9 @@ limitations under the License. ******************************************************************************* -* The following groovy script generates the data samples for Gryo. +* The following groovy script generates the data samples for Gryo and is used +* when older versions of TinkerPop need data generation for the tests, +* specifically, the 3.2.x line before gremlin-io-test was a module. ******************************************************************************* import org.apache.tinkerpop.shaded.kryo.io.Output import org.apache.tinkerpop.gremlin.tinkergraph.structure.* @@ -24,6 +26,7 @@ import org.apache.tinkerpop.gremlin.structure.* import org.apache.tinkerpop.gremlin.structure.io.gryo.* import org.apache.tinkerpop.gremlin.structure.io.* import org.apache.commons.configuration.BaseConfiguration +import java.time.* new File("io-output/dev-docs/").mkdirs() new File("io-output/test-case-data/gryo").mkdirs()