8000 674909 create nested project by jimbodriven · Pull Request #208 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

674909 create nested project #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 4, 2017

Conversation

jimbodriven
Copy link
Contributor

This was originally submitted by @kometes. We rebased on the development branch and resubmitted the pull request to development.

@t8y8 t8y8 self-assigned this Aug 1, 2017
Copy link
Collaborator
@t8y8 t8y8 left a comment

Choose a reason for hiding this comment

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

🚀

I just have small suggested changes

return project_item
except TSC.ServerResponseError:
print('We have already created this project: %s' % project_item.name)
sys.exit()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Make this a sys.exit(1) so it reports an error back in bash scripting cases

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nods.

parser.add_argument('--server', '-s', required=True, help='server address')
parser.add_argument('--username', '-u', required=True, help='username to sign into server')
parser.add_argument('--site', '-S', default=None)
parser.add_argument('-p', default=None)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I realize the other samples may not have this, but can you give it a help text that says "this is the password" or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing.

@@ -72,10 +82,10 @@ def test_update_copy_fields(self):
m.put(self.baseurl + '/1d0304cd-3796-429f-b815-7258370b9b74', text=response_xml)
single_project = TSC.ProjectItem('test')
single_project._id = '1d0304cd-3796-429f-b815-7258370b9b74'
single_project._permissions = 'Test to check if permissions copied over.'
single_project._some_field = 'Test to check if fields are copied over.'
Copy link
Collaborator
@t8y8 t8y8 Aug 2, 2017

Choose a reason for hiding this comment

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

Why this change?

_some_field isn't an attribute of the model, actually, neither is _permissions.

I think you can just delete this from the test entirely, it's not testing anything interesting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We were confused by this as well, at first. The whole point of the test is to verify that attributes not defined in the class definition get copied over to the new object. We update the name to make it more obvious.

Copy link
Collaborator
@t8y8 t8y8 left a comment

Choose a reason for hiding this comment

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

🚀

FYI, Jim and I talked offline, and I told him to remove the copy fields test. I actually want to have all models update from the returned object unless they require the copy (like tags on workbooks).

Longer term I think we should refactor the way we synchronize tags and call them with Pager/OnDemand just like we do for sub-nouns, that way everything is in sync and models aren't responsible for tracking themselves over updates.

/cc @RussTheAerialist

Copy link
Contributor
@graysonarts graysonarts left a comment

Choose a reason for hiding this comment

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

looks solid. Sorry for the delay, I'm in a branch rotation right now, so I have to ignore most of my day job 🎸 🚀

@t8y8 t8y8 merged commit 0b497d9 into tableau:development Aug 4, 2017
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.

4 participants
0