Skip to content

Commit c808c61

Browse files
committed
Disable documentation generation for undocumented api and fix some doc generation issues
1 parent eb26ca1 commit c808c61

File tree

4 files changed

+182
-206
lines changed

4 files changed

+182
-206
lines changed

docs/conf.py

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# Add parent folder to path so we can pick up module
55
import os
66
import sys
7+
from pprint import pformat
8+
79
sys.path.insert(0, os.path.abspath('../../chipflow_lib'))
810

911
from chipflow_lib import __version__
@@ -25,51 +27,39 @@
2527
# -- General configuration
2628

2729
extensions = [
28-
'sphinx.ext.duration',
29-
'sphinx.ext.doctest',
3030
'sphinx.ext.autodoc',
31+
'sphinx.ext.autodoc.typehints',
32+
'sphinx.ext.doctest',
33+
'sphinx.ext.duration',
3134
'sphinx.ext.intersphinx',
35+
'sphinx.ext.napoleon',
3236
'autoapi.extension',
33-
'sphinx.ext.napoleon'
3437
]
3538

36-
html_theme = 'sphinx_book_theme'
39+
html_theme = 'furo'
3740
html_logo = '_static/chipflow-logo.svg'
3841
html_title = "ChipFlow Platform Documentation"
3942

40-
41-
html_sidebars = {
42-
'**': [
43-
'relations.html', # needs 'show_related': True theme option to display
44-
'searchbox.html',
45-
]
46-
}
47-
48-
html_static_path = ['_static']
49-
50-
html_theme_options = {
51-
"home_page_in_toc": True,
52-
"repository_url": "https://github.com/ChipFlow/chipflow-lib",
53-
"repository_branch": "master",
54-
"path_to_docs": "docs",
55-
"use_repository_button": True,
56-
"use_edit_page_button": True,
57-
"use_issues_button": True,
58-
"show_navbar_depth": 3,
59-
# "announcement": "<b>v3.0.0</b> is now out! See the Changelog for details",
60-
}
61-
6243
autodoc_typehints = 'description'
6344

64-
autoapi_dirs = ["../chipflow_lib"]
45+
autoapi_dirs = [
46+
"../chipflow_lib/platforms",
47+
"../chipflow_lib",
48+
]
49+
autoapi_generate_api_docs = True
50+
autoapi_template_dir = "_templates/autoapi"
51+
# autoapi_verbose_visibility = 2
52+
autoapi_keep_files = True
6553
autoapi_options = [
6654
'members',
67-
'undoc-members',
6855
'show-inheritance',
6956
'show-module-summary',
7057
'imported-members',
7158
]
7259

60+
# Exclude autoapi templates
61+
exclude_patterns = [autoapi_template_dir]
62+
7363
intersphinx_mapping = {
7464
'py': ('https://docs.python.org/3/', None),
7565
'amaranth': ('https://amaranth-lang.org/docs/amaranth/v0.5.4/', None),

docs/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ ChipFlow Library Documentation
1111
1212
1313
.. toctree::
14+
:maxdepth: 2
15+
:caption: Contents:
1416

1517
chipflow-toml-guide
16-
18+
autoapi/index

0 commit comments

Comments
 (0)