-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
DOC: Some features of docs built with sphinx 6 do not work #23647
Comments
I see the pydata-sphinx-theme tests are passing with 6.1.3, I wonder what is going wrong. Who would be a likely theme expert to get some eyes on this? @drammock? |
Regarding the "pulldown" I guess you mean the version switcher dropdown? AFAIK that never works on local builds for any project, because of CORS restrictions. Here's a screenshot showing that search works for me on a local build: (further down in the search results, the preview text for pages like "global state" or "indexing on ndarrays" does not display, I believe also due to CORS restrictions).
note that I had to do some manual stuff to get this env to even install, as both I've tried a few times to wrap my head around CORS and how to allow things like loading the version dropdown JSON on local builds (or even on PR builds, which often doesn't work either). I've always failed; if anyone reading this understands how CORS works and what would be necessary please speak up. |
@drammock you can see the devdocs are currently broken after updating to sphinx 6. When I look in the devtools javascript console, I see some javascript errors. The first is in the search function:
and then there is this too
|
Hey , I am new to open source . Please guide me how can I contribute in this repo |
Hi @anshuman. We have some resources on our community page, and ways to contribute on the contribution page. You might want to join our next newcomer's meeting MAy 4, which will be announced on this mail archive thread a few days before. |
Sphinx 6 no longer automatically includes JQuery (changelog, first item under "incompatible changes"). pydata-sphinx-theme version 0.9.0 assumes that it is present, so you'll need to add JQuery. Ways to do this:
I can make the PR to numpy tomorrow if you like, just LMK which option you prefer. If unsure, I'd probably pick the 3rd option myself (because I'm familiar with how the templates work) |
Is there a reason we are still with the older version of pydata-sphinx-theme? Maybe we should update to v0.13.3? |
Not that I'm aware of. Presumably the most recent version of the theme includes the necessary JQuery to make these features work? It's worth a shot at least - hopefully this is just fixed by updating. If not, then perhaps we should raise the issue there if it hasn't been already? |
Actually newer versions of the theme remove our use of jQuery (replaced with vanilla JavaScript). But it amounts to the same thing (Sphinx 6 compatibility)
Scipy has had issues with increased build time on later versions of the theme. These have been difficult to reproduce and hence difficult to fix. I'll do some local tests to see if numpy is likely to suffer the same problem. If not, updating the theme pin seems like the best option. Crossrefs: |
@drammock thanks for having a look 🙇 I would expect the same issues to arise as we try to keep both SciPy and NumPy's docs in sync. That will definitely be interesting if your tests show now slowdown here. |
@anshuman0123 I guess this @mattip's comment was meant for you:
|
building numpy docs with sphinx 6 and pydata-sphinx-theme 0.13.3 I get $ time make html
[...]
real 3m8.449s
user 3m11.327s
sys 0m33.501s The good news is that after this,
followed by a related/resultant error
These search page errors all originate from either To me this suggests that updating the theme pin to 0.13.3 will work just fine for NumPy (with the caveat that some colors have changed in the interim so you'll likely want to do a few CSS tweaks). The times compare favorably (after a $ time make html
[...]
real 3m20.908s
user 3m24.088s
sys 0m33.130s |
Cool - thanks for checking. Since you already have working code, would you be able to create a PR? |
yep, working on it now. Since I'm not staring at numpy docs every day I'll need to rely on reviewers to make sure I catch all the needed CSS changes. Is there a short list of pages (or a "kitchen sink" page) that I should pay special attention to when comparing against current stable docs? |
IMO I wouldn't worry about style tweaks too much... I would generally prefer to go with theme defaults as much as possible to avoid maintenance burden! |
Oh great new for NumPy if there is no build time difference! |
Closing, PR #23677 was merged. |
Issue with current documentation:
The pulldown and search box do not work in documentation built with sphinx 6.
Idea or request for content:
These work fine with sphinx 5, so there seems to be a breaking change in sphinx 6 that causes the problem. The sphinx version is currently fixed at 5 (gh-23640), but it would be nice to be able to use sphinx 6 for the build.
The text was updated successfully, but these errors were encountered: