Skip to content

Conversation

@jorwoods
Copy link
Contributor

Reopening #591. I closed accidentally instead of simply commenting.

@t8y8
Copy link
Collaborator

t8y8 commented Jun 25, 2020

@shinchris I reviewed this before, a second opinion might be good (the old PR talks about why I requested a simple dict, I'm starting to reconsider but what do you think?)

@t8y8 t8y8 requested a review from shinchris June 25, 2020 17:19
@jorwoods
Copy link
Contributor Author

Per our prior discussion, I like the dictionary approach as it separates the items out clearly, while still being iterable on the empty versions.

@t8y8 t8y8 changed the base branch from master to development June 25, 2020 18:02
Copy link
Contributor

@shinchris shinchris left a comment

Choose a reason for hiding this comment

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

The simple dict seems like a good approach to me as well

@jorwoods jorwoods force-pushed the jorwoods/user_favorites branch from 301c257 to 5c68266 Compare June 26, 2020 02:55
@jorwoods
Copy link
Contributor Author

@shinchris Made the changes you suggested.

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.

🚀

@shinchris shinchris merged commit eb18359 into tableau:development Jun 26, 2020
@shinchris
Copy link
Contributor

Thanks @jorwoods for the PR!

This was referenced Jul 10, 2020
gaoang2148 pushed a commit that referenced this pull request Jul 10, 2020
* Sync development with master branch (#613)

* delete docs folder from master (#520)

* delete folder

* add back readme for docs

* Fix logger statement in User.add (#608)

The logger statement is using the parameter to output the id of the user, but that isnt set until line 67 and saved to a new variable. We want the logger statement to use that new user

Co-authored-by: Jac <[email protected]>
Co-authored-by: Reba Magier <[email protected]>

* Adds hidden_views parameter to publish() (#614)

* delete docs folder from master (#520)

* delete folder

* add back readme for docs

* Fix logger statement in User.add (#608)

The logger statement is using the parameter to output the id of the user, but that isnt set until line 67 and saved to a new variable. We want the logger statement to use that new user

* Adds hidden views parameter to workbook publish

* Pycodestyle

Co-authored-by: Chris Shin <[email protected]>
Co-authored-by: Jac <[email protected]>
Co-authored-by: Reba Magier <[email protected]>

* Code cleanup (#618)

* delete docs folder from master (#520)

* delete folder

* add back readme for docs

* Fix logger statement in User.add (#608)

The logger statement is using the parameter to output the id of the user, but that isnt set until line 67 and saved to a new variable. We want the logger statement to use that new user

* Cleans up imports and fixes some errors along the way

* pycodestyle fix for single char var name

Co-authored-by: Chris Shin <[email protected]>
Co-authored-by: Jac <[email protected]>
Co-authored-by: Reba Magier <[email protected]>

* update comment to say Python 3.5 is required to run samples (#619)

* update comment to say Python 3.5 is required to run samples

* pycodestyle fix for single char var name

* Simple Paging Endpoint for GraphQL/Metadata API (#623)

Because GraphQL can be arbitrarily complex and nested, we can't get as smart with an automatic Pager object without parsing the query, and that's a can of worms.

So for now, I added a new endpoint that will take a single query with one set of pagination parameters and run through it until it ends. It's not very smart, but it works.

* Support Metadata Services Backfill & Eventing APIs (#626)

Simple JSON endpoints that return the status of Metadata Services related events.

* Adds in maxage param to csv and pdf export options (#635)

* Adds in maxage param to csv and pdf export options

* Fixes style issue

* Adding named param to test to be clear

* User favorites endpoint (#638)

* Create FavoriteRequest factory

* Create favorites_endpoint

* Enable addition of favorites

* Enabled deletion of favorites

* Fix XML response calls

* Genericize descriptor

* Fix typo

* Remove outdated content

* Use more descriptive variable names

* Adjust API version

* Create Favorite "enum"

* Factor response parsing logic to model

The favorites item is now a dictionary.
The user_item has been altered to reflect this.

* Test favorites.get

* Test adding a favorite workbook

* Test adding favorite view

* Test adding favorite data source

* Test adding favorite project

* Test favorite deletion

* Expand favorites test_get

* Unpack list of views in class method response

* Add Favorites back to import

* Replace deprecated assertEquals with assertEqual

* Rename Favorite FavoriteItem and encapsulate

Co-authored-by: Woods <[email protected]>

* Fixing style error

* Fixes maxage to allow 0 as input (#639)

* Adds a sample for publishing datasources (#644)

* Adds a sample for publishing datasources

* Addresses feedback to use PAT and async flag

* Prep for v0.12 (#645)

* delete docs folder from master (#520)

* delete folder

* add back readme for docs

* Fix logger statement in User.add (#608)

The logger statement is using the parameter to output the id of the user, but that isnt set until line 67 and saved to a new variable. We want the logger statement to use that new user

* Prepares v0.12 release

* Fixes typo in changelog

Co-authored-by: Jac <[email protected]>
Co-authored-by: Reba Magier <[email protected]>

Co-authored-by: Jac <[email protected]>
Co-authored-by: Reba Magier <[email protected]>
Co-authored-by: Stephen Mitchell <[email protected]>
Co-authored-by: Mary Brennan <[email protected]>
Co-authored-by: Tyler Doyle <[email protected]>
Co-authored-by: jorwoods <[email protected]>
Co-authored-by: Woods <[email protected]>
shinchris pushed a commit that referenced this pull request Jul 10, 2020
* delete docs folder from master (#520)

* delete folder

* add back readme for docs

* Fix logger statement in User.add (#608)

The logger statement is using the parameter to output the id of the user, but that isnt set until line 67 and saved to a new variable. We want the logger statement to use that new user

* Development to master for v0.12 (#646)

* Sync development with master branch (#613)

* delete docs folder from master (#520)

* delete folder

* add back readme for docs

* Fix logger statement in User.add (#608)

The logger statement is using the parameter to output the id of the user, but that isnt set until line 67 and saved to a new variable. We want the logger statement to use that new user

Co-authored-by: Jac <[email protected]>
Co-authored-by: Reba Magier <[email protected]>

* Adds hidden_views parameter to publish() (#614)

* delete docs folder from master (#520)

* delete folder

* add back readme for docs

* Fix logger statement in User.add (#608)

The logger statement is using the parameter to output the id of the user, but that isnt set until line 67 and saved to a new variable. We want the logger statement to use that new user

* Adds hidden views parameter to workbook publish

* Pycodestyle

Co-authored-by: Chris Shin <[email protected]>
Co-authored-by: Jac <[email protected]>
Co-authored-by: Reba Magier <[email protected]>

* Code cleanup (#618)

* delete docs folder from master (#520)

* delete folder

* add back readme for docs

* Fix logger statement in User.add (#608)

The logger statement is using the parameter to output the id of the user, but that isnt set until line 67 and saved to a new variable. We want the logger statement to use that new user

* Cleans up imports and fixes some errors along the way

* pycodestyle fix for single char var name

Co-authored-by: Chris Shin <[email protected]>
Co-authored-by: Jac <[email protected]>
Co-authored-by: Reba Magier <[email protected]>

* update comment to say Python 3.5 is required to run samples (#619)

* update comment to say Python 3.5 is required to run samples

* pycodestyle fix for single char var name

* Simple Paging Endpoint for GraphQL/Metadata API (#623)

Because GraphQL can be arbitrarily complex and nested, we can't get as smart with an automatic Pager object without parsing the query, and that's a can of worms.

So for now, I added a new endpoint that will take a single query with one set of pagination parameters and run through it until it ends. It's not very smart, but it works.

* Support Metadata Services Backfill & Eventing APIs (#626)

Simple JSON endpoints that return the status of Metadata Services related events.

* Adds in maxage param to csv and pdf export options (#635)

* Adds in maxage param to csv and pdf export options

* Fixes style issue

* Adding named param to test to be clear

* User favorites endpoint (#638)

* Create FavoriteRequest factory

* Create favorites_endpoint

* Enable addition of favorites

* Enabled deletion of favorites

* Fix XML response calls

* Genericize descriptor

* Fix typo

* Remove outdated content

* Use more descriptive variable names

* Adjust API version

* Create Favorite "enum"

* Factor response parsing logic to model

The favorites item is now a dictionary.
The user_item has been altered to reflect this.

* Test favorites.get

* Test adding a favorite workbook

* Test adding favorite view

* Test adding favorite data source

* Test adding favorite project

* Test favorite deletion

* Expand favorites test_get

* Unpack list of views in class method response

* Add Favorites back to import

* Replace deprecated assertEquals with assertEqual

* Rename Favorite FavoriteItem and encapsulate

Co-authored-by: Woods <[email protected]>

* Fixing style error

* Fixes maxage to allow 0 as input (#639)

* Adds a sample for publishing datasources (#644)

* Adds a sample for publishing datasources

* Addresses feedback to use PAT and async flag

* Prep for v0.12 (#645)

* delete docs folder from master (#520)

* delete folder

* add back readme for docs

* Fix logger statement in User.add (#608)

The logger statement is using the parameter to output the id of the user, but that isnt set until line 67 and saved to a new variable. We want the logger statement to use that new user

* Prepares v0.12 release

* Fixes typo in changelog

Co-authored-by: Jac <[email protected]>
Co-authored-by: Reba Magier <[email protected]>

Co-authored-by: Jac <[email protected]>
Co-authored-by: Reba Magier <[email protected]>
Co-authored-by: Stephen Mitchell <[email protected]>
Co-authored-by: Mary Brennan <[email protected]>
Co-authored-by: Tyler Doyle <[email protected]>
Co-authored-by: jorwoods <[email protected]>
Co-authored-by: Woods <[email protected]>

Co-authored-by: Jac <[email protected]>
Co-authored-by: Reba Magier <[email protected]>
Co-authored-by: Stephen Mitchell <[email protected]>
Co-authored-by: Mary Brennan <[email protected]>
Co-authored-by: Tyler Doyle <[email protected]>
Co-authored-by: jorwoods <[email protected]>
Co-authored-by: Woods <[email protected]>
@jorwoods jorwoods deleted the jorwoods/user_favorites branch March 25, 2022 12:33
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.

3 participants