Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

674909 create nested project#208

Merged
t8y8 merged 10 commits intotableau:developmenttableau/server-client-python:developmentfrom
jimbodriven:674909-create-nested-projectjimbodriven/server-client-python:674909-create-nested-projectCopy head branch name to clipboard
Aug 4, 2017
Merged

674909 create nested project#208
t8y8 merged 10 commits intotableau:developmenttableau/server-client-python:developmentfrom
jimbodriven:674909-create-nested-projectjimbodriven/server-client-python:674909-create-nested-projectCopy head branch name to clipboard

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.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.