Skip to content

Commit 9ef331a

Browse files
committed
Merge branch 'main' into link-focus-visible-style
2 parents b05c82b + e86e0ab commit 9ef331a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3976
-3160
lines changed

.devcontainer/devcontainer.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// container instruction for codespace users
2+
{
3+
"name": "Python 3",
4+
"image": "mcr.microsoft.com/devcontainers/python:1-3.10-bullseye",
5+
"features": {
6+
"ghcr.io/devcontainers-contrib/features/nox:2": {},
7+
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {},
8+
"ghcr.io/rocker-org/devcontainer-features/pandoc:1": {}
9+
},
10+
"postCreateCommand": "pre-commit install"
11+
}

.github/workflows/prerelease.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
python-version: ["3.8", "3.9", "3.10", "3.11"]
1717

1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020

2121
- name: Set up Python ${{ matrix.python-version }}
2222
uses: actions/setup-python@v4

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout source
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
- name: Set up Python 3.9
2020
uses: actions/setup-python@v4
2121
with:

.github/workflows/tests.yml

+41-32
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: continuous-integration
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
4+
cancel-in-progress: true
25

36
# README
47
# ======
@@ -17,9 +20,6 @@ on:
1720
pull_request:
1821
workflow_call:
1922

20-
env:
21-
COVERAGE_THRESHOLD: 60
22-
2323
jobs:
2424
lint:
2525
strategy:
@@ -28,7 +28,7 @@ jobs:
2828
python-version: ["3.11"]
2929
runs-on: ${{ matrix.os }}
3030
steps:
31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3232
- name: Setup Python
3333
uses: actions/setup-python@v4
3434
with:
@@ -45,19 +45,29 @@ jobs:
4545
matrix:
4646
os: [ubuntu-latest]
4747
python-version: ["3.8", "3.9", "3.10", "3.11"]
48+
sphinx-version: [""]
4849
include:
4950
# macos test
5051
- os: macos-latest
5152
python-version: "3.11"
5253
# windows test
5354
- os: windows-latest
5455
python-version: "3.11"
56+
# old Sphinx test
57+
- os: ubuntu-latest
58+
python-version: "3.8"
59+
sphinx-version: "old"
60+
# dev Sphinx test
61+
- os: ubuntu-latest
62+
python-version: "3.11"
63+
sphinx-version: "dev"
5564
# needed to cache the browsers for the accessibility tests
5665
env:
5766
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers
67+
SPHINX_VERSION: ${{ matrix.sphinx-version }}
5868
runs-on: ${{ matrix.os }}
5969
steps:
60-
- uses: actions/checkout@v3
70+
- uses: actions/checkout@v4
6171
- name: Setup Python
6272
uses: actions/setup-python@v4
6373
with:
@@ -67,34 +77,23 @@ jobs:
6777
- name: Install dependencies
6878
# if Sphinx version not specified in matrix, the constraints in the
6979
# pyproject.toml file determine Sphinx version
70-
if: false == matrix.sphinx-version
7180
shell: bash
7281
# setting shell to BASH and using PYTHONUTF8 env var makes the editable
7382
# install work on Windows even though there are emoji in our README
74-
run: |
75-
export PYTHONUTF8=1
76-
python -m pip install --upgrade pip wheel setuptools
77-
python -m pip install -e .[test]
78-
- name: Install dependencies (legacy Sphinx)
79-
# here we override the pyproject.toml constraints to get a specific
80-
# Sphinx version.
81-
if: matrix.sphinx-version
82-
run: |
83-
python -m pip install --upgrade pip wheel setuptools
84-
python -m pip install -e .[test] sphinx==${{ matrix.sphinx-version }}
83+
run: tools/github_actions_install.sh test
8584
- name: Show installed versions
8685
run: python -m pip list
8786
- name: Compile MO files
8887
run: |
8988
pip install nox
9089
nox -s compile
9190
- name: Run tests
92-
run: pytest -m "not a11y" --color=yes --cov pydata_sphinx_theme --cov-branch --cov-report xml:cov.xml --cov-report= --cov-fail-under ${{ env.COVERAGE_THRESHOLD }}
91+
run: pytest -m "not a11y" --color=yes --cov --cov-report=xml
9392
- name: Upload to Codecov
9493
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
95-
uses: codecov/codecov-action@v3.1.4
94+
uses: codecov/codecov-action@v3
9695
with:
97-
files: cov.xml
96+
token: ${{ secrets.CODECOV_TOKEN }}
9897
fail_ci_if_error: true
9998

