@@ -99,14 +99,15 @@ def extract_pyproject_metadata():
9999 "sphinx.ext.autodoc" ,
100100 "sphinx.ext.autosummary" ,
101101 "sphinx.ext.autosectionlabel" ,
102- "numpydoc" ,
102+ "sphinx.ext.napoleon" , # replaces numpydoc - supports custom sections
103103 "sphinx.ext.intersphinx" ,
104104 "sphinx.ext.linkcode" , # link to GitHub source code via linkcode_resolve()
105105 "myst_parser" ,
106106 "sphinx_copybutton" ,
107107 "sphinx_design" ,
108108 "sphinx_issues" ,
109109 "sphinx.ext.doctest" ,
110+ "sphinxcontrib.mermaid" ,
110111]
111112
112113# Recommended by sphinx_design when using the MyST Parser
@@ -151,15 +152,34 @@ def extract_pyproject_metadata():
151152# The name of the Pygments (syntax highlighting) style to use.
152153pygments_style = "sphinx"
153154
154- # see http://stackoverflow.com/q/12206334/562769
155- numpydoc_show_class_members = True
156- # this is needed for some reason...
157- # see https://github.com/numpy/numpydoc/issues/69
158- numpydoc_class_members_toctree = False
159-
160- # https://numpydoc.readthedocs.io/en/latest/validation.html#built-in-validation-checks
161- # Let's turn off the check for building but keep it in pre-commit hooks
162- numpydoc_validation_checks = set ()
155+ # Napoleon settings (replaces numpydoc)
156+ # https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html
157+ napoleon_google_docstring = False
158+ napoleon_numpy_docstring = True
159+ napoleon_include_init_with_doc = False
160+ napoleon_include_private_with_doc = False
161+ napoleon_include_special_with_doc = True
162+ napoleon_use_admonition_for_examples = False
163+ napoleon_use_admonition_for_notes = False
164+ napoleon_use_admonition_for_references = False
165+ napoleon_use_ivar = False
166+ napoleon_use_param = True
167+ napoleon_use_rtype = True
168+ napoleon_preprocess_types = False
169+ napoleon_type_aliases = None
170+ napoleon_attr_annotations = True
171+
172+ # Custom sections for engineering and other specialized functions
173+ # These sections appear in docstrings but aren't standard numpydoc sections
174+ napoleon_custom_sections = [
175+ "Problem Description" ,
176+ "Design Variables" ,
177+ "Objective Function" ,
178+ "Constraints" ,
179+ "Search Domain" ,
180+ "Global Optimum" ,
181+ "Landscape Properties" ,
182+ ]
163183
164184# generate autosummary even if no references
165185autosummary_generate = True
@@ -401,7 +421,7 @@ def adds(pth):
401421 sys .path .insert (0 , str (_generators_path .parent ))
402422
403423try :
404- from docs ._generators import get_all_test_functions , count_by_category , get_total_count
424+ from docs ._generators import count_by_category , get_all_test_functions , get_total_count
405425
406426 _categories = get_all_test_functions ()
407427 _counts = count_by_category (_categories )
0 commit comments