GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs: set up Sphinx + ReadTheDocs pipeline for auto-generated API reference by jacalata · Pull Request #1832 · tableau/server-client-python

Conversation

@jacalata

@jacalata jacalata commented Jul 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Motivation

api-ref.md on gh-pages is the canonical reference doc today. It's
hand-edited: when a new method or model field lands, someone has to
remember to update it. Coverage drifts and diverges from the code.

Sphinx generates the same content from docstrings, so the update path
becomes "write the docstring, docs regenerate." Concepts and tutorials
stay in Jekyll -- Sphinx just replaces the reference section.

Not merging this into the live Jekyll site yet: docstring coverage
across the models package is thin, and the auto-generated output today
would be a regression from the handwritten api-ref.md. Landing the
pipeline now unblocks incremental docstring work without a public-facing
rush. #1855 is the first tranche of docstring backfill.

Behavior change

None to the runtime library. Adds a docs build pipeline:

  • .readthedocs.yaml -- RTD build config, Python 3.13
  • docs/conf.py -- Sphinx config; reads project details from pyproject.toml; furo theme
  • docs/index.rst -- automodule with :members: :imported-members:
    so re-exports from __init__.py render (without :imported-members:
    the output was nearly empty)
  • .github/workflows/docs.yml -- triggers on push: branches: [master],
    builds Sphinx, opens a PR into gh-pages at sphinx/. Uses
    concurrency: docs-publish to serialize runs
  • pyproject.toml -- adds docs = ["sphinx>=7,<9", "furo>=2024,<2027", "tomli; python_version < '3.11'"] optional-deps group

Also incidentally: small docstring cleanups in connection_item.py and
site_item.py (side effect of the initial Sphinx pass).

Why both RTD and gh-pages/sphinx: the workflow-driven PR into gh-pages
puts the built HTML next to the existing Jekyll site so we can add nav
links whenever coverage is good enough. RTD is the fallback/canonical
hosting if we prefer to keep gh-pages Jekyll-only. Long-term one goes
away; keeping both live in the setup lets us pick without rebuilding.

Test plan

  • Sphinx builds cleanly locally
    (sphinx-build -b html docs sphinx_build) -- 3000-line index with all
    re-exports rendering. One benign warning about a duplicate
    UserItem.idp_configuration_id object description (pre-existing
    property+setter shape).
  • RTD build succeeds via .readthedocs.yaml -- not exercised until
    the PR merges and RTD picks up the config
  • .github/workflows/docs.yml runtime not exercised until this is
    on master

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jacalata and others added 6 commits July 27, 2026 18:00
@jacalata
Create .readthedocs.yaml for documentation setup
db6b9a4
Add Read the Docs configuration file for documentation build
@jacalata
Create Sphinx configuration file for documentation
b021986
Added configuration settings for Sphinx documentation. Direct copy from example conf file.
@jacalata
Load project details from pyproject.toml
a195f86
Updated project information to load from pyproject.toml.
@jacalata @claude
docs: set up Sphinx with working ReadTheDocs config
ed8b75f
- 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 <[email protected]>
@jacalata
change theme
8cebc5e
@jacalata @claude
ci: add workflow to build Sphinx docs and PR to gh-pages
3cf02f6
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 <[email protected]>
@github-actions

github-actions Bot commented Jul 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
tableauserverclient
   __init__.py50100% 
   config.py150100% 
   datetime_helpers.py2511 96%
   exponential_backoff.py200100% 
   filesys_helpers.py310100% 
   namespace.py2533 88%
tableauserverclient/bin
   __init__.py20100% 
   _version.py358212212 41%
tableauserverclient/helpers
   __init__.py10100% 
   logging.py20100% 
   strings.py3111 97%
tableauserverclient/models
   __init__.py460100% 
   collection_item.py4177 83%
   column_item.py553232 42%
   connection_credentials.py351111 69%
   connection_item.py941414 85%
   custom_view_item.py1442121 85%
   data_acceleration_report_item.py5411 98%
   data_alert_item.py15844 97%
   data_freshness_policy_item.py1551515 90%
   database_item.py2073636 83%
   datasource_item.py3001212 96%
   dqw_item.py10455 95%
   exceptions.py40100% 
   extensions_item.py13244 97%
   extract_item.py4444 91%
   favorites_item.py6988 88%
   fileupload_item.py190100% 
   flow_item.py1491010 93%
   flow_run_item.py710100% 
   group_item.py8966 93%
   groupset_item.py4977 86%
   interval_item.py1823232 82%
   job_item.py1921010 95%
   linked_tasks_item.py7911 99%
   location_item.py2922 93%
   metric_item.py1291313 90%
   oidc_item.py6333 95%
   pagination_item.py3411 97%
   permissions_item.py1111212 89%
   project_item.py2073131 85%
   property_decorators.py1001818 82%
   reference_item.py2622 92%
   revision_item.py5911 98%
   schedule_item.py20966 97%
   server_info_item.py3777 81%
   site_item.py6361313 98%
   subscription_item.py10122 98%
   table_item.py1191818 85%
   tableau_auth.py612525 59%
   tableau_types.py2711 96%
   tag_item.py150100% 
   target.py60100% 
   task_item.py5622 96%
   user_item.py3231616 95%
   view_item.py2201616 93%
   virtual_connection_item.py6488 88%
   webhook_item.py6911 99%
   workbook_item.py3621616 96%