10099
# note I am setting this on top of the Python cache as I could not find
@@ -122,19 +121,31 @@ jobs:
122121
matrix:
123122
os: [ubuntu-latest, macos-latest, windows-latest]
124123
python-version: ["3.11"]
124+
sphinx-version: [""]
125+
include:
126+
- os: ubuntu-latest
127+
python-version: "3.8"
128+
sphinx-version: "old"
129+
- os: ubuntu-latest
130+
python-version: "3.11"
131+
sphinx-version: "dev"
132+
env:
133+
SPHINX_VERSION: ${{ matrix.sphinx-version }}
125134
runs-on: ${{ matrix.os }}
126135
steps:
127-
- uses: actions/checkout@v3
136+
- uses: actions/checkout@v4
137+
# waiting for https://github.com/nikeee/setup-pandoc/pull/8
138+
# using 12rambau fork until then
139+
- uses: 12rambau/setup-pandoc@test
128140
- name: Setup Python
129141
uses: actions/setup-python@v4
130142
with:
131143
python-version: ${{ matrix.python-version }}
132144
cache: "pip"
133145
cache-dependency-path: "pyproject.toml"
134146
- name: Install dependencies
135-
run: |
136-
python -m pip install --upgrade pip wheel setuptools
137-
python -m pip install -e .[doc]
147+
shell: bash
148+
run: ./tools/github_actions_install.sh doc
138149
- name: Show installed versions
139150
run: python -m pip list
140151
- name: Build docs
@@ -151,17 +162,16 @@ jobs:
151162
python-version: ["3.11"]
152163
runs-on: ${{ matrix.os }}
153164
steps:
154-
- uses: actions/checkout@v3
165+
- uses: actions/checkout@v4
155166
- name: Setup Python
156167
uses: actions/setup-python@v4
157168
with:
158169
python-version: ${{ matrix.python-version }}
159170
cache: "pip"
160171
cache-dependency-path: "pyproject.toml"
161172
- name: Install dependencies
162-
run: |
163-
python -m pip install --upgrade pip wheel setuptools
164-
python -m pip install -e .[doc]
173+
run: ./tools/github_actions_install.sh doc
174+
shell: bash
165175
- name: Show installed versions
166176
run: python -m pip list
167177
# We want to run the audit on a simplified documentation build so that
@@ -195,17 +205,16 @@ jobs:
195205
python-version: ["3.11"]
196206
runs-on: ${{ matrix.os }}
197207
steps:
198-
- uses: actions/checkout@v3
208+
- uses: actions/checkout@v4
199209
- name: Setup Python
200210
uses: actions/setup-python@v4
201211
with:
202212
python-version: ${{ matrix.python-version }}
203213
cache: "pip"
204214
cache-dependency-path: "pyproject.toml"
205215
- name: Install dependencies
206-
run: |
207-
python -m pip install --upgrade pip wheel setuptools nox
208-
python -m pip install -e .[test]
216+
run: ./tools/github_actions_install.sh test nox
217+
shell: bash
209218
- name: Show installed versions
210219
run: python -m pip list
211220
- name: Generate a profile

