From 24d0e4530d11ecb2645c663c4e18a712a7850fde Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Tue, 10 Sep 2024 15:07:44 +0200 Subject: [PATCH] Drop inheritance diagrams --- doc/conf.py | 18 +++++++++++++++--- doc/generate_modules.py | 7 ------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 4fa493ca77..f8580279c8 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -82,15 +82,27 @@ "announcement": announcement_text, } -extensions += [ - 'sphinx.ext.napoleon', + +extensions = [ + 'myst_nb', + 'sphinx_design', + 'sphinx.ext.autodoc', + 'sphinx.ext.doctest', + 'sphinx.ext.intersphinx', + 'sphinx.ext.coverage', + 'sphinx.ext.mathjax', + 'sphinx.ext.ifconfig', + 'sphinx.ext.linkcode', + 'sphinx_copybutton', + 'sphinxext.rediraffe', 'nbsite.gallery', 'nbsite.pyodide', 'nbsite.analytics', - 'sphinx_copybutton', ] napoleon_numpy_docstring = True +autodoc_mock_imports = ["panel.pane.vtk"] + myst_enable_extensions = ["colon_fence", "deflist"] gallery_endpoint = 'panel-gallery-dev' if is_dev else 'panel-gallery' diff --git a/doc/generate_modules.py b/doc/generate_modules.py index 07411c62ec..0ec9bfb8ae 100644 --- a/doc/generate_modules.py +++ b/doc/generate_modules.py @@ -78,16 +78,10 @@ def format_directive(module, package=None): directive += ' :%s:\n' % option return directive -def format_inheritance_diagram(module, package=None): - """Create the inheritance_diagram directive and add the options.""" - directive = '.. inheritance-diagram:: %s\n' % makename(package, module) - return directive - def create_module_file(package, module, opts): """Build the text of the file and write the file.""" text = format_heading(1, '%s Module' % module) - text += format_inheritance_diagram(package, module) text += format_heading(2, ':mod:`%s` Module' % module) text += format_directive(module, package) write_file(makename(package, module), text, opts) @@ -109,7 +103,6 @@ def create_package_file(root, master_package, subroot, py_files, opts, subs): else: heading = ':mod:`%s` Module' % py_file text += format_heading(2, heading) - text += format_inheritance_diagram(is_package and subroot or py_path, master_package) text += '\n\n' text += format_directive(is_package and subroot or py_path, master_package) text += '\n-------\n\n'