Skip to content

Conversation

dcherian
Copy link
Contributor

@dcherian dcherian commented Jul 16, 2025

Restructure API documentation into organized sections with one file per section in api/ subfolder.
Note the giant improvement in the left and right sidebars

before
image

After

image

🤖 Generated with Claude Code

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Ian Hunt-Isaak <[email protected]>
Co-Authored-By: Claude <[email protected]>
dcherian and others added 2 commits July 17, 2025 07:40
Updated all :toctree: directives in API documentation files to point to
../generated/ instead of generated/, ensuring proper inclusion of
autogenerated documentation files in the toctree structure.

This fixes 940 "document isn't included in any toctree" warnings.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@dcherian dcherian requested a review from scottyhq July 17, 2025 15:48
Comment on lines +20 to +22
CFTimeIndex
indexes.RangeIndex
indexes.NDPointIndex
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does the Indexes dropdown (left-hand sidebar only list these 3) but not PandasIndex?... I feel like I'm going crazy and missing something obvious, but why do some left-hand sidebar sub-pages have dropdowns (DataArray, Indexes) and others don't (Dataset, Coordinates)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no idea, :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does seem like properties are listed in the dropdown, and our accessors are considered properties.

Copy link
Contributor

@scottyhq scottyhq left a comment

Choose a reason for hiding this comment

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

Restructure API documentation into organized sections with one file per section in api/ subfolder. Note the giant improvement in the left and right sidebars

Agreed this is really nice! A few questions and comments above that could improve it a bit more. Also, while I think the subpages really help organizationally and matches numpy and pandas API docs, there is perhaps also value in a single-page alphabetized list somewhere too (e.g. https://corteva.github.io/rioxarray/stable/modules.html)

🤖 Generated with Claude Code

🤯 This would make for an interesting blog post.

@dcherian
Copy link
Contributor Author

A few questions and comments above that could improve it a bit more.

Thanks I addressed most of these. To be clear Claude only cut up one long file in to multiple files :) It didn't make decisions about what went where.

here is perhaps also value in a single-page alphabetized list somewhere too

Yeah perhaps. Ours would be very long.

@dcherian dcherian enabled auto-merge (squash) July 17, 2025 19:53
@dcherian dcherian merged commit 4fde699 into pydata:main Jul 17, 2025
36 checks passed
dcherian added a commit to jsignell/xarray that referenced this pull request Jul 18, 2025
* main: (94 commits)
  Restructure API documentation into organized sections (pydata#10540)
  Fix convert calendar with different dimension name (pydata#10544)
  Fix kerchunk error in docs build (pydata#10545)
  Call super().__init__() in st.SearchStrategy subclasses (pydata#10543)
  CI: update actions location (pydata#10529)
  meta: Fix labeler topic-documentation (pydata#10524)
  drop_vars: use emit_user_level_warning (pydata#10528)
  Pydap flaky tests (pydata#10525)
  Remove test skip (pydata#10523)
  Improve warning message and tests for timedelta decoding (pydata#10508)
  Add dev whats-new (pydata#10522)
  Add release notes for v2025.07.1 (pydata#10520)
  Updates for Zarr 3 Dtypes (pydata#10456)
  Update Custom Indexes section in api.rst (pydata#10517)
  Expression not assigned (pydata#10507)
  Raise if `Index.create_variables` returns more variables than passed in through `set_xindex` (pydata#10503)
  Allow setting (or skipping) new indexes in open_dataset (pydata#8051)
  doc: add Pandas(Multi)Index to api reference (pydata#10515)
  Update pre-commit hooks (pydata#10510)
  Update pre-commit ruff legacy alias (pydata#10511)
  ...
@keewis
Copy link
Collaborator

keewis commented Jul 19, 2025

there is perhaps also value in a single-page alphabetized list somewhere too

should we try to customize genindex, then, if that doesn't fit our needs already?

@dcherian dcherian deleted the toctree-work branch July 19, 2025 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants