|
5 | 5 | from anypytools import __version__ as ANYPYTOOLS_VERSION |
6 | 6 |
|
7 | 7 | # load extensions |
8 | | -extensions = ["myst_nb", "autodoc2", "sphinx.ext.intersphinx", "sphinx.ext.napoleon", "sphinx_design" |
| 8 | +extensions = [ |
| 9 | + "myst_nb", |
| 10 | + "autodoc2", |
| 11 | + "sphinx.ext.intersphinx", |
| 12 | + "sphinx.ext.autosummary", |
| 13 | + "sphinx.ext.napoleon", |
| 14 | + "sphinx_design" |
| 15 | +] |
| 16 | + |
| 17 | + |
| 18 | +autodoc2_packages = [ |
| 19 | + "../anypytools", |
| 20 | +] |
9 | 21 |
|
| 22 | +autodoc2_output_dir = "api" |
| 23 | +autodoc2_render_plugin = "rst" |
10 | 24 |
|
| 25 | +autodoc2_module_all_regexes = [ |
| 26 | + r"anypytools\..*", |
11 | 27 | ] |
12 | 28 |
|
| 29 | + |
| 30 | +nitpick_ignore = [ |
| 31 | + ('py:class', 'optional'), |
| 32 | + ('py:class', 'np.ndarray'), |
| 33 | + ] |
| 34 | + |
| 35 | + |
| 36 | +# autodoc2_render_plugin = "myst" |
| 37 | + |
| 38 | +# autodoc2_hidden_objects = ["dunder", "inherited"] |
| 39 | +autodoc2_replace_annotations = [ |
| 40 | + ("re.Pattern", "typing.Pattern"), |
| 41 | + ("markdown_it.MarkdownIt", "markdown_it.main.MarkdownIt"), |
| 42 | +] |
| 43 | +autodoc2_replace_bases = [ |
| 44 | + ("sphinx.directives.SphinxDirective", "sphinx.util.docutils.SphinxDirective"), |
| 45 | +] |
| 46 | + |
| 47 | +napoleon_use_ivar = True |
| 48 | + |
| 49 | +# Napoleon settings for NumPy-style |
| 50 | +napoleon_google_docstring = False |
| 51 | +napoleon_numpy_docstring = True |
| 52 | +napoleon_use_admonition_for_notes = False |
| 53 | + |
| 54 | + |
13 | 55 | intersphinx_mapping = { |
14 | 56 | "python": ("https://docs.python.org/3/", None), |
15 | 57 | "sphinx": ("https://www.sphinx-doc.org/en/master", None), |
|
106 | 148 | "doc_path": "docs", |
107 | 149 | } |
108 | 150 |
|
109 | | - |
110 | | -autodoc2_packages = [ |
111 | | - { |
112 | | - "path": "../anypytools", |
113 | | - # "exclude_files": ["_docs.py"], |
114 | | - } |
115 | | -] |
116 | | - |
117 | | -autodoc2_module_all_regexes = [ |
118 | | - r"anypytools\..*", |
119 | | -] |
120 | | - |
121 | | - |
122 | | -autodoc2_render_plugin = "myst" |
123 | | - |
124 | | -# autodoc2_hidden_objects = ["dunder", "inherited"] |
125 | | -autodoc2_replace_annotations = [ |
126 | | - ("re.Pattern", "typing.Pattern"), |
127 | | - ("markdown_it.MarkdownIt", "markdown_it.main.MarkdownIt"), |
128 | | -] |
129 | | -autodoc2_replace_bases = [ |
130 | | - ("sphinx.directives.SphinxDirective", "sphinx.util.docutils.SphinxDirective"), |
131 | | -] |
132 | 151 | # autodoc2_docstring_parser_regexes = [ |
133 | 152 | # ("myst_parser", "myst"), |
134 | 153 | # (r"myst_parser\.setup", "myst"), |
|
0 commit comments