-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
DOC: Bump pydata-sphinx-theme version #26125
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
Conversation
Fixes inaccessible contrast for a:visited links in admonitions. Fixes numpy#26058.
I think these warnings are failing the build
Perhaps the Line 77 in 5edf018
|
Caused by: WARNING: the pydata_sphinx_theme extension is not safe for parallel writing
Thanks, updated! |
here is an example API page. Generally it seems quite nice. I find the orange of the "See also" header a bit jarring. Do we need to remove some of our CSS styling? |
Yes, that contrast needs fixing: ![]() ![]() If we disable the .admonition-legacy.admonition>.admonition-title::before,
div.admonition>.admonition-title::before {
color: var(--pst-color-warning);
content: var(--pst-icon-admonition-attention);
background-color: var(--pst-color-warning);
} We get: ![]() ![]() This CSS was added by @melissawm in #24939. Melissa: is right thing to do, is delete |
That sounds about right, can you give it a try? Thanks for the ping! |
@hugovk it looks like there's a bit of extra customization that is still causing some misalignment of items and truncation (see for example the top navbar and cards at the landing page: https://output.circle-artifacts.com/output/job/e09e4603-3ea6-4dc9-be1a-42c27782dbcd/artifacts/0/doc/build/html/index.html?pr=26125) I'm not sure if that's from existing NumPy customization or from new PyData theme settings. |
Hmm, not sure where to look for that. I did notice the some of the header elements have https://numpy.org/doc/stable/ has a search box in the left column, not in the header like the PR preview, and the version selector is wider ("Choose version" vs. "1.26"). Deleting the Looks like this is a bigger job than just bumping a version and deleting some old CSS :) It might be better for someone else to continue this PR. |
I can do that - thanks for getting it started! We can keep this one open and I'll push to it so you are still a co-author. Does that work for you? Thanks ❤️ |
Certainly! I'm not worried about co-author, feel free to push to this, close and create a new one, use or ditch my commits, or whatever is best for you. Thank you! |
[skip azp] [skip cirrus]
[skip azp] [skip cirrus]
[skip azp] [skip cirrus]
Hi folks - just updated this, and included some cleanup for the CSS file. If this is too much I'll understand and break it into another PR, but I figure since I needed to touch the CSS file anyway... Here's a summary of the major changes:
Similar to scipy/scipy#20460, I'm using as much of the PyData Sphinx Theme predefined colors as possible. This means some of the NumPy colors are absent from this version. Again, if that's too aggressive I'm happy to walk those back. Related: #25927
|
This helps adjust the flow of the navbar items. [skip azp][skip cirrus]
Commit eb4c33d removed an unrelated file, was that on purpose? |
Looks much better. The version switcher is bright red on my browser. Is that the desired color? |
@mattip the version switcher is red when it displays "choose version". It should be orange on devdocs and red on older versions. On stable it has the regular background color. This is the same approach I took for scipy, but maybe the red is too much? |
Then it should be fine. Let's get this in, we can always do more later. |
Thanks @hugovk, @melissawm |
Thank you @melissawm! |
Figured I'd add what I found to the conversation. I've been building numpy on codespaces multiple times today. Twice I've been able to build the docs without any errors. Every other time I've built the docs I've encountered the exact same warning messages with an error at the last stage of the doc build.
I've set up 7 different codespace environments today. My best guess is that when I build the docs from the main branch, I have no issues. When I build the docs from another branch, I get the warning messages. To build the docs with codespaces, I'm using the following 5 commands.
|
Hi @bmwoodruff - the parallel safety warning is a known issue with the PyData Sphinx theme and something that will be fixed upstream. It should not impact the documentation build. Are you able to build despite the warning? |
Hi @melissawm , the docs build and are viewable, but the ending message suggests otherwise.
I tried running the docs with Line 145 in 35c4f37
I still encounter the make error. Since the docs still build and things are viewable, I've ignored the error message for now. Mostly it's a bit confusing for a newbie. This was the only reference to this warning on the numpy site, so I figured I'd add a comment. I did find your conversations on scipy, and the linked discussion on pydata, all related to the same issue.
|
This commit tries to solve two problems. - The pydata_sphinx_theme extension warning can be avoided by setting the default `--jobs` to `1`. This matches `spin test`. - The -W option is currently hardcoded in ALLSPHINXOPTS and impossible to override. This commit moves `-W` to SPHINXOPTS which allows a local machine to remove -W if needed, as described in the documentation. This adds to the discussion in PR numpy#26125. [skip actions] [skip azp] [skip cirrus]
This commit tries to solve two problems. - The pydata_sphinx_theme extension warning can be avoided by setting the default `--jobs` to `1`. This matches `spin test`. - The -W option is currently hardcoded in ALLSPHINXOPTS and impossible to override. This commit moves `-W` to SPHINXOPTS which allows a local machine to remove -W if needed, as described in the documentation. This adds to the discussion in PR numpy#26125. [skip actions] [skip azp] [skip cirrus]
Fixes #26058.
Fixes inaccessible contrast for
a:visited
links in admonitions.Note: I didn't manage to build everything locally to test this out, does the CI generate a preview build?