Skip to content

Commit ef1f120

Browse files
committed
Prevent ReadTheDocs to run every notebook from scratcg
1 parent 68158ac commit ef1f120

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

docs/conf.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@
1515

1616
# -- General configuration ---------------------------------------------------
1717

18+
# Mock imports to avoid import errors during documentation build
19+
autodoc_mock_imports = [
20+
"torch",
21+
"transformers",
22+
"pandas",
23+
"numpy",
24+
"scipy",
25+
"sklearn",
26+
"matplotlib",
27+
"seaborn",
28+
"plotly",
29+
]
30+
1831
extensions = [
1932
"sphinx.ext.autodoc", # Core extension for generating documentation from docstrings
2033
"sphinx.ext.autodoc.typehints", # Automatically document type hints in function signatures
@@ -27,8 +40,10 @@
2740
]
2841

2942
# https://myst-nb.readthedocs.io/en/latest/computation/execute.html
30-
nb_execution_mode = "auto"
31-
nb_execution_timeout = -1 # -1 means no timeout
43+
nb_execution_mode = "off" # setting off to avoid notebooks to be runned
44+
nb_execution_timeout = (
45+
-1
46+
) # -1 means no timeout (after 15 minutes it times out regardless of this setting)
3247
myst_enable_extensions = ["dollarmath", "amsmath"]
3348

3449
# Plotly support through require javascript library
@@ -79,9 +94,7 @@
7994
"use_edit_page_button": True,
8095
"use_repository_button": True,
8196
"use_download_button": True,
82-
"launch_buttons": {
83-
"colab_url": "https://colab.research.google.com"
84-
},
97+
"launch_buttons": {"colab_url": "https://colab.research.google.com"},
8598
"navigation_with_keys": False,
8699
}
87100

0 commit comments

Comments
 (0)