| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ecial-char behavior Bundles three long-standing docs gaps flagged in stale issues: #993 - users.add example used a fake short username with no explanation that `name` is the server auth identifier (email on Cloud, SAM@Domain on AD-backed Server), not the person's display name. Rewrote the users.add docstring intro to describe the required formats per auth scheme, split the example into a Cloud invocation and an AD invocation, and added matching guidance to UserItem.name. #1067 - projects.update_permissions had no examples, so callers had no guide for the common "assign group as Project Leader" case. Added an example that shows constructing a PermissionsRule with grantee=<group> and capability=ProjectLeader, plus a note that update_permissions is a full replacement (call populate_permissions first if preserving existing rules). #1200 - the REST filter grammar treats ',', '&', ':', '[' and ']' as delimiters and the server does not support escaping, so `filter(name="T(L-F,SZ&V-MY)")` fails with 400065 for any name containing those characters. Documented the constraint on the Filter class docstring and on QuerySet.filter, along with the working wildcard workaround (Equals with '*' substituted). No behavior change. Docs only. Closes #993, #1067, #1200.
Sorry, something went wrong.
The Equals-operator wildcard workaround for special characters requires Tableau Cloud May 2023 or Tableau Server 2022.1.14 (per the REST API "Filtering and Sorting" docs). Older servers reject `*` as a literal, so readers on those need to know before copying the example. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
This PR updates in-code documentation (docstrings) to clarify several commonly-misunderstood behaviors in the Tableau Server Client (TSC) Python library—specifically around user creation identifiers, project permission rules for Project Leaders, and REST filter limitations with reserved delimiter characters.
Changes:
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file| File | Description |
|---|---|
| tableauserverclient/server/query.py | Adds QuerySet.filter docstring explaining shorthand operators and special-character caveat. |
| tableauserverclient/server/filter.py | Adds detailed Filter docstring documenting delimiter characters and wildcard workaround/version constraints. |
| tableauserverclient/server/endpoint/users_endpoint.py | Clarifies users.add docstring about required username formats and adds clearer examples. |
| tableauserverclient/server/endpoint/projects_endpoint.py | Adds an example for assigning a group as Project Leader and notes replacement semantics. |
| tableauserverclient/models/user_item.py | Clarifies UserItem.name parameter semantics and required formats per auth scheme. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
Previous wording said wildcards, ranges, and operators are "NOT supported" -- but I don't have live verification that `*` or `%` are inert in a vf_ value. The public filtering docs describe only exact match and OR-lists; behavior of other characters is undocumented, not verifiably absent. Rephrase to say what we know (docs don't cover it, TSC doesn't emit operator prefixes) and tell callers to verify against their target server before relying on the outcome. This is intentionally less prescriptive than the previous version. The related open PR #1854 was flagged by the same fresh-eyes pass for making an unverified `*`-as-wildcard claim in the opposite direction -- both PRs should stay in "docs describe X; other behaviors are untested" territory until we run the experiments. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three fresh-eyes findings: - Replace Unicode em dashes (U+2014) in filter.py and users_endpoint.py docstrings with ASCII `--` or `;`, matching the repo's ASCII-only convention that other docstrings follow. - query.py referenced docs/filter-sort.md, which lives on the gh-pages branch and does not exist in an installed package. Swap for the published URL so a `help()` reader can actually reach the doc. - Soften the AD username claim in users_endpoint.py: a bare SAMAccountName's resolution depends on the AD configuration, so "typically will not resolve" was stated more strongly than the surrounding server-behavior guidance warranted.
| Back | FazBrowse Home | New Git URL |
Closes #993, #1067, #1200.
Motivation
Three long-standing stale issues, all traceable to gaps in the same doc
region:
authentication identifier, not the person's display name. The primary
example TSC.UserItem('new_user', ...) misleads readers into treating it
as a display-name field.
guide for the common "assign a group as Project Leader" case.
delimiters and the server does not support escaping, but nothing in the
docstring warned about this or documented the wildcard workaround.
Behavior change
Docs only. No API change.
auth scheme: Cloud = email, local Server = username, AD-backed =
SAMAccountName@FullyQualifiedDomain or UPN. Example split into Cloud +
AD invocations.
with grantee=<group> and capability=ProjectLeader, plus a note that
update_permissions fully replaces existing rules (call
populate_permissions first if preserving).
delimiter characters and the *-wildcard workaround under the Equals
operator, citing the server version requirement (Tableau Cloud May 2023
or Tableau Server 2022.1.14) sourced from the public "Filtering and
Sorting" REST API docs.
Test plan
test_project_model.py, test_filter.py: 89 passed
🤖 Generated with Claude Code