-
Notifications
You must be signed in to change notification settings - Fork 326
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
update ReadTheDocs settings file #2083
Changes from all commits
c1130c5
d357357
813b30e
90a5322
e11d83b
9049650
4396f95
55389e4
071317b
b3addeb
ce874ec
e5edd7d
e24a735
8e6d749
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: 2 | ||
|
||
formats: | ||
- htmlzip | ||
|
||
# build with latest available ubuntu version | ||
build: | ||
os: ubuntu-lts-latest | ||
tools: | ||
python: "3.12" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto, no reason to build on an old Py version |
||
# need to install playwright deps via apt (lack of sudo means we can't use | ||
# `playwright install-deps`). NB: Graphviz is a separate dep urelated to playwright | ||
apt_packages: | ||
- graphviz | ||
- libasound2 | ||
- libdbus-glib-1-2 | ||
jobs: | ||
# build the gallery of themes before building the doc | ||
post_install: | ||
- pip install playwright | ||
- playwright install chromium | ||
drammock marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- python ./docs/scripts/generate_gallery_images.py | ||
|
||
sphinx: | ||
configuration: docs/conf.py | ||
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this bit is now required, and our builds will start failing in January without it. |
||
# builder: "dirhtml" | ||
fail_on_warning: false # we have some unavoidable warnings, and a separate warnings checker | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- doc | ||
Comment on lines
+32
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the recommended way to do what we were doing before with |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -291,6 +291,27 @@ | |
autoapi_root = "api" | ||
autoapi_member_order = "groupwise" | ||
|
||
# -- Warnings / Nitpicky ------------------------------------------------------- | ||
|
||
nitpicky = True | ||
bad_classes = ( | ||
r".*abc def.*", # urllib.parse.unquote_to_bytes | ||
r"api_sample\.RandomNumberGenerator", | ||
r"bs4\.BeautifulSoup", | ||
r"docutils\.nodes\.Node", | ||
r"matplotlib\.artist\.Artist", # matplotlib xrefs are in the class diagram demo | ||
r"matplotlib\.figure\.Figure", | ||
r"matplotlib\.figure\.FigureBase", | ||
r"pygments\.formatters\.HtmlFormatter", | ||
) | ||
nitpick_ignore_regex = [ | ||
*[("py:class", target) for target in bad_classes], | ||
# we demo some `urllib` docs on our site; don't care that its xrefs fail to resolve | ||
("py:obj", r"urllib\.parse\.(Defrag|Parse|Split)Result(Bytes)?\.(count|index)"), | ||
# the kitchen sink pages include some intentional errors | ||
("token", r"(suite|expression|target)"), | ||
] | ||
Comment on lines
+296
to
+313
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This captures all of the unavoidable "reference target not found" warnings that sphinx generates when (even with this, there are still ~15 warnings that are always generated, but they're not sphinx xref errors, so can't be dealt with by the |
||
|
||
# -- application setup ------------------------------------------------------- | ||
|
||
|
||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,8 +30,8 @@ def check_warnings(file: Path) -> bool: | |
print("\n=== Sphinx Warnings test ===\n") | ||
|
||
# find the file where all the known warnings are stored | ||
warning_file = Path(__file__).parent.parent / "warning_list.txt" | ||
extra_warning_file = Path(__file__).parent.parent / "intermittent_warning_list.txt" | ||
warning_file = Path(__file__).parents[1] / "warning_list.txt" | ||
extra_warning_file = Path(__file__).parents[1] / "intermittent_warning_list.txt" | ||
Comment on lines
+33
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unrelated simplification, noticed in passing |
||
|
||
received_warnings = escape_ansi(file.read_text()).strip().split("\n") | ||
expected_warnings = warning_file.read_text().strip().split("\n") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,7 @@ extras = {[testenv:docs-no-checks]extras} | |
deps = | ||
py39-sphinx61-docs: sphinx~=6.1.0 | ||
commands = | ||
sphinx-build -b html docs/ docs/_build/html -v -w warnings.txt {posargs} | ||
sphinx-build -b html docs/ docs/_build/html -nTv -w warnings.txt {posargs} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
python tests/utils/check_warnings.py | ||
|
||
# recommended for local development, this command will build the PST documentation | ||
|
@@ -122,7 +122,7 @@ set_env = PYDEVD_DISABLE_FILE_VALIDATION=1 | |
extras = {[testenv:docs-no-checks]extras} | ||
package = editable | ||
commands = | ||
sphinx-build -b html docs/ docs/_build/html -v -w warnings.txt {posargs} | ||
sphinx-build -b html docs/ docs/_build/html -nTv -w warnings.txt {posargs} | ||
python tests/utils/check_warnings.py | ||
|
||
# build the docs with live-reload, if you are working on the docs only (no theme changes) the best option is to call | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this just seems like common sense