FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add caption support for datasources by graysonarts · Pull Request #99 · tableau/document-api-python · GitHub

Add caption support for datasources - #99

Merged
graysonarts merged 3 commits into
tableau:developmentfrom
graysonarts:98-add-caption-support
Oct 18, 2016
Merged

Add caption support for datasources#99
graysonarts merged 3 commits into
tableau:developmentfrom
graysonarts:98-add-caption-support

Conversation

Copy link
Copy Markdown
Contributor

Addresses #98

t8y8 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nothing blocking, I think the test cleanup can definitely wait until a new PR. Do consider the 'removing caption' case though.

Comment thread tableaudocumentapi/datasource.py Outdated

@caption.setter
def caption(self, value):
self._datasourceXML.attrib['caption'] = value

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nit: We do .set everywhere else (or everywhere in connections)

Comment thread test/test_datasource.py
elif os.path.isfile(path):
os.unlink(path)

def get_temp_file(self, filename):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We have 3 ways of doing temp file management now.

xfile.temporary_directory has a context manager that creates and deletes a temp dir
bvt.py does a less advanced version of your cleanup methods here
Then these cleanup methods here.

This can be another PR, maybe we want to unify them, at least across the tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Agreed, I'll do a pass to create a "temp file wrapper that both library code and tests can use" along with the auto clean up base test class.

def caption(self):
return self._caption

@caption.setter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Are all datasources guaranteed to have a caption or would you ever want to remove it?

We could apply the None strategy like we do for port

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think it's more idiomatic to do del ds.caption

t8y8 commented Oct 18, 2016

Copy link
Copy Markdown
Contributor

🚀

graysonarts merged commit 9e1d875 into tableau:development Oct 18, 2016
graysonarts deleted the 98-add-caption-support branch October 18, 2016 21:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL