Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/tableau/server-clien…
Browse files Browse the repository at this point in the history
  • Loading branch information
shinchris committed Sep 12, 2016
2 parents ee05a27 + dcf740d commit f46afac
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ python:
# command to install dependencies
install:
- "pip install -e ."
# - "pip install pep8"
- "pip install pycodestyle"
# command to run tests
script:
# Tests
- python setup.py test
# pep8 - disabled for now until we can scrub the files to make sure we pass before turning it on
# - pep8 .
- pycodestyle .
14 changes: 1 addition & 13 deletions samples/explore_datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
logging_level = getattr(logging, args.logging_level.upper())
logging.basicConfig(level=logging_level)

##### SIGN IN #####
# SIGN IN
tableau_auth = TSC.TableauAuth(args.username, password)
server = TSC.Server(args.server)
with server.auth.sign_in(tableau_auth):

# Query projects for use when demonstrating publishing and updating
pagination_item, all_projects = server.projects.get()
default_project = next((project for project in all_projects if project.is_default()), None)
Expand Down Expand Up @@ -63,14 +62,3 @@
print("\nConnections for {}: ".format(sample_datasource.name))
print(["{0}({1})".format(connection.id, connection.datasource_name)
for connection in sample_datasource.connections])











2 changes: 1 addition & 1 deletion samples/explore_workbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
logging_level = getattr(logging, args.logging_level.upper())
logging.basicConfig(level=logging_level)

##### SIGN IN #####
# SIGN IN
tableau_auth = TSC.TableauAuth(args.username, password)
server = TSC.Server(args.server)
with server.auth.sign_in(tableau_auth):
Expand Down
2 changes: 1 addition & 1 deletion tableauserverclient/models/datasource_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def from_response(cls, resp):
tags, project_id, project_name, owner_id) = cls._parse_element(datasource_xml)
datasource_item = cls(project_id)
datasource_item._set_values(id, name, datasource_type, content_url, created_at, updated_at,
tags, None, project_name, owner_id)
tags, None, project_name, owner_id)
all_datasource_items.append(datasource_item)
return all_datasource_items

Expand Down
2 changes: 1 addition & 1 deletion tableauserverclient/models/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
class UnpopulatedPropertyError(Exception):
pass
pass
2 changes: 1 addition & 1 deletion tableauserverclient/models/user_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def from_response(cls, resp):
fullname, email, auth_setting, domain_name) = cls._parse_element(user_xml)
user_item = cls(name, site_role)
user_item._set_values(id, name, site_role, last_login, external_auth_user_id,
fullname, email, auth_setting, domain_name)
fullname, email, auth_setting, domain_name)
all_user_items.add(user_item)
return all_user_items

Expand Down
2 changes: 1 addition & 1 deletion tableauserverclient/models/workbook_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def from_response(cls, resp):

workbook_item = cls(project_id)
workbook_item._set_values(id, name, content_url, created_at, updated_at,
size, show_tabs, None, project_name, owner_id, tags, views)
size, show_tabs, None, project_name, owner_id, tags, views)
all_workbook_items.append(workbook_item)
return all_workbook_items

Expand Down
2 changes: 1 addition & 1 deletion tableauserverclient/namespace.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
NAMESPACE = {'t': 'http://tableau.com/api'}
NAMESPACE = {'t': 'http://tableau.com/api'}
2 changes: 0 additions & 2 deletions tableauserverclient/server/endpoint/projects_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,3 @@ def create(self, project_item):
new_project = ProjectItem.from_response(server_response.content)[0]
logger.info('Created new project (ID: {0})'.format(new_project.id))
return new_project


2 changes: 1 addition & 1 deletion tableauserverclient/server/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
class NotSignedInError(Exception):
pass
pass
8 changes: 0 additions & 8 deletions test/test_request_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,3 @@ def test_filter_tags_in(self):
self.assertEqual(set(['weather']), matching_workbooks[0].tags)
self.assertEqual(set(['safari']), matching_workbooks[1].tags)
self.assertEqual(set(['sample']), matching_workbooks[2].tags)








2 changes: 1 addition & 1 deletion test/test_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ def test_populate_preview_image_missing_id(self):

single_view._id = None
single_view._workbook_id = '3cc6cd06-89ce-4fdc-b935-5294135d6d42'
self.assertRaises(TSC.MissingRequiredFieldError, self.server.views.populate_preview_image, single_view)
self.assertRaises(TSC.MissingRequiredFieldError, self.server.views.populate_preview_image, single_view)

0 comments on commit f46afac

Please sign in to comment.