diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 80d4c1ad..353f1bc3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -85,6 +85,7 @@ jobs: cache: "pip" cache-dependency-path: "pyproject.toml" - name: Install fonts + # This is required until sphinx-opengraph fixes their fallback run: sudo apt-get install -y fonts-roboto - name: Install dependencies @@ -106,11 +107,12 @@ jobs: shell: python run: | from pathlib import Path + import re text = Path("./warnings.txt").read_text().strip() - expected_warning_snippets = ["kitchen-sink", "urllib/parse.py"] + expected_warning_patterns = [r"kitchen\-sink", r"urllib/parse\.py", r"Glyph 10024 .*? missing from current font"] print("\n=== Sphinx Warnings ===\n\n" + text) # Print just for reference so we can look at the logs - unexpected = [ii for ii in text.split("\n") if not any(snippet in ii for snippet in expected_warning_snippets)] - assert len(unexpected) == 0 + unexpected = [l for l in text.splitlines() if not any(re.search(p, ii) for p in expected_warning_patterns)] + assert len(unexpected) == 0, unexpected - name: Audit with Lighthouse uses: treosh/lighthouse-ci-action@10.1.0 diff --git a/docs/conf.py b/docs/conf.py index 891ebfa2..c050d7d2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,7 +2,6 @@ import os from urllib.request import urlopen from pathlib import Path -import warnings project = "Sphinx Book Theme" copyright = "2023" @@ -36,11 +35,6 @@ "sphinx.ext.todo", ] -# Ignore Glyph 10024 (\N{SPARKLES}) missing from current font from "sphinxext.opengraph" -warnings.filterwarnings( - "ignore", "Glyph 10024 .*? missing from current font", UserWarning -) - # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"]