8000 Unify arguments of sample scripts by vogelsgesang · Pull Request #889 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

Unify arguments of sample scripts #889

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 1 commit into from
Sep 23, 2021

Conversation

vogelsgesang
Copy link
Collaborator

I am pretty new to TSC, and wanted to run some sample scripts to get an
understanding of the library. Doing so, I realized that every sample
had a slightly different command line, even for common arguments:

  • Some expected site, some site-id, some were lacking site-support
    completely (and thereby unusable for Tableau Online)
  • Some had a short option -i, some had the short option -S for the
    site name
  • Some expected password-based authentication, some expected personal
    access tokens

This commit fixes all those inconsistencies, so that users don't have
to re-learn the command line options for each individual script.

vogelsgesang added a commit to vogelsgesang/server-client-python that referenced this pull request Sep 18, 2021
@bcantoni
Copy link
Contributor

@vogelsgesang I'll go thru and review these. Have you done some manual testing with the new versions of all these scripts? Wondering if you need just a quick review or someone to test them as well.

@bcantoni bcantoni self-requested a review September 23, 2021 01:05
@vogelsgesang
Copy link
Collaborator Author

I did test most of them against AlpoDev on Tableau Online. Some of them failed (e.g., create_group.py) because I am no administrator on AlpoDev and don't have the necessary permissions.
At least accepting the parameters and authenticating with the server worked for all the scripts

@vogelsgesang vogelsgesang changed the base branch from master to development September 23, 2021 09:21
I am pretty new to TSC, and wanted to run some sample scripts to get an
understanding of the library. Doing so, I realized that every sample
had a slightly different command line, even for common arguments:
* Some expected `site`, some `site-id`, some were lacking site-support
  completely (and thereby unusable for Tableau Online)
* Some had a short option `-i`, some had the short option `-S` for the
  site name
* Some expected password-based authentication, some expected personal
  access tokens

This commit fixes all those inconsistencies, so that users don't have
to re-learn the command line options for each individual script.
@vogelsgesang
Copy link
Collaborator Author
vogelsgesang commented Sep 23, 2021

rebased on development branch and resolved merge conflicts with #888

Copy link
Contributor
@jacalata jacalata left a comment

Choose a reason for hiding this comment

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

very nice, thank you!

@jacalata jacalata merged commit 6547f6b into tableau:development Sep 23, 2021
vogelsgesang added a commit to vogelsgesang/server-client-python that referenced this pull request Oct 22, 2021
…rsonalAccessTokenAuth`

As part of tableau#889, I changed the default value for the `site` argument to be `None`
instead of an empty string. This accidentally broke auth, as `TableauAuth`
expected an empty string instead of `None` to signify an absent `site` argument.

This commit fixes the issue by now actually accepting `None` as `site_id` in
`TableauAuth` and `PersonalAccessTokenAuth`, thereby making our interface more
intuitive, at least in my opinion.
vogelsgesang added a commit to vogelsgesang/server-client-python that referenced this pull request Oct 22, 2021
…rsonalAccessTokenAuth`

As part of tableau#889, I changed the default value for the `site` argument to be `None`
instead of an empty string. This accidentally broke auth, as `TableauAuth`
expected an empty string instead of `None` to signify an absent `site` argument.

This commit fixes the issue by now actually accepting `None` as `site_id` in
`TableauAuth` and `PersonalAccessTokenAuth`, thereby making our interface more
intuitive, at least in my opinion.

Fixes tableau#924
jacalata pushed a commit that referenced this pull request Jan 28, 2022
…rsonalAccessTokenAuth` (#925)

* Accept `None` as parameter for the `site_id` of `TableauAuth` and `PersonalAccessTokenAuth`

As part of #889, I changed the default value for the `site` argument to be `None`
instead of an empty string. This accidentally broke auth, as `TableauAuth`
expected an empty string instead of `None` to signify an absent `site` argument.

This commit fixes the issue by now actually accepting `None` as `site_id` in
`TableauAuth` and `PersonalAccessTokenAuth`, thereby making our interface more
intuitive, at least in my opinion.

Fixes #924
jacalata pushed a commit that referenced this pull request Mar 30, 2022
…rsonalAccessTokenAuth` (#925)

* Accept `None` as parameter for the `site_id` of `TableauAuth` and `PersonalAccessTokenAuth`

As part of #889, I changed the default value for the `site` argument to be `None`
instead of an empty string. This accidentally broke auth, as `TableauAuth`
expected an empty string instead of `None` to signify an absent `site` argument.

This commit fixes the issue by now actually accepting `None` as `site_id` in
`TableauAuth` and `PersonalAccessTokenAuth`, thereby making our interface more
intuitive, at least in my opinion.

Fixes #924
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
0