diff --git a/project.clj b/project.clj index ab67f23..af3ca94 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject ardoq/ogre "3.0.0.0-beta2" +(defproject com.ardoq/ogre "3.0.0.0-beta2" :description "Clojure dialect of the Gremlin graph processing language" :url "https://github.com/clojurewerkz/ogre" :license {:name "Eclipse Public License" @@ -6,9 +6,9 @@ :aot :all :dependencies [[org.clojure/clojure "1.8.0"] [potemkin "0.4.3"] - [org.apache.tinkerpop/gremlin-core "3.2.3"] - [org.apache.tinkerpop/gremlin-test "3.2.3" :scope "test"] - [org.apache.tinkerpop/tinkergraph-gremlin "3.2.3" :scope "test"] + [org.apache.tinkerpop/gremlin-core "3.5.4"] + [org.apache.tinkerpop/gremlin-test "3.5.4" :scope "test"] + [org.apache.tinkerpop/tinkergraph-gremlin "3.5.4" :scope "test"] [org.slf4j/slf4j-log4j12 "1.7.21" :scope "test"]] :source-paths ["src/clojure"] :profiles {:dev { :global-vars {*assert* true} @@ -19,12 +19,9 @@ :1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]} :master {:dependencies [[org.clojure/clojure "1.9.0-master-SNAPSHOT"]]}} :aliases {"all" ["with-profile" "dev:dev,master:dev,1.7"]} - :repositories {"sonatype" {:url "http://oss.sonatype.org/content/repositories/releases" - :snapshots false - :releases {:checksum :fail :update :always}} - "sonatype-snapshots" {:url "http://oss.sonatype.org/content/repositories/snapshots" - :snapshots true - :releases {:checksum :fail :update :always}}} + ;; As of TinkerPop 3.5.4, org.apache.tinkerpop.gremlin.process.traversal.dsl.GremlinDslProcessor + ;; specifies RELEASE_8 + :javac-options ["-target" "8" "-source" "8"] :plugins [[lein-junit "1.1.8"]] :junit ["test/java"] :test-paths ["test/clojure"] diff --git a/test/java/org/clojurewerkz/ogre/gremlin/process/OgreTinkerPopCheck.java b/test/java/org/clojurewerkz/ogre/gremlin/process/OgreTinkerPopCheck.java index 4e72bfb..f8fbbdd 100644 --- a/test/java/org/clojurewerkz/ogre/gremlin/process/OgreTinkerPopCheck.java +++ b/test/java/org/clojurewerkz/ogre/gremlin/process/OgreTinkerPopCheck.java @@ -1452,49 +1452,51 @@ public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_VX1X_outE_ } - public static class MapKeysTestTraversals extends MapKeysTest { - private static final String NS = "clojurewerkz.ogre.suite.map-keys-test"; - static { - require.invoke(Clojure.read(NS)); - } - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_outE_valuesXweightX_groupCount_mapKeys() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_outE_valuesXweightX_groupCount_mapKeys").invoke(g); - } - - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_outE_valuesXweightX_groupCount_unfold_mapKeys() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_outE_valuesXweightX_groupCount_unfold_mapKeys").invoke(g); - } - - } - - public static class MapValuesTestTraversals extends MapValuesTest { - private static final String NS = "clojurewerkz.ogre.suite.map-values-test"; - static { - require.invoke(Clojure.read(NS)); - } - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_outE_valuesXweightX_groupCount_mapValues() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_outE_valuesXweightX_groupCount_mapValues").invoke(g); - } - - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_outE_valuesXweightX_groupCount_unfold_mapValues() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_outE_valuesXweightX_groupCount_unfold_mapValues").invoke(g); - } - - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_outE_valuesXweightX_groupCount_mapValues_groupCount_mapValues() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_outE_valuesXweightX_groupCount_mapValues_groupCount_mapValues").invoke(g); - } - - } + // // MapKeysTest removed between tinkerpop 3.2 and 3.5.4 + // public static class MapKeysTestTraversals extends MapKeysTest { + // private static final String NS = "clojurewerkz.ogre.suite.map-keys-test"; + // static { + // require.invoke(Clojure.read(NS)); + // } + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_outE_valuesXweightX_groupCount_mapKeys() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_outE_valuesXweightX_groupCount_mapKeys").invoke(g); + // } + + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_outE_valuesXweightX_groupCount_unfold_mapKeys() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_outE_valuesXweightX_groupCount_unfold_mapKeys").invoke(g); + // } + + // } + + // // MapValuesTest removed between tinkerpop 3.2 and 3.5.4 + // public static class MapValuesTestTraversals extends MapValuesTest { + // private static final String NS = "clojurewerkz.ogre.suite.map-values-test"; + // static { + // require.invoke(Clojure.read(NS)); + // } + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_outE_valuesXweightX_groupCount_mapValues() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_outE_valuesXweightX_groupCount_mapValues").invoke(g); + // } + + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_outE_valuesXweightX_groupCount_unfold_mapValues() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_outE_valuesXweightX_groupCount_unfold_mapValues").invoke(g); + // } + + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_outE_valuesXweightX_groupCount_mapValues_groupCount_mapValues() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_outE_valuesXweightX_groupCount_mapValues_groupCount_mapValues").invoke(g); + // } + + // } public static class MaxTestTraversals extends MaxTest { private static final String NS = "clojurewerkz.ogre.suite.max-test"; @@ -2495,60 +2497,61 @@ public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_group_by } - public static class GroupTestV3d0Traversals extends GroupTestV3d0 { - private static final String NS = "clojurewerkz.ogre.suite.group-test-v3d0"; - static { - require.invoke(Clojure.read(NS)); - } - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byX1X_byXcountXlocalXX_capXaX() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byX1X_byXcountXlocalXX_capXaX").invoke(g); - } - - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_hasXlangX_group_byXlangX_byX1X_byXcountXlocalXX() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_hasXlangX_group_byXlangX_byX1X_byXcountXlocalXX").invoke(g); - } - - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_repeatXout_groupXaX_byXnameX_by_byXcountXlocalXX_timesX2X_capXaX() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_repeatXout_groupXaX_byXnameX_by_byXcountXlocalXX_timesX2X_capXaX").invoke(g); - } - - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byX1X_byXcountXlocalXX() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byX1X_byXcountXlocalXX").invoke(g); - } - - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_group_byXnameX() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_group_byXnameX").invoke(g); - } - - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_groupXaX_byXnameX_capXaX() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_groupXaX_byXnameX_capXaX").invoke(g); - } - - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX").invoke(g); - } - - @Override - @SuppressWarnings("unchecked") - public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_group_byXoutE_countX_byXnameX() { - return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_group_byXoutE_countX_byXnameX").invoke(g); - } - - } + // // GroupTestV3d0 removed between tinkerpop 3.2 and 3.5.4 + // public static class GroupTestV3d0Traversals extends GroupTestV3d0 { + // private static final String NS = "clojurewerkz.ogre.suite.group-test-v3d0"; + // static { + // require.invoke(Clojure.read(NS)); + // } + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byX1X_byXcountXlocalXX_capXaX() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_repeatXbothXfollowedByXX_timesX2X_groupXaX_byXsongTypeX_byX1X_byXcountXlocalXX_capXaX").invoke(g); + // } + + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_hasXlangX_group_byXlangX_byX1X_byXcountXlocalXX() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_hasXlangX_group_byXlangX_byX1X_byXcountXlocalXX").invoke(g); + // } + + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_repeatXout_groupXaX_byXnameX_by_byXcountXlocalXX_timesX2X_capXaX() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_repeatXout_groupXaX_byXnameX_by_byXcountXlocalXX_timesX2X_capXaX").invoke(g); + // } + + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byX1X_byXcountXlocalXX() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_repeatXbothXfollowedByXX_timesX2X_group_byXsongTypeX_byX1X_byXcountXlocalXX").invoke(g); + // } + + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_group_byXnameX() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_group_byXnameX").invoke(g); + // } + + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_groupXaX_byXnameX_capXaX() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_groupXaX_byXnameX_capXaX").invoke(g); + // } + + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX").invoke(g); + // } + + // @Override + // @SuppressWarnings("unchecked") + // public org.apache.tinkerpop.gremlin.process.traversal.Traversal get_g_V_group_byXoutE_countX_byXnameX() { + // return (org.apache.tinkerpop.gremlin.process.traversal.Traversal) Clojure.var(NS, "get_g_V_group_byXoutE_countX_byXnameX").invoke(g); + // } + + // } public static class GroupCountTestTraversals extends GroupCountTest { private static final String NS = "clojurewerkz.ogre.suite.group-count-test"; diff --git a/test/java/org/clojurewerkz/ogre/gremlin/process/TinkerGraphProvider.java b/test/java/org/clojurewerkz/ogre/gremlin/process/TinkerGraphProvider.java index a2d89cc..94b0073 100644 --- a/test/java/org/clojurewerkz/ogre/gremlin/process/TinkerGraphProvider.java +++ b/test/java/org/clojurewerkz/ogre/gremlin/process/TinkerGraphProvider.java @@ -18,7 +18,7 @@ import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerProperty; import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerVertex; import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerVertexProperty; -import org.apache.commons.configuration.Configuration; +import org.apache.commons.configuration2.Configuration; import org.junit.Ignore; import java.io.File; @@ -51,11 +51,11 @@ public Map getBaseConfiguration(final String graphName, final Cl final String idMaker = (idManager.equals(TinkerGraph.DefaultIdManager.ANY) ? selectIdMakerFromTest(test, testMethodName) : idManager).name(); return new HashMap() {{ put(Graph.GRAPH, TinkerGraph.class.getName()); - put(TinkerGraph.CONFIG_VERTEX_ID, idMaker); - put(TinkerGraph.CONFIG_EDGE_ID, idMaker); - put(TinkerGraph.CONFIG_VERTEX_PROPERTY_ID, idMaker); + put(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_ID_MANAGER, idMaker); + put(TinkerGraph.GREMLIN_TINKERGRAPH_EDGE_ID_MANAGER, idMaker); + put(TinkerGraph.GREMLIN_TINKERGRAPH_VERTEX_PROPERTY_ID_MANAGER, idMaker); if (requiresListCardinalityAsDefault(loadGraphWith, test, testMethodName)) - put(TinkerGraph.CONFIG_DEFAULT_VERTEX_PROPERTY_CARDINALITY, VertexProperty.Cardinality.list.name()); + put(TinkerGraph.GREMLIN_TINKERGRAPH_DEFAULT_VERTEX_PROPERTY_CARDINALITY, VertexProperty.Cardinality.list.name()); }}; }