diff --git a/.gitignore b/.gitignore index 3fc52ff..ee250af 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,4 @@ target/ #Other things .DS_Store +.idea diff --git a/.travis.yml b/.travis.yml index db3656e..2480df6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,9 @@ install: # command to run tests script: # Tests - - python test.py + - python setup.py test # pep8 - - pep8 --ignore=E501 . + - pep8 . # Examples - (cd "Examples/Replicate Workbook" && python replicateWorkbook.py) - (cd "Examples/List TDS Info" && python listTDSInfo.py) diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..066edef --- /dev/null +++ b/setup.cfg @@ -0,0 +1,10 @@ +[wheel] +universal = 1 + +[pycodestyle] +select = +max_line_length = 120 + +[pep8] +max_line_length = 120 + diff --git a/setup.py b/setup.py index 8925444..f693919 100644 --- a/setup.py +++ b/setup.py @@ -5,12 +5,12 @@ setup( name='tableaudocumentapi', - version='0.0.1', - summary='A Python module for working with Tableau files.', + version='0.1.0-dev', author='Tableau Software', author_email='github@tableau.com', url='https://github.com/tableau/document-api-python', py_modules=['tableaudocumentapi'], license='MIT', - description='A Python module for working with Tableau files.' + description='A Python module for working with Tableau files.', + test_suite='test' ) diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test.py b/test/bvt.py similarity index 96% rename from test.py rename to test/bvt.py index 3172673..f521465 100644 --- a/test.py +++ b/test/bvt.py @@ -5,17 +5,19 @@ from tableaudocumentapi import Workbook, Datasource, Connection, ConnectionParser +# Disable the 120 line limit because of the embedded XML on these lines +# TODO: Move the XML into external files and load them when needed -TABLEAU_93_WORKBOOK = '''''' +TABLEAU_93_WORKBOOK = '''''' # noqa -TABLEAU_93_TDS = '''''' +TABLEAU_93_TDS = '''''' # noqa -TABLEAU_10_TDS = '''''' +TABLEAU_10_TDS = '''''' # noqa -TABLEAU_10_WORKBOOK = '''''' +TABLEAU_10_WORKBOOK = '''''' # noqa TABLEAU_CONNECTION_XML = ET.fromstring( - '''''') + '''''') # noqa class HelperMethodTests(unittest.TestCase):