Basic structure of the extension & package

This commit is contained in:
Javier Goizueta
2016-02-15 18:29:43 +01:00
parent 561d1282b3
commit cfd3646fc3
21 changed files with 212 additions and 1 deletions

1
python/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.pyc

9
python/README.md Normal file
View File

@@ -0,0 +1,9 @@
# Crankshaft Python Package
...
### Run the tests
```bash
cd crankshaft
nosetests test/
```

View File

@@ -0,0 +1 @@
import poc

View File

@@ -0,0 +1 @@
from xyz import *

View File

@@ -0,0 +1,3 @@
def xyz():
# print "XYZ"
return "xyz-result"

View File

@@ -0,0 +1,48 @@
"""
CartoDB Spatial Analysis Python Library
See:
https://github.com/CartoDB/crankshaft
"""
from setuptools import setup, find_packages
REQUIRES = [] # ['pysal','numpy']
setup(
name='crankshaft',
version='0.0.01',
description='CartoDB Spatial Analysis Python Library',
url='https://github.com/CartoDB/crankshaft',
author='Data Services Team - CartoDB',
author_email='dataservices@cartodb.com',
license='MIT',
classifiers=[
'Development Status :: 1 - Planning',
'Intended Audience :: Mapping comunity',
'Topic :: Maps :: Mapping Tools',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
],
keywords='maps mapping tools spatial analysis geostatistics',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
extras_require={
'dev': ['unittest'],
'test': ['unittest', 'nose', 'mockredispy', 'mock'],
},
# install_requires=REQUIRES,
# requires=REQUIRES,
test_suite='test'
)

View File

@@ -0,0 +1,9 @@
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
import unittest
import crankshaft
class TestPoc(unittest.TestCase):
def test_should_have_xyz(self):
assert crankshaft.poc.xyz() == "xyz-result"