tableauserverclient/server
   __init__.py90100% 
   exceptions.py40100% 
   filter.py2911 97%
   pager.py3311 97%
   query.py1431515 90%
   request_factory.py1335195195 85%
   request_options.py38655 99%
   server.py1882323 88%
   sort.py60100% 
tableauserverclient/server/endpoint
   __init__.py350100% 
   auth_endpoint.py731010 86%
   custom_views_endpoint.py1521212 92%
   data_acceleration_report_endpoint.py210100% 
   data_alert_endpoint.py942323 76%
   databases_endpoint.py1113030 73%
   datasources_endpoint.py3233333 90%
   default_permissions_endpoint.py4433 93%
   dqw_endpoint.py451616 64%
   endpoint.py2592424 91%
   exceptions.py7966 92%
   extensions_endpoint.py310100% 
   favorites_endpoint.py942222 77%
   fileuploads_endpoint.py510100% 
   flow_runs_endpoint.py6299 85%
   flow_task_endpoint.py2122 90%
   flows_endpoint.py1985353 73%
   groups_endpoint.py12699 93%
   groupsets_endpoint.py7277 90%
   jobs_endpoint.py6799 87%
   linked_tasks_endpoint.py370100% 
   metadata_endpoint.py881414 84%
   metrics_endpoint.py5566 89%
   oidc_endpoint.py4211 98%
   permissions_endpoint.py4433 93%
   projects_endpoint.py1782424 87%
   resource_tagger.py1273535 72%
   schedules_endpoint.py1191111 91%
   server_info_endpoint.py361010 72%
   sites_endpoint.py1302727 79%
   subscriptions_endpoint.py561414 75%
   tables_endpoint.py1103636 67%
   tasks_endpoint.py6366 90%
   users_endpoint.py18388 96%
   views_endpoint.py15099 94%
   virtual_connections_endpoint.py1131010 91%
   webhooks_endpoint.py5499 83%
   workbooks_endpoint.py3382222 93%
TOTAL12064142488% 

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jacalata jacalata mentioned this pull request Jul 28, 2026
feat: consolidate and export public type aliases (HyperAction, FilePath, AddResponse, IDP types) #1825
Open
2 tasks done
jacalata and others added 2 commits July 28, 2026 00:21
@jacalata
Merge origin/development into jac/docs-sphinx-readthedocs
f0f4f2f
@jacalata @claude
docs: address adversarial review findings on Sphinx/RTD pipeline
939ad9d
Four cleanups on the docs branch surfaced by an adversarial review:

- Revert id_ -> id docstring renames in JobItem and TaskItem. The
  constructors take `id_` (trailing underscore because `id` shadows the
  builtin); the docstring should describe the actual parameter name.
  The original rename was cosmetic and made the docstring actively
  misleading — users copying the docstring's kwarg would get a
  TypeError.

- Add :imported-members: to docs/index.rst. Without it, the top-level
  automodule directive only documents symbols defined in
  tableauserverclient/__init__.py itself (which is 99% re-exports), so
  the generated API reference was nearly empty. With this, all
  re-exported classes render.

- Pin [docs] extras. Was `sphinx`, `tomli`, `furo` — unpinned. Now
  `sphinx>=7,<9`, `furo>=2024,<2027`, `tomli; python_version < '3.11'`.
  A future Sphinx major bump can silently break the RTD reproducible
  build otherwise. `tomli` narrowed to just the Python 3.10 build path;
  3.11+ has stdlib tomllib.

- Workflow changes:
  - Add `concurrency: docs-publish` so overlapping runs don't rewrite
    docs-update mid-flight.
  - Set `delete-branch: true` on peter-evans/create-pull-request so
    stale docs-update branches don't accumulate and force-updates
    don't strand review comments.
  - Set `fetch-depth: 0` on the gh-pages checkout so
    create-pull-request can detect no-op diffs correctly.

- Remove the templates_path = ["_templates"] config in docs/conf.py.
  The referenced directory doesn't ship, so Sphinx emits a warning on
  every build.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced Jul 30, 2026
