Skip to content

Commit 74d68d6

Browse files
Remove upperbound on sphinx (#661)
* Remove upperbound on sphinx * Explain that we don't test old releases against future releases of our dependencies * Clarify Sphinx policy Co-authored-by: Chris Holdgraf <[email protected]> Co-authored-by: Chris Holdgraf <[email protected]>
1 parent 734c99f commit 74d68d6

File tree

4 files changed

+35
-71
lines changed

4 files changed

+35
-71
lines changed

README.md

Lines changed: 7 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ A Bootstrap-based Sphinx theme from the PyData community.
66

77
Demo site: https://pydata-sphinx-theme.readthedocs.io/en/latest/
88

9-
**Note**: This theme is originally being developed for the pandas docs (originally named "pandas-sphinx-theme"),
10-
but since there is uptake in other projects, we are working on making this more
11-
generic and more easily extensible to suit the needs of the different projects.
12-
139
Sites that are using this theme:
1410

1511
- Pandas: https://pandas.pydata.org/docs/
@@ -47,75 +43,16 @@ and use as follows:
4743

4844
And that's it!
4945

50-
Well, in principle at least. In practice, there are might still be a few
51-
pandas-specific things that are right now hard-coded in the theme. We also need
52-
to work on better configurability and extensibility. Feedback and contributions
53-
are very welcome!
46+
> **Note**
47+
> This theme may not work with the latest major versions of Sphinx, especially
48+
> if they have only recently been released. Please give us a few months of
49+
> time to work out any bugs and changes when new releases are made.
50+
> See [our contributing documentation](docs/contribute/topics.md) for more information.
5451
55-
## Theme development
52+
## Contribute to and develop the theme
5653

5754
Contributions are very welcome! Installing the development version, building
5855
the demo docs and developing the css/js of the theme, etc, is explained in
5956
more detail in the contributing section of the documentation:
6057

61-
- [Contributing source files](docs/contributing.md)
62-
- [Contributing rendered docs](https://pydata-sphinx-theme.readthedocs.io/en/latest/contributing.html)
63-
64-
## How is this theme working?
65-
66-
### The html layout
67-
68-
The "layout" included in this theme is originally mainly targeted towards
69-
documentation sites with many pages, and where putting all navigation in a
70-
single sidebar can therefore get unwieldy.
71-
72-
The current layout features 3 navigation elements:
73-
74-
- A top navbar with top-level navigation
75-
- A left sidebar with subsequent navigation up to single pages
76-
- A right sidebar with a local "On this page" table of contents
77-
78-
What is put where is determined by the sphinx "toctree" (and such depending on
79-
the structure of your sphinx docs). The first level of the toctree is put in the
80-
top navbar, and the second (and potentially) third level is put in the left
81-
sidebar.
82-
83-
It should certainly be possible to make the exact used levels of the sphinx
84-
toctree configurable.
85-
86-
### Implementation details
87-
88-
A second aspect of the design of this theme is that we are trying to make good
89-
use of Bootstrap features and use as much as possible actual (templated) html
90-
and css to define the theme, instead of relying on sphinx to do custom
91-
formatting. This should make the theming and layouts more flexible to customize.
92-
93-
To this end, this package includes:
94-
95-
- A [`BootstrapHTML5Translator`](./pydata_sphinx_theme/bootstrap_html_translator.py),
96-
subclassing sphinx' translator, but overriding certain elements to generate
97-
Bootstrap-compatible html. Currently, this includes: converting admonitions to
98-
Bootstrap "alert" classes, and updating the classes used for html tables.
99-
- A [sphinx event](./pydata_sphinx_theme/__init__.py) to add navigation
100-
objects into the html context which is available in the html (jinja2)
101-
templates. This allows to put the structure of the navigation elements in the
102-
actual layout, instead of having to rely on the hard-coded formatting of
103-
sphinx (this is inspired on the navigation objects of mkdocs:
104-
https://www.mkdocs.org/user-guide/custom-themes/#nav). We would love to see
105-
this added to sphinx itself (instead of needing a sphinx event), but for now
106-
did not yet get any reaction from the sphinx developers.
107-
108-
Those items also avoid writing javascript functions to "fix up" the html
109-
generated by sphinx to make it suitable for theming.
110-
111-
### What's the difference with bootstrap-sphinx-theme ?
112-
113-
There is already a sphinx Bootstrap theme used by some project in the community:
114-
https://github.com/ryan-roemer/sphinx-bootstrap-theme/
115-
116-
Currently, the main difference is that this theme is using Bootstrap 4 instead
117-
of 3 and provides a different default layout. At some point, it would be good to
118-
contribute changes to that package (or at least the parts that deal with
119-
Bootstrap and sphinx that could be shared).
120-
121-
The initial layout and css were inspired on the Bootstrap documentation site.
58+
- [Contributing documentation](https://pydata-sphinx-theme.readthedocs.io/en/stable/contribute/index.html)

docs/contribute/topics.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,16 @@ The output of the last command includes:
212212
- a short summary of the current state of the accessibility rules we are trying to maintain
213213
- local paths to JSON and HTML reports which contain all of the issues found
214214

215+
## Update support for new Sphinx versions
216+
217+
This theme does not pin the upper version of Sphinx that it supports, but there may be changes that need to happen when Sphinx releases a new version.
218+
As a general rule, we try to support new major Sphinx versions within 6 months of its release.
219+
220+
Here's a list of things to check when Sphinx releases a new version:
221+
222+
- [Look at the Sphinx Changelog](https://www.sphinx-doc.org/en/master/changes.html) and make sure there are no obvious breaking changes.
223+
- [Look at the deprecated API changes](https://www.sphinx-doc.org/en/master/extdev/deprecated.html) and make sure there are no obvious breaking changes.
224+
215225
## Update our kitchen sink documents
216226

217227
The [kitchen sink reference](../demo/kitchen-sink/index.rst) is for demonstrating as much syntax and style for Sphinx builds as possible.

docs/user_guide/install.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
Installation
33
************
44

5+
.. note::
6+
7+
Each pydata-sphinx-theme release has a minimum required Sphinx version,
8+
which should be automatically handled by your package installer.
9+
It is also tested against newer versions of Sphinx that were available
10+
prior to that release of the pydata-sphinx-theme package.
11+
If you run into issues when trying to use a more recent version of Sphinx,
12+
please open an issue here: https://github.com/pydata/pydata-sphinx-theme/issues
13+
514
The theme is available on PyPI and conda-forge, and can thus be installed with:
615

716
.. code:: console
@@ -19,6 +28,14 @@ configuration option:
1928
2029
html_theme = "pydata_sphinx_theme"
2130
31+
.. note::
32+
33+
This theme may not work with the latest major versions of Sphinx, especially
34+
if they have only recently been released. Please give us a few months of
35+
time to work out any bugs and changes when new releases are made.
36+
37+
Development version
38+
===================
2239

2340
If you want to track the development version of the theme, you can
2441
install it from the git repo:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ readme = "README.md"
1818

1919
requires-python = ">=3.7"
2020
dependencies = [
21-
"sphinx>=4,<6",
21+
"sphinx>=4",
2222
"beautifulsoup4",
2323
"docutils!=0.17.0",
2424
"packaging"

0 commit comments

Comments
 (0)