Skip to content

Commit 2196199

Browse files
committed
deployment again
1 parent ef0f83d commit 2196199

6 files changed

Lines changed: 22 additions & 284 deletions

File tree

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Set up Python
3030
uses: actions/setup-python@v5
3131
with:
32-
python-version: "3.11"
32+
python-version: "3.12"
3333
cache: pip
3434
cache-dependency-path: docs/requirements.txt
3535

@@ -43,7 +43,7 @@ jobs:
4343
run: pip install --no-deps -e .
4444

4545
- name: Build HTML docs
46-
run: sphinx-build -b html docs docs/_build/html -W --keep-going
46+
run: sphinx-build -b html docs docs/_build/html --keep-going
4747
env:
4848
SPHINXOPTS: "-j auto"
4949

docs/conf.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ class _FakeDatasetDict(dict):
3232
sys.modules["datasets.arrow_dataset"] = MagicMock()
3333
sys.modules["datasets.dataset_dict"] = MagicMock()
3434

35+
# -- typing.override shim for Python < 3.12 ------------------------------------
36+
# `override` was added to `typing` in Python 3.12. The source uses it without
37+
# a try/except in some files, so we inject a no-op shim before importing.
38+
import typing as _typing
39+
if not hasattr(_typing, "override"):
40+
def _override(f): # type: ignore[return]
41+
return f
42+
_typing.override = _override # type: ignore[attr-defined]
43+
3544
# -- Project information -------------------------------------------------------
3645
project = "MMIRAGE"
3746
copyright = "2024, Meditron team"
@@ -44,8 +53,8 @@ class _FakeDatasetDict(dict):
4453
"sphinx.ext.napoleon",
4554
"sphinx.ext.viewcode",
4655
"sphinx.ext.intersphinx",
47-
"sphinx_autodoc_typehints",
4856
"myst_parser",
57+
"sphinx_design",
4958
]
5059

5160
templates_path = ["_templates"]
@@ -104,6 +113,15 @@ class _FakeDatasetDict(dict):
104113
napoleon_include_init_with_doc = True
105114
napoleon_attr_annotations = True
106115

116+
# Suppress noisy-but-benign warnings:
117+
# - duplicate member descriptions caused by __init__.py re-exports
118+
# - unresolvable forward refs in mocked type annotations
119+
suppress_warnings = [
120+
"ref.duplicate",
121+
"sphinx_autodoc_typehints.forward_reference",
122+
"myst.header",
123+
]
124+
107125
# -- Intersphinx ---------------------------------------------------------------
108126
intersphinx_mapping = {
109127
"python": ("https://docs.python.org/3", None),

docs/index.rst

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

docs/installation.rst

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

docs/quickstart.rst

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

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
sphinx>=7.0
22
furo>=2024.1.29
33
myst-parser>=3.0
4-
sphinx-autodoc-typehints>=2.0
4+
sphinx-design>=0.5
55
datasets>=3.0.0

0 commit comments

Comments
 (0)