3333 "sphinx.ext.autodoc" ,
3434 "sphinx.ext.viewcode" ,
3535 "sphinx.ext.intersphinx" ,
36- "myst_nb " ,
36+ "myst_parser " ,
3737 "sphinx_copybutton" ,
38- "sphinx_panels " ,
38+ "sphinx_design " ,
3939]
4040
41- # Add any paths that contain templates here, relative to this directory.
42- templates_path = ["_templates" ]
43-
4441# List of patterns, relative to source directory, that match files and
4542# directories to ignore when looking for source files.
4643# This pattern also affects html_static_path and html_extra_path.
4744exclude_patterns = ["_build" , "Thumbs.db" , ".DS_Store" ]
4845
46+ nitpicky = True
4947nitpick_ignore = [
5048 ("py:class" , "Match" ),
49+ ("py:class" , "Path" ),
5150 ("py:class" , "x in the interval [0, 1)." ),
5251 ("py:class" , "markdown_it.helpers.parse_link_destination._Result" ),
5352 ("py:class" , "markdown_it.helpers.parse_link_title._Result" ),
5453 ("py:class" , "MarkdownIt" ),
54+ ("py:class" , "RuleFunc" ),
5555 ("py:class" , "_NodeType" ),
5656 ("py:class" , "typing_extensions.Protocol" ),
5757]
7070 "repository_branch" : "master" ,
7171 "path_to_docs" : "docs" ,
7272}
73- panels_add_boostrap_css = False
73+ html_static_path = ["_static" ]
74+ html_css_files = ["custom.css" ]
7475
7576# Add any paths that contain custom static files (such as style sheets) here,
7677# relative to this directory. They are copied after the builtin static files,
@@ -100,7 +101,7 @@ def run_apidoc(app):
100101 this_folder = os .path .abspath (os .path .dirname (os .path .realpath (__file__ )))
101102 api_folder = os .path .join (this_folder , "api" )
102103 module_path = os .path .normpath (os .path .join (this_folder , "../" ))
103- ignore_paths = ["../setup .py" , "../conftest.py" , "../tests" , "../benchmarking" ]
104+ ignore_paths = ["../profiler .py" , "../conftest.py" , "../tests" , "../benchmarking" ]
104105 ignore_paths = [
105106 os .path .normpath (os .path .join (this_folder , p )) for p in ignore_paths
106107 ]
@@ -120,6 +121,7 @@ def run_apidoc(app):
120121
121122 argv = ["-M" , "--separate" , "-o" , api_folder , module_path ] + ignore_paths
122123
124+ apidoc .OPTIONS .append ("ignore-module-all" )
123125 apidoc .main (argv )
124126
125127 # we don't use this
@@ -131,3 +133,17 @@ def setup(app):
131133 """Add functions to the Sphinx setup."""
132134 if os .environ .get ("SKIP_APIDOC" , None ) is None :
133135 app .connect ("builder-inited" , run_apidoc )
136+
137+ from sphinx .directives .code import CodeBlock
138+
139+ class CodeCell (CodeBlock ):
140+ """Custom code block directive."""
141+
142+ def run (self ):
143+ """Run the directive."""
144+ self .options ["class" ] = ["code-cell" ]
145+ return super ().run ()
146+
147+ # note, these could be run by myst-nb,
148+ # but currently this causes a circular dependency issue
149+ app .add_directive ("code-cell" , CodeCell )
0 commit comments