feat: consolidate and export public type aliases (HyperAction, FilePath, AddResponse, IDP types)#1825
feat: consolidate and export public type aliases (HyperAction, FilePath, AddResponse, IDP types)#1825jacalata wants to merge 8 commits into
Conversation
Add Read the Docs configuration file for documentation build
Added configuration settings for Sphinx documentation. Direct copy from example conf file.
Updated project information to load from pyproject.toml.
- Add docs optional-dependencies group (sphinx, tomli) to pyproject.toml - Wire up .readthedocs.yaml to install .[docs] extra - Fix conf.py: correct pyproject.toml path, use importlib.metadata for version, switch to alabaster theme, use tomllib/tomli compat import - Add minimal docs/index.rst - Fix RST docstring errors in connection_item, site_item, job_item, task_item that caused Sphinx build warnings/errors Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
On push to master, builds Sphinx HTML and opens a PR from docs-update into gh-pages so the generated API reference can be reviewed before going live. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ient.types HyperAction*, FilePath, FileObject*, PathOrFile*, AddResponse, IDPAttributes, IDPProperty, and HasIdpConfigurationID were defined locally in endpoint files (in some cases duplicated across 4 files) but not importable from the top-level package. Users annotating calls to update_hyper_data(), publish(), download(), add_to_schedule(), or OIDC methods had to import from internal modules. Move all shared type aliases to tableauserverclient/types.py and re-export from tableauserverclient/__init__.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude Code posted this on my behalf after review: OverviewThe PR title/description says this consolidates five families of previously-duplicated type aliases (
This looks like squashed/rebased history from other branches (commit messages like "Create Sphinx configuration file for documentation," "add more e2e tests," "change theme" appear in What's good about the core type-consolidation change
Issues found
SecurityNothing security-sensitive in the type-consolidation change itself. The new RecommendationThe type-consolidation refactor itself is sound (verified by tests/mypy/black) and worth merging, but I'd ask the author to confirm the diff scope before approval — specifically, whether this branch should be rebased to drop the docs/e2e/docstring commits so this PR reviews cleanly as "consolidate and export public type aliases," matching its title and description. |
|
@jacalata see the things claude code pointed out above -- in particular are we sure the "docs" changes should be in here? (Docs are still in gh-pages branch.) |
Summary
HyperAction,HyperActionTable,HyperActionRow,HyperActionCondition— needed to annotate theactionsargument todatasources.update_hyper_data()FilePath,FileObject,FileObjectR,FileObjectW,PathOrFile,PathOrFileR,PathOrFileW— needed to annotatepublish()/download()arguments across datasources, workbooks, flows, and custom views; were duplicated across 4 endpoint filesAddResponse— return type ofschedules.add_to_schedule(), also used by the same method on datasources, workbooks, and flowsIDPAttributes,IDPProperty,HasIdpConfigurationID— needed to annotate arguments tooidc.get_by_id()andoidc.delete_configuration()All types are now defined in
tableauserverclient/types.pyand exported fromtableauserverclient/__init__.py. The endpoint files import fromtypes.pyinstead of defining them locally.Test plan
pytest test/)from tableauserverclient import HyperAction, FilePath, AddResponse, HasIdpConfigurationID🤖 Generated with Claude Code