usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [38/50] [abbrv] usergrid git commit: Remove additional unused python references.
Date Thu, 04 Feb 2016 17:58:02 GMT
Remove additional unused python references.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/8bead20f
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/8bead20f
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/8bead20f

Branch: refs/heads/asf-site
Commit: 8bead20f9293f7d5685bcfb70443a440a7d10823
Parents: f7b5516
Author: Michael Russo <michaelarusso@gmail.com>
Authored: Tue Feb 2 13:55:08 2016 -0800
Committer: Michael Russo <michaelarusso@gmail.com>
Committed: Tue Feb 2 13:55:08 2016 -0800

----------------------------------------------------------------------
 stack/services/pom.xml                          |   6 --
 .../org/apache/usergrid/utils/PythonUtils.java  | 103 -------------------
 .../src/main/python/pyusergrid/__init__.py      |  15 ---
 .../main/python/pyusergrid/services/__init__.py |  15 ---
 .../pyusergrid/services/pytest/PytestService.py |  31 ------
 .../pyusergrid/services/pytest/__init__.py      |  15 ---
 .../python/pyusergrid/services/pytest/test.py   |  29 ------
 stack/services/src/main/python/test/__init__.py |  15 ---
 stack/services/src/main/python/test/test.py     |  29 ------
 9 files changed, 258 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/8bead20f/stack/services/pom.xml