.pre-commit-config.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,8 @@ repos:
3838
rev: v1.1.1
3939
hooks:
4040
- id: doc8
41+
42+
- repo: "https://github.com/kynan/nbstripout"
43+
rev: "0.5.0"
44+
hooks:
45+
- id: nbstripout

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ And that's it!
4141
> This theme may not work with the latest major versions of Sphinx, especially
4242
> if they have only recently been released. Please give us a few months of
4343
> time to work out any bugs and changes when new releases are made.
44-
> See [our contributing documentation](docs/community/topics.md) for more information.
44+
> See [our contributing documentation](https://pydata-sphinx-theme.readthedocs.io/en/stable/community/practices/versions.html#supported-sphinx-versions) for more information.
4545
4646
## Contribute to and develop the theme
4747

docs/_static/custom.css

+8
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,11 @@ div.admonition.admonition-youtube > .admonition-title {
4141
color: white;
4242
}
4343
/* end-custom-youtube */
44+
45+
/* fix for project names that are parsed as links: the whole card is a link so
46+
* don't format the project name itself like a text link
47+
*/
48+
div.downstream-project-links a {
49+
text-decoration: none !important;
50+
color: inherit !important;
51+
}

docs/_static/switcher.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44
"url": "https://pydata-sphinx-theme.readthedocs.io/en/latest/"
55
},
66
{
7-
"name": "0.13.3 (stable)",
8-
"version": "v0.13.3",
7+
"name": "0.14.2 (stable)",
8+
"version": "v0.14.2",
99
"url": "https://pydata-sphinx-theme.readthedocs.io/en/stable/",
1010
"preferred": true
1111
},
12+
{
13+
"name": "0.13.3",
14+
"version": "v0.13.3",
15+
"url": "https://pydata-sphinx-theme.readthedocs.io/en/v0.13.3/"
16+
},
1217
{
1318
"name": "0.12.0",
1419
"version": "v0.12.0",
@@ -23,10 +28,5 @@
2328
"name": "0.10.1",
2429
"version": "v0.10.1",
2530
"url": "https://pydata-sphinx-theme.readthedocs.io/en/v0.10.1/"
26-
},
27-
{
28-
"name": "0.9.0",
29-
"version": "v0.9.0",
30-
"url": "https://pydata-sphinx-theme.readthedocs.io/en/v0.9.0/"
3131
}
3232
]

docs/community/setup.md

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ To simplify this process, we use a few helper tools:
4242
- [The Sphinx Theme Builder](https://sphinx-theme-builder.readthedocs.io/en/latest/) compiles web assets in an automated way.
4343
- [pre-commit](https://pre-commit.com/) for automatically enforcing code standards and quality checks before commits.
4444
- [nox](https://nox.thea.codes/) for automating common development tasks.
45+
- [pandoc](https://pandoc.org/) the universal document converter.
4546

4647
In particular, `nox` can be used to automatically create isolated local development environments with all the correct packages installed to work on the theme.
4748
The rest of this guide focuses on using `nox` to start with a basic environment.

docs/community/topics/manual-dev.md

+13-9
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,34 @@ This is optional, but it's best to start with a fresh development environment so
1212

1313
To do so, use a tool like [conda](https://docs.conda.io/en/latest/), [mamba](https://github.com/mamba-org/mamba), or [virtualenv](https://virtualenv.pypa.io/).
1414

15-
## Clone the repository locally
15+
## Install dependencies
1616

17-
First clone this repository from the `pydata` organization, or from a fork that you have created:
17+
You must install `sphinx-theme-builder` and Pandoc.
18+
19+
We use the `sphinx-theme-builder` to install `nodejs` locally and to compile all CSS and JS assets needed for the theme.
20+
Install it like so (note the `cli` option so that we can run it from the command line):
1821

1922
```console
20-
$ git clone https://github.com/pydata/pydata-sphinx-theme
21-
$ cd pydata-sphinx-theme
23+
$ pip install "sphinx-theme-builder[cli]"
2224
```
2325

24-
## Install the `sphinx-theme-builder`
26+
We use `nbsphinx` to support notebook (.ipynb) files in the documentation, which requires [installing Pandoc](https://pandoc.org/installing.html) at a system level (or within a Conda environment).
2527

26-
We use the `sphinx-theme-builder` to install `nodejs` locally and to compile all CSS and JS assets needed for the theme.
27-
Install it like so (note the `cli` option so that we can run it from the command line):
28+
## Clone the repository locally
29+
30+
First clone this repository from the `pydata` organization, or from a fork that you have created:
2831

2932
```console
30-
$ pip install sphinx-theme-builder[cli]
33+
$ git clone https://github.com/pydata/pydata-sphinx-theme
34+
$ cd pydata-sphinx-theme
3135
```
3236

3337
## Install this theme locally
3438

3539
Next, install this theme locally so that we have the necessary dependencies to build the documentation and testing suite:
3640

3741
```console
38-
$ pip install -e .[dev]
42+
$ pip install -e ".[dev]"
3943
```
4044

4145
Note that the `sphinx-theme-builder` will automatically install a local copy of `nodejs` for building the theme's assets.

0 commit comments

Comments
 (0)