From a2d17566b0179d4f0b77a5ed7d4306a33e9f804b Mon Sep 17 00:00:00 2001 From: Avram Lubkin Date: Sun, 15 Jan 2023 12:35:36 -0500 Subject: [PATCH] Update sphinx configuration --- doc/conf.py | 3 ++- setup.cfg | 2 ++ setup_helpers.py | 3 +++ tox.ini | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 5b8a00d..23c4e32 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -60,7 +60,8 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +# html_static_path = ['_static'] +html_static_path = [''] # Remove static path since we have no files htmlhelp_basename = 'prefixed' intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/setup.cfg b/setup.cfg index f80afad..3172594 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,6 +28,8 @@ source-dir = doc build-dir = build/doc all_files = True fresh-env = True +warning-is-error = 1 +keep-going = 1 [aliases] spelling=build_sphinx --builder spelling diff --git a/setup_helpers.py b/setup_helpers.py index 20314b9..463e611 100644 --- a/setup_helpers.py +++ b/setup_helpers.py @@ -68,6 +68,9 @@ def print_all_spelling_errors(path): """ rtn = 0 + if not os.path.isdir(path): + return rtn + for filename in os.listdir(path): if print_spelling_errors(os.path.join(path, filename)): rtn = 1 diff --git a/tox.ini b/tox.ini index 3bdcf8c..45205cd 100644 --- a/tox.ini +++ b/tox.ini @@ -94,6 +94,6 @@ deps = commands= {envpython} setup_helpers.py spelling-clean - {envpython} setup.py spelling + sphinx-build -vWEa --keep-going -b spelling doc build/doc {envpython} setup_helpers.py spelling - {envpython} setup.py html + sphinx-build -vWEa --keep-going -b html doc build/doc