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

Merge main into feature-focus #1685

Merged
merged 47 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
07dcd14
Build(deps): Bump actions/setup-python from 4 to 5 (#1590)
dependabot[bot] Dec 11, 2023
7bdd4c1
Use pytest-regressions to mark expected a11y test failures (#1501)
gabalafou Dec 11, 2023
8bc48a9
FIX: avoid implicit string comparison in Sphinx 7.26 (#1592)
agoose77 Dec 13, 2023
2c3f8a3
Build(deps): Bump actions/upload-artifact from 3 to 4 (#1598)
dependabot[bot] Dec 18, 2023
3de3059
Update fontawesome from 6.1.2 to 6.5.1 (#1600)
sphuber Dec 18, 2023
5b417ad
Fix landmark-unique error due to in-page TOC (#1607)
gabalafou Dec 23, 2023
b731dc2
Feature: Add support for per-page secondary sidebar content (#1572)
peytondmurray Dec 26, 2023
4ef6725
Update translation files (#1606)
gabalafou Dec 29, 2023
068ac7b
Bump minimum Python from 3.8 to 3.9; add 3.12 to CIs (#1610)
drammock Jan 2, 2024
fcde006
Fix: more efficient determination of when to hide primary sidebar (#1…
drammock Jan 2, 2024
7d01e01
Fix "More" links in mobile sidebar (#1604)
gabalafou Jan 2, 2024
469b921
bump: 0.14.4 → 0.15.0rc0
12rambau Jan 3, 2024
8e1bb95
Updates for file src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx…
transifex-integration[bot] Jan 3, 2024
921474c
bump: 0.14.4 → 0.15.0
12rambau Jan 4, 2024
4aa82e2
fix: drop the dev test (#1623)
12rambau Jan 4, 2024
e0b39b8
fix: remove Site navigation header (#1615)
12rambau Jan 4, 2024
86a5b6c
fix: align all breadcrumb elements (#1619)
12rambau Jan 4, 2024
287382d
fix: log information when warnings are disabled (#1617)
12rambau Jan 4, 2024
b8591f8
bump: 0.15.0 → 0.15.1
12rambau Jan 4, 2024
324b361
back to dev
12rambau Jan 4, 2024
c25f233
fix: align the search button with other icons (#1620)
12rambau Jan 4, 2024
1b599c4
Fix sticky header (#1630)
gabalafou Jan 8, 2024
d4f888e
maybe fix missing sidebar? (#1632)
drammock Jan 9, 2024
ea92bd1
DOC: Add missing "footer_center" in layout overview diagram (#1640)
jorisvandenbossche Jan 10, 2024
82eabda
Make bootstrap globally available (#1639)
michael-wisely-gravwell Jan 10, 2024
2057612
Add Brightway to Featured Example Gallery Grid (#1580)
michaelweinold Jan 11, 2024
f50e7b9
fix: move the release instructions to the repository (#1621)
12rambau Jan 12, 2024
fff6837
Make search event listener only trigger with “K”/“k” (#1646)
flying-sheep Jan 15, 2024
03c73c4
More speedups to section TOC rendering (#1642)
drammock Jan 18, 2024
80b3e51
Allow only theme_footer_center to be set (#1653)
cmarqu Jan 18, 2024
5fc1452
fix: allow user to control the back-to-top button presence (#1616)
12rambau Jan 18, 2024
cfd3cb5
remove toggle button for secondary sidebar if empty (#1637)
PierreMarchand20 Jan 18, 2024
f420c13
in CIs, pin sphinx dev temporarily
drammock Jan 18, 2024
6010af1
bump: 0.15.1 -> 0.15.2
drammock Jan 18, 2024
093c4e0
bump version to dev
drammock Jan 18, 2024
a135c20
FIX make theme switcher have consistent widths (#1651)
Charlie-XIAO Jan 19, 2024
7bc672f
unpin sphinx in CI (#1665)
drammock Jan 19, 2024
8cf45f8
FIX make search button closer to other icons in topbar (#1659)
Charlie-XIAO Jan 19, 2024
b00124d
Build(deps): Bump actions/cache from 3 to 4 (#1667)
dependabot[bot] Jan 22, 2024
53a9a02
update dependabot labels (#1668)
drammock Jan 22, 2024
115343c
only do security updates for NPM (#1674)
drammock Jan 22, 2024
6919a8a
Restore search snippet highlights in search results page (#1678)
gabalafou Jan 23, 2024
3e44d1c
Apply default_mode to the html data-theme attribute (#1663)
char101 Jan 24, 2024
c04f042
Don't try to populate version switcher w/ relative path on local stat…
dstansby Jan 24, 2024
11af3fc
handle null result from queryselector (#1683)
drammock Jan 28, 2024
d6fa252
Merge branch 'main' into feature-focus
gabalafou Jan 29, 2024
2f119cf
Add pst-header-nav-item id to fix tests
gabalafou Jan 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
labels:
- "tag: dependencies"
- "tag: CI"
# npm
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
labels:
- "tag: dependencies"
- "tag: javascript"
open-pull-requests-limit: 0 # security updates only
4 changes: 2 additions & 2 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install gettext for translations
Expand Down
46 changes: 24 additions & 22 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
python-version: ["3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand All @@ -44,22 +44,22 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
sphinx-version: [""]
include:
# macos test
- os: macos-latest
python-version: "3.11"
python-version: "3.12"
# windows test
- os: windows-latest
python-version: "3.11"
python-version: "3.12"
# old Sphinx test
- os: ubuntu-latest
python-version: "3.8"
python-version: "3.9"
sphinx-version: "old"
# dev Sphinx test
- os: ubuntu-latest
python-version: "3.11"
python-version: "3.12"
sphinx-version: "dev"
# needed to cache the browsers for the accessibility tests
env:
Expand All @@ -69,7 +69,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand All @@ -93,7 +93,7 @@ jobs:
- name: Run tests
run: pytest -m "not a11y" --color=yes --cov --cov-report=xml
- name: Upload to Codecov
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -102,7 +102,7 @@ jobs:
# note I am setting this on top of the Python cache as I could not find
# how to set the hash key on the python one
- name: Set up browser cache (for accessibility tests)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/pw-browsers
Expand All @@ -111,7 +111,7 @@ jobs:
${{ runner.os }}-pw-

- name: Run accessibility tests with playwright
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
run: |
nox -s a11y
continue-on-error: true
Expand All @@ -123,15 +123,17 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11"]
python-version: ["3.12"]
sphinx-version: [""]
include:
- os: ubuntu-latest
python-version: "3.8"
python-version: "3.9"
sphinx-version: "old"
- os: ubuntu-latest
python-version: "3.11"
sphinx-version: "dev"
# crash with myst parser
# will be restored when myst will be dropped from our documentation
# - os: ubuntu-latest
# python-version: "3.12"
# sphinx-version: "dev"
env:
SPHINX_VERSION: ${{ matrix.sphinx-version }}
runs-on: ${{ matrix.os }}
Expand All @@ -141,7 +143,7 @@ jobs:
# using 12rambau fork until then
- uses: 12rambau/setup-pandoc@test
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand All @@ -162,12 +164,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
python-version: ["3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand Down Expand Up @@ -205,12 +207,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
python-version: ["3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand All @@ -223,7 +225,7 @@ jobs:
- name: Generate a profile
run: nox -s profile
continue-on-error: true
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: profile-results
path: profile.svg
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ repos:
hooks:
- id: prettier
# Exclude the HTML, since it doesn't understand Jinja2
# exclude also the webpack.congo.js file has it embed complete url dificult to prettify
exclude: .+\.html|webpack\.config\.js
# exclude also the webpack.config.js file has it embed complete url dificult to prettify
# exclude the pytest-regressions folder tests/test_ally
exclude: .+\.html|webpack\.config\.js|tests/test_a11y/

- repo: https://github.com/psf/black
rev: 22.12.0
Expand Down
36 changes: 36 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Release instructions

This page contains the steps to make a release and some helpful resources to get you started.

Create an issue and copy/paste the steps below to release a new version. Close the issue when it is done.

These steps should be taken in order to create a new release![^release-refs]

```md
**Double check for quality-control**

- [ ] There are no [open issues with a `impact: block-release` label](https://github.com/pydata/pydata-sphinx-theme/labels/impact%3A%20block-release)

**Prepare the codebase for a new version**

- [ ] Bump `__version__` in [`__init__.py`](https://github.com/pydata/pydata-sphinx-theme/blob/main/src/pydata_sphinx_theme/__init__.py#L16)
- [ ] Update our [version switcher `.json` file](https://github.com/pydata/pydata-sphinx-theme/blob/main/docs/_static/switcher.json) with the new version
- [ ] Make a release commit: `git commit -m 'bump: 0.1.9 → 0.2.0'`
- [ ] Push the RLS commit `git push upstream main`
- [ ] If a **release candidate** is needed, tick this box when we're now ready for a full release.

**Make the release**

- [ ] [Start a new GitHub release](https://github.com/pandas-dev/pydata-sphinx-theme/releases/new)
- Call the release the current version, e.g. `v0.2.0`
- In the **`Choose a Tag:`** dropdown, type in the release name (e.g., `v0.2.0`) and click "Create new tag"
- In the **`Target:`** dropdown, pin it to the release commit that you've just pushed.
- Generate the automatic release notes, eventually manually specify the previous version (useful when several release candidate have been made)
- [ ] Confirm that the release completed
- [The `publish` github action job](https://github.com/pydata/pydata-sphinx-theme/blob/main/.github/workflows/publish.yml#L31) has completed successfully in the [actions tab](https://github.com/pydata/pydata-sphinx-theme/actions).
- [The PyPI version is updated](https://pypi.org/project/pydata-sphinx-theme/)
- [ ] Hide the previous patch version build in the RDT interface if needed.
- [ ] Celebrate, you're done!

[^release-refs]: Taken from [the release checklist](https://github.com/pydata/pydata-sphinx-theme/blob/main/RELEASE.md). See [the release documentation](https://pydata-sphinx-theme.readthedocs.io/en/latest/contribute/policies.html#release-policy) for an overview of release processes.
```
3 changes: 3 additions & 0 deletions docs/_static/gallery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
- title: Bokeh
link: https://docs.bokeh.org/en/latest/
img-bottom: ../_static/gallery/bokeh.png
- title: Brightway
link: https://docs.brightway.dev/en/latest/
img-bottom: ../_static/gallery/brightway.png
- title: Jupyter
link: https://docs.jupyter.org/en/latest/
img-bottom: ../_static/gallery/jupyter.png
Expand Down
14 changes: 7 additions & 7 deletions docs/_static/switcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
"url": "https://pydata-sphinx-theme.readthedocs.io/en/latest/"
},
{
"name": "0.14.4 (stable)",
"version": "v0.14.4",
"name": "0.15.2 (stable)",
"version": "v0.15.2",
"url": "https://pydata-sphinx-theme.readthedocs.io/en/stable/",
"preferred": true
},
{
"name": "0.14.4",
"version": "v0.14.4",
"url": "https://pydata-sphinx-theme.readthedocs.io/en/v0.14.4/"
},
{
"name": "0.13.3",
"version": "v0.13.3",
Expand All @@ -23,10 +28,5 @@
"name": "0.11.0",
"version": "v0.11.0",
"url": "https://pydata-sphinx-theme.readthedocs.io/en/v0.11.0/"
},
{
"name": "0.10.1",
"version": "v0.10.1",
"url": "https://pydata-sphinx-theme.readthedocs.io/en/v0.10.1/"
}
]
4 changes: 2 additions & 2 deletions docs/community/practices/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Anybody is encouraged to make a new release if:

- It has been more than a month since the last release.
- OR a significant change has been made to our code that warrants a release.
- AND there are no open issues with a [{guilabel}`block-release`](https://github.com/pydata/pydata-sphinx-theme/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Ablock-release) label.
- AND there are no open issues with a [{guilabel}`impact: block-release`](https://github.com/pydata/pydata-sphinx-theme/labels/impact%3A%20block-release) label.

### Release candidates

Expand All @@ -35,7 +35,7 @@ Follow these steps to make a release:

- (optionally) **Create a [GitHub milestones](https://github.com/pydata/pydata-sphinx-theme/milestones)** to organize the issues that should be resolved as part of a new release.
- **Decide if it's time** to make a release be reading [](releases:when) and decide if it is time for a release.
- **Copy the release checklist into a new issue**. We have [a release checklist in our wiki](https://github.com/pydata/pydata-sphinx-theme/wiki/Release-checklist#release-instructions).
- **Copy the [release checklist](https://github.com/pydata/pydata-sphinx-theme/blob/main/RELEASE.md) into a new issue**.
- **Complete the checklist**. That's it!

## Choosing a version increment
Expand Down
1 change: 1 addition & 0 deletions docs/community/topics/bootstrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ JavaScript
^^^^^^^^^^

- Data attributes for all JavaScript plugins are now namespaced to help distinguish Bootstrap functionality from third parties and your code. For example, we use ``data-bs-toggle`` instead of ``data-toggle``.
- Bootstrap's `Programmatic API <https://getbootstrap.com/docs/5.0/getting-started/javascript/#programmatic-api>`_, ``bootstrap``, is also available. This API can be useful for initializing opt-in components that are not initialized by default such as `Popovers <https://getbootstrap.com/docs/5.0/components/popovers/#overview>`_.
6 changes: 5 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,16 @@
# "content_footer_items": ["test", "test"],
"footer_start": ["copyright"],
"footer_center": ["sphinx-version"],
# "secondary_sidebar_items": ["page-toc"], # Remove the source buttons
"secondary_sidebar_items": {
"**/*": ["page-toc", "edit-this-page", "sourcelink"],
"examples/no-sidebar": [],
},
"switcher": {
"json_url": json_url,
"version_match": version_match,
},
"navigation_with_keys": False,
# "back_to_top_button": False,
# "search_bar_position": "navbar", # TODO: Deprecated - remove in future version
}

Expand Down
2 changes: 0 additions & 2 deletions docs/examples/gallery.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ Thanks for your support!

- title: Binder
link: https://mybinder.readthedocs.io/en/latest/index.html
- title: Brightway
link: https://docs.brightway.dev/en/latest/
- title: cashocs
link: https://cashocs.readthedocs.io/en/stable/
- title: CuPy
Expand Down
49 changes: 49 additions & 0 deletions docs/examples/in-page-toc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:html_theme.sidebar_secondary.remove: true

Test of in-page TOC with no right sidebar
=========================================

This page tests that the local contents directive looks okay.

.. attention::

We **do not recommend** using this directive on pages that use this theme
because PyData Theme provides an in-page table of contents in the right sidebar
by default.

If you do choose to use an inline, in-page table of contents, we recommend that
you turn off the right sidebar as follows.

.. contents:: Page contents
:local:


Add a local table of contents (in-page)
---------------------------------------

Add the local table of contents directive near the top of your ``.rst`` page:

.. code-block:: rst

.. contents:: Page contents
:local:

This directive will generate a table of contents for the section where this was
added, as shown on this page.


Turn off the right sidebar for a single page
--------------------------------------------

On the very top line of your ``.rst`` file, insert the following line:

.. code-block:: rst

:html_theme.sidebar_secondary.remove: true

This will render the page without the right sidebar, also known as the secondary
sidebar, which contains the table of contents for that page.

Be aware that if you remove the sidebar you may also remove the "Edit on ..."
and "Show source" links for that page, since by default those are configured for
the right sidebar.
1 change: 1 addition & 0 deletions docs/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ See the sections in the primary sidebar and below to explore.

no-sidebar
persistent-search-field
in-page-toc
subpages/index
mult_headers
Link to an external site <https://jupyterbook.org/>
Expand Down
Loading
Loading