Skip to content

Commit c1b04d6

Browse files
committed
Remove temp fix for Sphinx _static file bug
* Remove util/sphinx_static_file_temp_fix and invocation in conf.py * Upgrade to Sphinx 8.2.3 to include fix for temp files * Add mention of requiring Python 3.11 as comments in pyproject.toml * Update Python versions for CI doc build (readthedocs + GitHub) * Explain the contents of the dev deps
1 parent 78550c0 commit c1b04d6

6 files changed

Lines changed: 17 additions & 155 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
matrix:
8484
os: [ubuntu-latest]
8585
# python-version in must be kept in sync with .readthedocs.yaml
86-
python-version: ['3.10'] # July 2024 | Match our contributor dev version; see pyproject.toml
86+
python-version: ['3.11'] # July 2024 | Match our contributor dev version; see pyproject.toml
8787
architecture: ['x64']
8888

8989
steps:

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ build:
1010
tools:
1111
# If you change this, you also need to update .github/workflows/test.yml
1212
# to make sure doc test builds run on the same version.
13-
python: "3.10" # July 2024 | See autobuild info in pyproject.toml's dev dependencies
13+
python: "3.11" # July 2024 | See autobuild info in pyproject.toml's dev dependencies
1414

1515
python:
1616
install:

doc/conf.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ def run_util(filename, run_name="__main__", init_globals=None):
122122
runpy.run_path(full_str, **kwargs)
123123

124124

125-
# Temp fix for Sphinx not copying static files # pending: post-3.0 refactor
126-
# Enable by creating a .ENABLE_DEVMACHINE_SPHINX_STATIC_FIX
127-
run_util("sphinx_static_file_temp_fix.py")
128-
129125
# Make thumbnails for the example code screenshots
130126
run_util("generate_example_thumbnails.py")
131127
# Create a tabular representation of the resources with embeds

make.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
from contextlib import contextmanager
1818
from pathlib import Path
1919
from shutil import rmtree, which
20-
from typing import Union
20+
from typing import Union, Annotated, Optional
2121
from collections.abc import Generator
2222

23+
from typer import Option
24+
2325
PathLike = Union[Path, str, bytes]
2426

2527

@@ -171,23 +173,26 @@ def clean():
171173
os.remove(item) if os.path.isfile(item) else rmtree(item)
172174

173175

176+
JobsAnnotation = Annotated[Optional[str], Option(help="Specify a number of parallel build tasks (defaults no N_CORES)")]
177+
178+
174179
@app.command(rich_help_panel="Docs")
175-
def html():
180+
def html(jobs: JobsAnnotation = "auto"):
176181
"""
177182
Build the documentation (HTML)
178183
"""
179-
run_doc([SPHINX_BUILD, "-b", "html", *ALLSPHINXOPTS, f"{BUILD_DIR}/html"])
184+
run_doc([SPHINX_BUILD, "--jobs", jobs, "-b", "html", *ALLSPHINXOPTS, f"{BUILD_DIR}/html"])
180185
print()
181186
print(f"Build finished. The HTML pages are in {FULL_BUILD_DIR}/html.")
182187

183188

184189
@app.command(rich_help_panel="Docs")
185-
def serve():
190+
def serve(jobs: JobsAnnotation = "auto"):
186191
"""
187192
Build and serve the docs with automatic rebuilds and live reload.
188193
"""
189194
run_doc(
190-
[SPHINX_AUTOBUILD, *SPHINXAUTOBUILDOPTS, "-b", "html", *ALLSPHINXOPTS, f"{BUILD_DIR}/html"]
195+
[SPHINX_AUTOBUILD, *SPHINXAUTOBUILDOPTS, "--jobs", jobs, "-b", "html", *ALLSPHINXOPTS, f"{BUILD_DIR}/html"]
191196
)
192197

193198

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@ Book = "https://learn.arcade.academy"
3737
[project.optional-dependencies]
3838
# Used for dev work
3939
dev = [
40-
"sphinx==8.1.3", # April 2024 | Updated 2024-07-15, 7.4+ is broken with sphinx-autobuild
41-
"sphinx_rtd_theme==3.0.2", # Nov 2024
40+
# Python >= 3.11 required for development
41+
"sphinx==8.2.3", # May 2025 | Updated 2025-05-30
42+
"sphinx_rtd_theme", # Nov 2024
4243
"sphinx-rtd-dark-mode==1.3.0",
43-
"sphinx-autobuild==2024.10.3", # April 2024 | Due to this, Python 3.10+ is required to serve docs
44+
"sphinx-autobuild", # May 2025: Seems to work with latest Sphinx now
4445
"sphinx-copybutton==0.5.2", # April 2023
4546
"sphinx-sitemap==2.6.0", # April 2024
4647
"sphinx-togglebutton==0.3.2", # May 2025
4748
"pygments==2.19.1", # 2.18 has breaking changes in lexer
48-
"docutils==0.21.2", # ?
49+
"docutils==0.21.2", # Core sphinx dependency (ReST)
4950
# "pyyaml==6.0.1",
5051
# "readthedocs-sphinx-search==0.3.2",
5152
# "sphinx-autodoc-typehints==2.0.1",

util/sphinx_static_file_temp_fix.py

Lines changed: 0 additions & 140 deletions
This file was deleted.

0 commit comments

Comments
 (0)