From 27d4fad0f5eb42d770bb13e0a02a48bfa5b9395e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 20 Jul 2024 11:13:43 -0500 Subject: [PATCH 1/2] This extension is safe to run in parallel A warning about this was printed during `make html` locally. --- docs/_ext/custom_autodoc.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/_ext/custom_autodoc.py b/docs/_ext/custom_autodoc.py index 4242a9d..74a43c0 100644 --- a/docs/_ext/custom_autodoc.py +++ b/docs/_ext/custom_autodoc.py @@ -40,3 +40,8 @@ def setup(app: Sphinx) -> None: "autodoc-process-docstring", remove_first_line_in_module_docstring, ) + + return { + "parallel_read_safe": True, + "parallel_write_safe": True, + } From 5a1101fc6cab14620ecd264668bf8b3ee3d8f949 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 20 Jul 2024 11:14:26 -0500 Subject: [PATCH 2/2] Show version string |version| was substituted into the main document title, but version= was never set; the default was empty. --- docs/conf.py | 3 ++- requirements-dev.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 5b874aa..723a41c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,6 +15,7 @@ import os import sys import pathlib +import subprocess sys.path.insert(0, str(pathlib.Path(__file__).parent.parent)) sys.path.append(str(pathlib.Path(__file__).parent / "_ext")) @@ -34,7 +35,7 @@ author = 'Jeff Epler' # The full version, including alpha/beta/rc tags -release = '1.1.0' +version = release = subprocess.check_output(["python", "-m", "setuptools_scm"], cwd="..", encoding="ascii").strip() # -- General configuration --------------------------------------------------- diff --git a/requirements-dev.txt b/requirements-dev.txt index bc7e9e4..3d25a4c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,6 +7,7 @@ coverage mypy; implementation_name=="cpython" pre-commit setuptools>=45 +setuptools_scm[toml]>=6.0 sphinx sphinx-autodoc-typehints sphinx-rtd-theme