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

DOC: Update sphinx, numpydoc, and pydata-sphinx-theme #21723

Merged
merged 4 commits into from
Jun 26, 2022

Conversation

jarrodmillman
Copy link
Member

Updates for sphinx, numpydoc, and pydata-sphinx-theme.

The new version of the pydata-sphinx-theme adds a theme switcher (light, dark, auto mode) among other improvements. I've set it to default to light mode for now. Once we have more feedback on the dark theme, we can set it to auto mode.

@charris charris changed the title Update sphinx DOC: Update sphinx, numpydoc, and pydata-sphinx-theme Jun 10, 2022
@jarrodmillman jarrodmillman marked this pull request as draft June 10, 2022 20:08
@mattip
Copy link
Member

mattip commented Jun 13, 2022

There are documentation build warnings (that make the build fail). Did something chagne in the autodoc summaries?

WARNING: unsupported theme option 'logo_link' given
/home/circleci/repo/doc/source/reference/arrays.interface.rst:249: WARNING: unknown document: c-api/buffer
/home/circleci/repo/venv/lib/python3.8/site-packages/numpy/__init__.py:docstring of numpy.arange:88: WARNING: unknown document: c-api/long
docstring of numpy.ma.arange:88: WARNING: unknown document: c-api/long
/home/circleci/repo/doc/source/user/basics.interoperability.rst:46: WARNING: unknown document: c-api/buffer
/home/circleci/repo/doc/source/user/how-to-how-to.rst:108: WARNING: unknown document: content/tutorial-style-guide
/home/circleci/repo/doc/source/user/quickstart.rst:1488: WARNING: unknown document: content/tutorial-svd
make: *** [Makefile:183: html-build] Error 1

Exited with code exit status 2


@seberg seberg linked an issue Jun 14, 2022 that may be closed by this pull request
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Thanks @jarrodmillman. The theme and numpydoc upgrades look good to me.

For the Sphinx upgrade: 5.0.1 is super recent, that's going to be annoying for contributors to deal with. We have always tried to maintain support for a reasonably old Sphinx version (e.g. as packaged in most common Linux distros; latest Ubuntu is at 4.3.2). Is there a need to upgrade so aggressively?

I don't think it is necessary to specify, since this should be the default.
@jarrodmillman jarrodmillman marked this pull request as ready for review June 24, 2022 17:16
@jarrodmillman
Copy link
Member Author

There is some follow-up work that needs to be done to make the website look better with the dark mode.Before doing that I wanted to check that everything else looks OK to folks. (For example, the logo text is black and doesn't show up well with the dark theme. So we will want to make a logo for the dark theme as well as the light theme.)

@rgommers Does setting the minimum sphinx version to 4.3 (released Nov 2021) make sense? We could go with 4.2 (released Sept. 2021) if 4.3 is too recent.

(If would prefer having 4.2 or more recent, since sphinx < 4.2 doesn't work under python 3.10 or above. If we do want to support sphinx < 4.2, we should put in some logic to make sure it doesn't try to use sphinx < 4.2 when the Python version is greater than 3.10.)

@rgommers
Copy link
Member

Sphinx 4.3 sounds fine to me, thanks Jarrod.

So we will want to make a logo for the dark theme as well as the light theme

We don't have one I think, but that shouldn't be hard to do. Do you think just making the logo text white is better, or make an all-white version of the logo?

@charris
Copy link
Member

charris commented Jun 26, 2022

Lets get this in and leave fixing the logo for the dark theme for another PR.

@charris charris merged commit 11e465e into numpy:main Jun 26, 2022
@charris
Copy link
Member

charris commented Jun 26, 2022

Thanks Jarrod.

@melissawm
Copy link
Member

We do have this one: https://github.com/numpy/numpy/blob/main/branding/logo/primary/numpylogolight.png

Could be a starting point?

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.

DOC: Add dark mode switcher
5 participants