|
4 | 4 | # Add parent folder to path so we can pick up module |
5 | 5 | import os |
6 | 6 | import sys |
| 7 | +from pprint import pformat |
| 8 | + |
7 | 9 | sys.path.insert(0, os.path.abspath('../../chipflow_lib')) |
8 | 10 |
|
9 | 11 | from chipflow_lib import __version__ |
|
25 | 27 | # -- General configuration |
26 | 28 |
|
27 | 29 | extensions = [ |
28 | | - 'sphinx.ext.duration', |
29 | | - 'sphinx.ext.doctest', |
30 | 30 | 'sphinx.ext.autodoc', |
| 31 | + 'sphinx.ext.autodoc.typehints', |
| 32 | + 'sphinx.ext.doctest', |
| 33 | + 'sphinx.ext.duration', |
31 | 34 | 'sphinx.ext.intersphinx', |
| 35 | + 'sphinx.ext.napoleon', |
32 | 36 | 'autoapi.extension', |
33 | | - 'sphinx.ext.napoleon' |
34 | 37 | ] |
35 | 38 |
|
36 | | -html_theme = 'sphinx_book_theme' |
| 39 | +html_theme = 'furo' |
37 | 40 | html_logo = '_static/chipflow-logo.svg' |
38 | 41 | html_title = "ChipFlow Platform Documentation" |
39 | 42 |
|
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 | | - |
62 | 43 | autodoc_typehints = 'description' |
63 | 44 |
|
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 |
65 | 53 | autoapi_options = [ |
66 | 54 | 'members', |
67 | | - 'undoc-members', |
68 | 55 | 'show-inheritance', |
69 | 56 | 'show-module-summary', |
70 | 57 | 'imported-members', |
71 | 58 | ] |
72 | 59 |
|
| 60 | +# Exclude autoapi templates |
| 61 | +exclude_patterns = [autoapi_template_dir] |
| 62 | + |
73 | 63 | intersphinx_mapping = { |
74 | 64 | 'py': ('https://docs.python.org/3/', None), |
75 | 65 | 'amaranth': ('https://amaranth-lang.org/docs/amaranth/v0.5.4/', None), |
|
0 commit comments