----------------------------------------------------------------------
diff --git a/stack/services/pom.xml b/stack/services/pom.xml
index b880e8e..c791721 100644
--- a/stack/services/pom.xml
+++ b/stack/services/pom.xml
@@ -56,9 +56,6 @@
                     <include>**/*.xml</include>
                 </includes>
             </resource>
-            <resource>
-                <directory>src/main/python</directory>
-            </resource>
         </resources>
         <testResources>
             <!-- the filtering causes corruption in the p12 files, so exclude them in
filtering and copy without filtering -->
@@ -76,9 +73,6 @@
                 </excludes>
             </testResource>
             <testResource>
-                <directory>src/main/python</directory>
-            </testResource>
-            <testResource>
                 <directory>src/test/resources</directory>
                 <filtering>false</filtering>
                 <includes>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/8bead20f/stack/services/src/main/java/org/apache/usergrid/utils/PythonUtils.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/utils/PythonUtils.java b/stack/services/src/main/java/org/apache/usergrid/utils/PythonUtils.java
deleted file mode 100644
index 773b05c..0000000
--- a/stack/services/src/main/java/org/apache/usergrid/utils/PythonUtils.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.usergrid.utils;
-
-
-import org.python.core.PyObject;
-import org.python.util.PythonInterpreter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.apache.usergrid.utils.StringUtils.compactWhitespace;
-
-
-public class PythonUtils {
-
-    private static final Logger logger = LoggerFactory.getLogger( PythonUtils.class );
-
-
-    public static PyObject getPyClass( String moduleName, String clsName ) {
-        PyObject pyObject = null;
-        PythonInterpreter interpreter = new PythonInterpreter();
-
-        try {
-            interpreter.exec( "from " + moduleName + " import " + clsName );
-            pyObject = interpreter.get( clsName );
-        }
-        catch ( Exception e ) {
-            logger.error( "The Python module '{}' is not found: {}", moduleName, compactWhitespace(
e.toString() ) );
-        }
-        return pyObject;
-    }
-
-
-    @SuppressWarnings("unchecked")
-    public static <T> T createObject( Class<T> interfaceType, PyObject pyClass
) {
-
-        Object javaObj = null;
-
-        PyObject newObj = pyClass.__call__();
-
-        javaObj = newObj.__tojava__( interfaceType );
-
-        return ( T ) javaObj;
-    }
-
-
-    public static Object createObject( Object interfaceType, String moduleName, String clsName
) {
-
-        PyObject pyObject = getPyClass( moduleName, clsName );
-
-        Object javaObj = null;
-        try {
-
-            PyObject newObj = pyObject.__call__();
-
-            javaObj = newObj.__tojava__( Class.forName( interfaceType.toString().substring(
-                    interfaceType.toString().indexOf( " " ) + 1, interfaceType.toString().length()
) ) );
-        }
-        catch ( Exception ex ) {
-            logger.error( "Unable to create Python object: {}", compactWhitespace( ex.toString()
) );
-        }
-
-        return javaObj;
-    }
-
-
-    public static String getModuleName( String s ) {
-        if ( s == null ) {
-            return null;
-        }
-        int i = s.lastIndexOf( '.' );
-        if ( i < 0 ) {
-            return s;
-        }
-        return s.substring( 0, i );
-    }
-
-
-    public static String getClassName( String s ) {
-        if ( s == null ) {
-            return null;
-        }
-        int i = s.lastIndexOf( '.' );
-        if ( i < 0 ) {
-            return s;
-        }
-        return s.substring( i + 1, s.length() );
-    }
-}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/8bead20f/stack/services/src/main/python/pyusergrid/__init__.py
----------------------------------------------------------------------
diff --git a/stack/services/src/main/python/pyusergrid/__init__.py b/stack/services/src/main/python/pyusergrid/__init__.py
deleted file mode 100644
index 217ca43..0000000
--- a/stack/services/src/main/python/pyusergrid/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/usergrid/blob/8bead20f/stack/services/src/main/python/pyusergrid/services/__init__.py
----------------------------------------------------------------------
diff --git a/stack/services/src/main/python/pyusergrid/services/__init__.py b/stack/services/src/main/python/pyusergrid/services/__init__.py
deleted file mode 100644
index 217ca43..0000000
--- a/stack/services/src/main/python/pyusergrid/services/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/usergrid/blob/8bead20f/stack/services/src/main/python/pyusergrid/services/pytest/PytestService.py
----------------------------------------------------------------------
diff --git a/stack/services/src/main/python/pyusergrid/services/pytest/PytestService.py b/stack/services/src/main/python/pyusergrid/services/pytest/PytestService.py
deleted file mode 100644
index 685592a..0000000
--- a/stack/services/src/main/python/pyusergrid/services/pytest/PytestService.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from org.apache.usergrid.persistence import EntityRef
-from org.apache.usergrid.services import AbstractService
-from java.util import UUID
-
-class PytestService(AbstractService):
-   def __init__(self):
-      self._id = UUID(0, 0)
-      AbstractService.__init__(self, "pytest")
-
-   def getId(self):
-      return self._id
-
-   def getType(self):
-      return "Python"
-

http://git-wip-us.apache.org/repos/asf/usergrid/blob/8bead20f/stack/services/src/main/python/pyusergrid/services/pytest/__init__.py
----------------------------------------------------------------------
diff --git a/stack/services/src/main/python/pyusergrid/services/pytest/__init__.py b/stack/services/src/main/python/pyusergrid/services/pytest/__init__.py
deleted file mode 100644
index 217ca43..0000000
--- a/stack/services/src/main/python/pyusergrid/services/pytest/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/usergrid/blob/8bead20f/stack/services/src/main/python/pyusergrid/services/pytest/test.py
----------------------------------------------------------------------
diff --git a/stack/services/src/main/python/pyusergrid/services/pytest/test.py b/stack/services/src/main/python/pyusergrid/services/pytest/test.py
deleted file mode 100644
index e413561..0000000
--- a/stack/services/src/main/python/pyusergrid/services/pytest/test.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from org.apache.usergrid.persistence import EntityRef
-from java.util import UUID
-
-class Test(EntityRef):
-   def __init__(self):
-      self._id = UUID(0, 0)
-
-   def getId(self):
-      return self._id
-
-   def getType(self):
-      return "Python"
-

http://git-wip-us.apache.org/repos/asf/usergrid/blob/8bead20f/stack/services/src/main/python/test/__init__.py
----------------------------------------------------------------------
diff --git a/stack/services/src/main/python/test/__init__.py b/stack/services/src/main/python/test/__init__.py
deleted file mode 100644
index 217ca43..0000000
--- a/stack/services/src/main/python/test/__init__.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/usergrid/blob/8bead20f/stack/services/src/main/python/test/test.py
----------------------------------------------------------------------
diff --git a/stack/services/src/main/python/test/test.py b/stack/services/src/main/python/test/test.py
deleted file mode 100644
index e413561..0000000
--- a/stack/services/src/main/python/test/test.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-from org.apache.usergrid.persistence import EntityRef
-from java.util import UUID
-
-class Test(EntityRef):
-   def __init__(self):
-      self._id = UUID(0, 0)
-
-   def getId(self):
-      return self._id
-
-   def getType(self):
-      return "Python"
-


Mime
View raw message