Skip to content

Commit 00eb8ef

Browse files
authored
Merge branch 'master' into fortierq-patch
2 parents 920d6ee + 0181241 commit 00eb8ef

File tree

98 files changed

+2299
-1451
lines changed

Some content is hidden

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

98 files changed

+2299
-1451
lines changed

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This will run every time a tag is created and pushed to the repository.
2+
# It calls our tests workflow via a `workflow_call`, and if tests pass
3+
# then it triggers our upload to PyPI for a new release.
4+
name: Publish to PyPI
5+
on:
6+
release:
7+
types: ["published"]
8+
9+
jobs:
10+
tests:
11+
uses: ./.github/workflows/tests.yml
12+
publish:
13+
name: publish
14+
needs: [tests] # require tests to pass before deploy runs
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout source
18+
uses: actions/checkout@v3
19+
- name: Set up Python 3.9
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: 3.9
23+
24+
- name: Build package
25+
run: |
26+
python -m pip install -U pip build
27+
python -m build
28+
29+
- name: Publish
30+
uses: pypa/gh-action-pypi-publish@v1.5.1
31+
with:
32+
user: __token__
33+
password: ${{ secrets.PYPI_KEY }}

.github/workflows/tests.yml

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
tags:
77
- 'v*'
88
pull_request:
9+
workflow_call:
910

1011
env:
1112
PY_COLORS: 1
@@ -16,30 +17,30 @@ jobs:
1617
runs-on: ubuntu-latest
1718
steps:
1819
- uses: actions/checkout@v3
19-
- uses: actions/setup-python@v3
20+
- uses: actions/setup-python@v4
2021
with:
2122
python-version: 3.9
22-
- uses: pre-commit/action@v2.0.3
23+
- uses: pre-commit/action@v3.0.0
2324

2425
tests:
2526
strategy:
2627
matrix:
2728
os: [ubuntu-latest]
2829
python-version: [3.7, 3.8, 3.9]
29-
sphinx: [">=3,<4", ">=4,<5"]
30+
sphinx: [">=4,<5", ">=5,<6"]
3031
include:
3132
- os: windows-latest
3233
python-version: 3.9
33-
sphinx: ">=3,<4"
34+
sphinx: ">=4,<5"
3435
- os: macos-latest
3536
python-version: 3.9
36-
sphinx: ">=4,<5"
37+
sphinx: ">=5,<6"
3738
runs-on: ${{ matrix.os }}
3839

