Skip to content
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

Docs update: Fix API Reference page #198

Merged
merged 5 commits into from
Mar 5, 2024
Merged

Conversation

fohrloop
Copy link
Owner

@fohrloop fohrloop commented Mar 5, 2024

Fix the sidebar TOC

The sidebar TOC had a bug. This comes from sphinx-book-theme, which uses the pydata-sphinx-theme. I filed a bug report in

pydata/pydata-sphinx-theme#1724

but that was closed as the root cause is likely in the Bootstrap scroll spy (upstream issue). The bug causes the right side sidebar TOC to not show fully on the API reference page, "active" <ul> or <li> elements are shown, and this activation does not work at all on the API Reference page.

This could have probably been circumvented in a more elegant way but I decided to take a shortcut and

  1. Disable the Bootstrap scroll spy on the API reference page
  2. Activate all nav > ul > li items (second level children) so two levels of the TOC is always shown on the API reference page.

The logic is in the wakepy.js. This can be removed if the issue is fixed in pydata-sphinx-theme or in sphinx-book-theme.

Remove NamedTuple noise

The NamedTuples caused noise in the API Reference page. Namely, there was extra "Alias for field number X" (X is a number of the field) items in the docs, for everything that is subclass of NamedTuple.

This fix uses temporarily numpydoc 1.7.0rc0.dev0 directly from

https://github.com/numpy/numpydoc.git@46f532a824639a97479039fc122533915cdfa10f

When numpydoc 1.7.0 is released, can update pyproject.toml to use that.

@fohrloop fohrloop merged commit cc02d95 into dev Mar 5, 2024
6 checks passed
@fohrloop fohrloop deleted the docs-update-for-0.8.0-part2 branch March 5, 2024 22:28
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.

1 participant