From 10d13368ff89f5946da1e188902e63a8ac4408d4 Mon Sep 17 00:00:00 2001
From: davebshow <davebshow@gmail.com>
Date: Mon, 18 Jul 2016 20:19:56 -0400
Subject: [PATCH] moved gremlin_python to top level, fixed imports

---
 docs/index.rst                                              | 2 +-
 goblin/app.py                                               | 2 +-
 goblin/driver/graph.py                                      | 4 ++--
 {goblin/gremlin_python => gremlin_python}/__init__.py       | 0
 .../gremlin_python => gremlin_python}/driver/__init__.py    | 0
 .../driver/remote_connection.py                             | 0
 .../driver/rest_remote_connection.py                        | 2 +-
 .../gremlin_python => gremlin_python}/process/__init__.py   | 0
 .../process/graph_traversal.py                              | 2 +-
 .../process/groovy_translator.py                            | 0
 .../process/jython_translator.py                            | 0
 .../gremlin_python => gremlin_python}/process/traversal.py  | 2 +-
 {goblin/gremlin_python => gremlin_python}/statics.py        | 0
 .../gremlin_python => gremlin_python}/structure/__init__.py | 0
 .../gremlin_python => gremlin_python}/structure/graph.py    | 4 ++--
 .../structure/remote_graph.py                               | 4 ++--
 setup.py                                                    | 6 +++---
 tests/conftest.py                                           | 2 +-
 tests/test_app.py                                           | 2 +-
 tests/test_graph.py                                         | 2 +-
 20 files changed, 17 insertions(+), 17 deletions(-)
 rename {goblin/gremlin_python => gremlin_python}/__init__.py (100%)
 rename {goblin/gremlin_python => gremlin_python}/driver/__init__.py (100%)
 rename {goblin/gremlin_python => gremlin_python}/driver/remote_connection.py (100%)
 rename {goblin/gremlin_python => gremlin_python}/driver/rest_remote_connection.py (96%)
 rename {goblin/gremlin_python => gremlin_python}/process/__init__.py (100%)
 rename {goblin/gremlin_python => gremlin_python}/process/graph_traversal.py (99%)
 rename {goblin/gremlin_python => gremlin_python}/process/groovy_translator.py (100%)
 rename {goblin/gremlin_python => gremlin_python}/process/jython_translator.py (100%)
 rename {goblin/gremlin_python => gremlin_python}/process/traversal.py (99%)
 rename {goblin/gremlin_python => gremlin_python}/statics.py (100%)
 rename {goblin/gremlin_python => gremlin_python}/structure/__init__.py (100%)
 rename {goblin/gremlin_python => gremlin_python}/structure/graph.py (86%)
 rename {goblin/gremlin_python => gremlin_python}/structure/remote_graph.py (92%)

diff --git a/docs/index.rst b/docs/index.rst
index fa7b74f..d95e9f6 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -57,7 +57,7 @@ Submit scripts and bindings to the `Gremlin Server`_::
 
 Generate and submit Gremlin traversals in native Python::
 
-    >>> from goblin.gremlin_python import process  # This will change when released
+    >>> from gremlin_python import process
 
 
     >>> connection = loop.run_until_complete(
diff --git a/goblin/app.py b/goblin/app.py
index 5740449..c7b698c 100644
--- a/goblin/app.py
+++ b/goblin/app.py
@@ -20,7 +20,7 @@
 import collections
 import logging
 
-from goblin.gremlin_python import process
+from gremlin_python import process
 from goblin import driver, element, session
 
 
diff --git a/goblin/driver/graph.py b/goblin/driver/graph.py
index 7c41168..4d19a6d 100644
--- a/goblin/driver/graph.py
+++ b/goblin/driver/graph.py
@@ -17,9 +17,9 @@
 
 """A temporary solution to allow integration with gremlin_python package."""
 
-from goblin.gremlin_python.process.graph_traversal import (
+from gremlin_python.process.graph_traversal import (
     GraphTraversalSource, GraphTraversal)
-from goblin.gremlin_python.process.traversal import (
+from gremlin_python.process.traversal import (
     TraversalStrategy, TraversalStrategies)
 
 
diff --git a/goblin/gremlin_python/__init__.py b/gremlin_python/__init__.py
similarity index 100%
rename from goblin/gremlin_python/__init__.py
rename to gremlin_python/__init__.py
diff --git a/goblin/gremlin_python/driver/__init__.py b/gremlin_python/driver/__init__.py
similarity index 100%
rename from goblin/gremlin_python/driver/__init__.py
rename to gremlin_python/driver/__init__.py
diff --git a/goblin/gremlin_python/driver/remote_connection.py b/gremlin_python/driver/remote_connection.py
similarity index 100%
rename from goblin/gremlin_python/driver/remote_connection.py
rename to gremlin_python/driver/remote_connection.py
diff --git a/goblin/gremlin_python/driver/rest_remote_connection.py b/gremlin_python/driver/rest_remote_connection.py
similarity index 96%
rename from goblin/gremlin_python/driver/rest_remote_connection.py
rename to gremlin_python/driver/rest_remote_connection.py
index b2034fd..6d967f8 100644
--- a/goblin/gremlin_python/driver/rest_remote_connection.py
+++ b/gremlin_python/driver/rest_remote_connection.py
@@ -19,7 +19,7 @@ under the License.
 import json
 import requests
 
-from goblin.gremlin_python.process.traversal import Traverser
+from gremlin_python.process.traversal import Traverser
 from .remote_connection import RemoteConnection
 
 __author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
diff --git a/goblin/gremlin_python/process/__init__.py b/gremlin_python/process/__init__.py
similarity index 100%
rename from goblin/gremlin_python/process/__init__.py
rename to gremlin_python/process/__init__.py
diff --git a/goblin/gremlin_python/process/graph_traversal.py b/gremlin_python/process/graph_traversal.py
similarity index 99%
rename from goblin/gremlin_python/process/graph_traversal.py
rename to gremlin_python/process/graph_traversal.py
index b5d6a17..37f9deb 100644
--- a/goblin/gremlin_python/process/graph_traversal.py
+++ b/gremlin_python/process/graph_traversal.py
@@ -19,7 +19,7 @@ under the License.
 from .traversal import RawExpression
 from .traversal import Traversal
 from .traversal import Bytecode
-from goblin.gremlin_python import statics
+from gremlin_python import statics
 
 class GraphTraversalSource(object):
   def __init__(self, graph, traversal_strategies, graph_traversal=None, bytecode=Bytecode()):
diff --git a/goblin/gremlin_python/process/groovy_translator.py b/gremlin_python/process/groovy_translator.py
similarity index 100%
rename from goblin/gremlin_python/process/groovy_translator.py
rename to gremlin_python/process/groovy_translator.py
diff --git a/goblin/gremlin_python/process/jython_translator.py b/gremlin_python/process/jython_translator.py
similarity index 100%
rename from goblin/gremlin_python/process/jython_translator.py
rename to gremlin_python/process/jython_translator.py
diff --git a/goblin/gremlin_python/process/traversal.py b/gremlin_python/process/traversal.py
similarity index 99%
rename from goblin/gremlin_python/process/traversal.py
rename to gremlin_python/process/traversal.py
index c37c440..7558151 100644
--- a/goblin/gremlin_python/process/traversal.py
+++ b/gremlin_python/process/traversal.py
@@ -18,7 +18,7 @@ under the License.
 '''
 from abc import abstractmethod
 from aenum import Enum
-from goblin.gremlin_python import statics
+from gremlin_python import statics
 
 class Traversal(object):
     def __init__(self, graph, traversal_strategies, bytecode):
diff --git a/goblin/gremlin_python/statics.py b/gremlin_python/statics.py
similarity index 100%
rename from goblin/gremlin_python/statics.py
rename to gremlin_python/statics.py
diff --git a/goblin/gremlin_python/structure/__init__.py b/gremlin_python/structure/__init__.py
similarity index 100%
rename from goblin/gremlin_python/structure/__init__.py
rename to gremlin_python/structure/__init__.py
diff --git a/goblin/gremlin_python/structure/graph.py b/gremlin_python/structure/graph.py
similarity index 86%
rename from goblin/gremlin_python/structure/graph.py
rename to gremlin_python/structure/graph.py
index 82909f1..60b2211 100644
--- a/goblin/gremlin_python/structure/graph.py
+++ b/gremlin_python/structure/graph.py
@@ -19,8 +19,8 @@ under the License.
 
 __author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 
-from goblin.gremlin_python.process.graph_traversal import GraphTraversalSource
-from goblin.gremlin_python.process.traversal import TraversalStrategies
+from gremlin_python.process.graph_traversal import GraphTraversalSource
+from gremlin_python.process.traversal import TraversalStrategies
 
 
 class Graph(object):
diff --git a/goblin/gremlin_python/structure/remote_graph.py b/gremlin_python/structure/remote_graph.py
similarity index 92%
rename from goblin/gremlin_python/structure/remote_graph.py
rename to gremlin_python/structure/remote_graph.py
index 19125ea..778895b 100644
--- a/goblin/gremlin_python/structure/remote_graph.py
+++ b/gremlin_python/structure/remote_graph.py
@@ -20,8 +20,8 @@ under the License.
 __author__ = 'Marko A. Rodriguez (http://markorodriguez.com)'
 
 from .graph import Graph
-from goblin.gremlin_python.process.traversal import TraversalStrategies
-from goblin.gremlin_python.process.traversal import TraversalStrategy
+from gremlin_python.process.traversal import TraversalStrategies
+from gremlin_python.process.traversal import TraversalStrategy
 
 
 class RemoteGraph(Graph):
diff --git a/setup.py b/setup.py
index 654cd0a..a005006 100644
--- a/setup.py
+++ b/setup.py
@@ -9,9 +9,9 @@ setup(
     author="davebshow",
     author_email="davebshow@gmail.com",
     description="Python toolkit for TP3 Gremlin Server",
-    packages=["goblin", "goblin.gremlin_python", "goblin.gremlin_python.process",
-              "goblin.gremlin_python.driver", "goblin.gremlin_python.structure",
-              "goblin.driver", "tests"],
+    packages=["goblin", "goblin.driver", "gremlin_python",
+              "gremlin_python.process", "gremlin_python.driver",
+              "gremlin_python.structure", "tests"],
     install_requires=[
         "aenum==1.4.5",
         "aiohttp==0.21.6",
diff --git a/tests/conftest.py b/tests/conftest.py
index 5e77cdf..3775dd9 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -17,7 +17,7 @@
 
 import pytest
 from goblin import create_app, driver, element, properties
-from goblin.gremlin_python import process
+from gremlin_python import process
 
 
 class Person(element.Vertex):
diff --git a/tests/test_app.py b/tests/test_app.py
index 14223cf..cf2e11d 100644
--- a/tests/test_app.py
+++ b/tests/test_app.py
@@ -16,7 +16,7 @@
 # along with Goblin.  If not, see <http://www.gnu.org/licenses/>.
 
 from goblin import element
-from goblin.gremlin_python import process
+from gremlin_python import process
 
 
 def test_registry(app, person, place, knows, lives_in):
diff --git a/tests/test_graph.py b/tests/test_graph.py
index 81e7ac7..415f6f9 100644
--- a/tests/test_graph.py
+++ b/tests/test_graph.py
@@ -17,7 +17,7 @@
 
 import pytest
 
-from goblin.gremlin_python import process
+from gremlin_python import process
 
 
 @pytest.mark.asyncio
-- 
GitLab