3940
steps:
4041
- uses: actions/checkout@v3
4142
- name: Set up Python ${{ matrix.python-version }}
42-
uses: actions/setup-python@v3
43+
uses: actions/setup-python@v4
4344
with:
4445
python-version: ${{ matrix.python-version }}
4546
cache: "pip"
@@ -56,7 +57,7 @@ jobs:
5657
5758
- name: Upload to Codecov
5859
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.7 && github.repository == 'executablebooks/sphinx-book-theme'
59-
uses: codecov/codecov-action@v3.1.0
60+
uses: codecov/codecov-action@v3.1.1
6061
with:
6162
name: ebp-sbt-pytests-py3.7
6263
flags: pytests
@@ -70,7 +71,7 @@ jobs:
7071
steps:
7172
- uses: actions/checkout@v3
7273
- name: Set up Python
73-
uses: actions/setup-python@v3
74+
uses: actions/setup-python@v4
7475
with:
7576
python-version: '3.7'
7677
cache: "pip"
@@ -93,39 +94,15 @@ jobs:
9394
run: |
9495
from pathlib import Path
9596
text = Path("./warnings.txt").read_text().strip()
97+
expected_warning_snippets = ["kitchen-sink", "urllib/parse.py"]
9698
print("\n=== Sphinx Warnings ===\n\n" + text) # Print just for reference so we can look at the logs
97-
unexpected = [ii for ii in text.split("\n") if "kitchen-sink" not in ii]
99+
unexpected = [ii for ii in text.split("\n") if not any(snippet in ii for snippet in expected_warning_snippets)]
98100
assert len(unexpected) == 0
99101
100102
- name: Audit with Lighthouse
101-
uses: treosh/lighthouse-ci-action@9.3.0
103+
uses: treosh/lighthouse-ci-action@9.3.1
102104
with:
103105
configPath: ".github/workflows/lighthouserc.json"
104106
temporaryPublicStorage: true
105107
uploadArtifacts: true
106108
runs: 5
107-
108-
publish:
109-
name: Publish to PyPI
110-
needs: [pre-commit, tests]
111-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
112-
113-
runs-on: ubuntu-latest
114-
steps:
115-
- name: Checkout source
116-
uses: actions/checkout@v3
117-
- name: Set up Python 3.7
118-
uses: actions/setup-python@v3
119-
with:
120-
python-version: 3.7
121-
122-
- name: Build package
123-
run: |
124-
python -m pip install -U pip build
125-
python -m build
126-
127-
- name: Publish
128-
uses: pypa/gh-action-pypi-publish@v1.5.0
129-
with:
130-
user: __token__
131-
password: ${{ secrets.PYPI_KEY }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ share/python-wheels/
2525
*.egg-info/
2626
.installed.cfg
2727
*.egg
28+
_build
2829

2930
# PyInstaller
3031
# Usually these files are written by a python script from a template

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ repos:
1717
- id: trailing-whitespace
1818

1919
- repo: https://github.com/PyCQA/flake8
20-
rev: 4.0.1
20+
rev: 5.0.4
2121
hooks:
2222
- id: flake8
2323

2424
- repo: https://github.com/psf/black
25-
rev: 22.3.0
25+
rev: 22.10.0
2626
hooks:
2727
- id: black
2828

2929
- repo: https://github.com/pre-commit/mirrors-prettier
30-
rev: v2.6.2
30+
rev: v3.0.0-alpha.4
3131
hooks:
3232
- id: prettier
3333
types_or: [scss, javascript]

ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This is a short overview of the general architecture and structure of the repository, to help you orient yourself.
44

5-
This theme uses [sphinx-theme-builder](https://sphinx-theme-builder.readthedocs.io/en/latest/) as its build backend, and follows the [filesystem layout](https://sphinx-theme-builder.readthedocs.io/en/latest/reference/filesystem-layout/) recommended by it.
5+
This theme uses [sphinx-theme-builder](https://sphinx-theme-builder.readthedocs.io/en/latest/) as its build backend, and follows the [filesystem layout](https://sphinx-theme-builder.readthedocs.io/en/latest/filesystem-layout/) recommended by it.
66
See below for some more specific sections
77

88
```{contents}

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Changelog
22

3+
## v0.3.3 -- 2022-07-17
4+
5+
### Fixes:
6+
7+
- Style edits for last-child zero-margin on dd's [#586](https://github.com/executablebooks/sphinx-book-theme/pull/586) ([@benjaoming](https://github.com/benjaoming))
8+
- Escape colon in JupyterHub link to repo [#556](https://github.com/executablebooks/sphinx-book-theme/pull/556) ([@matthew-brett](https://github.com/matthew-brett))
9+
- Myst-nb pinning to 0.13.2 [#560](https://github.com/executablebooks/sphinx-book-theme/pull/560) ([@choldgraf](https://github.com/choldgraf))
10+
- Stylizing ReadTheDocs in `_readthedocs.scss` as per guidelines [#579](https://github.com/executablebooks/sphinx-book-theme/pull/579) ([@pradyunsg](https://github.com/pradyunsg))
11+
- `templates_path` in config was overriding any value append to `templates_path` in this package. [#566](https://github.com/executablebooks/sphinx-book-theme/pull/566) ([@AakashGfude](https://github.com/AakashGfude))
12+
13+
### Enhancements made:
14+
15+
- Added sidenote and marginnote using footnote syntax [#546](https://github.com/executablebooks/sphinx-book-theme/pull/546) ([@AakashGfude](https://github.com/AakashGfude))
16+
17+
### Docs:
18+
19+
- Added Docs for sphinx-examples [#550](https://github.com/executablebooks/sphinx-book-theme/pull/550) ([@choldgraf](https://github.com/choldgraf))
20+
- Lychee link fixes [#553](https://github.com/executablebooks/sphinx-book-theme/pull/553) ([@choldgraf](https://github.com/choldgraf))
21+
- Beta and lychee link fix [#552](https://github.com/executablebooks/sphinx-book-theme/pull/552) ([@choldgraf](https://github.com/choldgraf))
22+
23+
324
## v0.3.2 -- 2022-03-28
425

526
Two patch releases fixed two bugs for figure content in the margin.
@@ -247,7 +268,7 @@ This updates to the latest PyData Sphinx Theme, which re-works some of the HTML
247268
## v0.0.36 2020-08-25
248269

249270
👌 IMPROVED: The main theme change in this release, is the addition of CSS styling for definition lists, including those created by [sphinx.ext.autodoc](https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html).
250-
See [Definition and Field Lists](https://sphinx-book-theme.readthedocs.io/en/latest/reference/kitchen-sink/lists-and-tables.html), and the [Python API documentation](https://sphinx-book-theme.readthedocs.io/en/latest/reference/kitchen-sink/api.html).
271+
See [Definition and Field Lists](https://sphinx-book-theme.readthedocs.io/en/stable/reference/kitchen-sink/lists-and-tables.html), and the [Python API documentation](https://sphinx-book-theme.readthedocs.io/en/latest/reference/kitchen-sink/api.html).
251272

252273
🔧 MAINTENANCE: Under the hood, there has also been work undertaken to improve the development environment for working with the package. Thanks to [@pradyunsg](https://github.com/pradyunsg).
253274

docs/conf.py

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# -- Project information -----------------------------------------------------
22
import os
3-
from pathlib import Path
4-
from urllib import request
53

64
project = "Sphinx Book Theme"
75
copyright = "2020"
@@ -31,6 +29,8 @@
3129
"sphinx_togglebutton",
3230
"sphinxcontrib.bibtex",
3331
"sphinxext.opengraph",
32+
# For the kitchen sink
33+
"sphinx.ext.todo",
3434
]
3535

3636
# Add any paths that contain templates here, relative to this directory.
@@ -154,27 +154,6 @@
154154
"https://doi.org", # These don't resolve properly and cause SSL issues
155155
]
156156

157-
# -- Download kitchen sink reference docs -------------------------------------
158-
# These are the kitchen sink files used by the Sphinx Themes gallery at
159-
# https://github.com/sphinx-themes/sphinx-themes.org
160-
# To re-download, delete the `references/kitchen-sink` folder and build the docs
161-
kitchen_sink_files = [
162-
"api.rst",
163-
"index.rst",
164-
"lists-and-tables.rst",
165-
"paragraph-markup.rst",
166-
]
167-
for ifile in kitchen_sink_files:
168-
path_file = Path(f"reference/kitchen-sink/{ifile}")
169-
path_file.parent.mkdir(exist_ok=True)
170-
if not path_file.exists():
171-
print(f"Downloading kitchen sink file {ifile}")
172-
resp = request.urlopen(
173-
f"https://github.com/sphinx-themes/sphinx-themes.org/raw/master/sample-docs/kitchen-sink/{ifile}" # noqa: E501
174-
)
175-
header = ".. DOWNLOADED FROM sphinx-themes.org, DO NOT MANUALLY EDIT\n"
176-
path_file.write_text(header + resp.read().decode())
177-
178157

179158
def setup(app):
180159
# -- To demonstrate ReadTheDocs switcher -------------------------------------

docs/launch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ html_theme_options = {
1313
...
1414
"repository_url": "https://github.com/{your-docs-url}",
1515
"repository_branch": "{your-branch}",
16-
"path_to_docs": "{path-relative-to-site-root},
16+
"path_to_docs": "{path-relative-to-site-root}",
1717
...
1818
}
1919
```

docs/reference/extensions.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@ And here's a bibliography:
2020
```{bibliography}
2121
```
2222

23-
:::{seealso}
24-
See the [paragraph markup page](kitchen-sink/paragraph-markup.rst) for more references styling.
25-
:::
2623

2724
## `ABlog` - Blog post list
2825

29-
[ABlog](https://ablog.readthedocs.io/en/latest/) is a Sphinx extension for blogging with Sphinx.
26+
[ABlog](https://ablog.readthedocs.io/) is a Sphinx extension for blogging with Sphinx.
3027

3128
Here's a sample post list:
3229

0 commit comments

Comments
 (0)