[Discussion] Docs rewrite #1451
Open
Update docs for users.populate_favorites #958
Closed
@jacalata
jacalata enabled auto-merge (squash) August 6, 2026 21:22
@jacalata
jacalata requested a lite review from Copilot August 6, 2026 21:22
Copilot started reviewing on behalf of jacalata August 6, 2026 21:23
View session
Copilot AI reviewed Aug 6, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Pull request overview

Adds a Sphinx/Read the Docs documentation pipeline to generate an API reference from docstrings, intended to live alongside (and eventually replace) the manually maintained api-ref.md on gh-pages.

Changes:

  • Introduces Sphinx configuration and a minimal index.rst that documents the top-level tableauserverclient module.
  • Adds Read the Docs configuration and a GitHub Actions workflow that builds docs and opens an automated PR into gh-pages/sphinx/.
  • Adds a docs optional-dependency group and includes minor docstring adjustments to improve generated output.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.readthedocs.yaml Adds RTD build/install configuration for Sphinx docs.
docs/conf.py Adds Sphinx configuration (theme/extensions) and reads project metadata from pyproject.toml.
docs/index.rst Adds Sphinx root page that auto-documents tableauserverclient (including re-exports).
.github/workflows/docs.yml Adds CI job to build Sphinx HTML and open a PR to gh-pages with generated output.
pyproject.toml Adds docs extras (Sphinx, furo, tomli fallback).
tableauserverclient/models/connection_item.py Refines docstring for XML parsing helper.
tableauserverclient/models/site_item.py Clarifies tier capacity docstrings for Creator/Explorer/Viewer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread .readthedocs.yaml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/index.rst Outdated
Comment on lines +4 to +7
.. toctree::
:maxdepth: 2
:caption: Contents:

Comment thread .github/workflows/docs.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Aug 7, 2026
docs: numpy-style docstrings on Favorites endpoint (15 methods) #1855
Merged
docs: fix api-ref method-heading naming typos and duplicate section #1857
Merged
docs+feat: VirtualConnections docstrings, tag parsing, id workaround #1858
Open
docs: add one-line docstrings to root-level helper modules #1859
Merged
@jacalata @claude
docs: generate full API reference with sphinx-autoapi
0472d85
The previous conf.py used a single `.. automodule:: tableauserverclient`
which only covers names re-exported from `tableauserverclient/__init__.py`.
That silently drops every endpoint class and every root helper module --
Favorites, VirtualConnections, config, datetime_helpers, filesys_helpers,
namespace, exponential_backoff -- and readers running into missing methods
had no way to find the underlying signatures.

Wire in sphinx-autoapi with autoapi_dirs pointing at the source tree.
The generator walks every module (including private endpoints) and
produces a reference page per module under docs/reference/.
`autoapi_root` and the corresponding .gitignore entry are kept in sync.

Other tweaks:
- Replace the empty toctree in docs/index.rst with a hidden one so
  autoapi's `autoapi_add_toctree_entry` has a node to append to
  (without an existing toctree it is a no-op and Furo's sidebar comes
  out empty).
- Add `python -m pip install --upgrade pip` to the docs workflow to
  avoid the resolver-warnings that older pips emit on modern extras.

Docstring warnings surfaced by autoapi are not addressed here; a
follow-up PR will fix the RST-vs-Google mismatches introduced by the
recent Favorites, VirtualConnections, and root-helper docstring passes.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
jacalata added a commit that referenced this pull request Sep 10, 2026
@jacalata
docs: numpy-style docstrings on Favorites endpoint (15 methods) (#1855)
d63ff9d
* docs: numpy-style docstrings on Favorites endpoint (15 methods)

Adds a class-level docstring plus 15 method docstrings on
Favorites (get, add_favorite, 6x add_favorite_<type>, delete_favorite,
6x delete_favorite_<type>). Content ported from docs/api-ref.md's
Favorites section on gh-pages so that the Sphinx pipeline in #1832 will
produce equivalent output once wired up.

Part of the api-ref -> Sphinx migration; see the migration audit
report for the full list of methods still needing docstrings. Favorites
was the largest single chunk in the "needs_docstring" bucket
(15/41 methods).

No behavior change. Docs only.

* docs: address fresh-eyes review on Favorites docstrings

- Class docstring: add missing "collections" FavoriteType (7, not 6).
- add_favorite: drop misleading #add_workbook_to_favorites anchor on
  polymorphic method; link to Favorites Methods page root.
- add_favorite_metric: add REST API link (#add_metric_to_favorites).
- delete_favorite: add REST API link; polymorphic, so page root.
- delete_favorite_metric: add REST API link; no per-type anchor exists,
  so page root.
- delete_favorite_flow: fix anchor drift (#delete_flow_from_favorites
  -> #ref_delete_flow_from_favorites).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@jacalata
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.