Skip to content

Commit 0a9f77b

Browse files
robtaylorclaude
andcommitted
Fix autoapi configuration
- Disable autoapi_add_toctree_entry to prevent warnings about non-existent chipflow-lib/autoapi/index document - Add post-copy processing to include autoapi-generated indices (chipflow/index and chipflow_lib/index) in the chipflow-lib toctree - This properly integrates the auto-generated API documentation into the navigation while avoiding the toctree reference errors Remaining warnings (18) are from docstring formatting issues in chipflow-lib source code that would need to be fixed upstream. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4f7e4cc commit 0a9f77b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/source/conf.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,22 @@
115115
if platform_api_path.exists():
116116
platform_api_path.write_text(platform_api_content)
117117

118+
# Add autoapi toctree to chipflow-lib index
119+
chipflow_lib_index_path = Path('chipflow-lib/index.rst')
120+
if chipflow_lib_index_path.exists():
121+
content = chipflow_lib_index_path.read_text()
122+
if 'autoapi/chipflow/index' not in content:
123+
# Add API Reference section pointing directly to autoapi-generated indices
124+
content += """
125+
.. toctree::
126+
:maxdepth: 2
127+
:caption: API Reference
128+
129+
autoapi/chipflow/index
130+
autoapi/chipflow_lib/index
131+
"""
132+
chipflow_lib_index_path.write_text(content)
133+
118134
# -- Project information
119135

120136
project = 'ChipFlow'
@@ -192,6 +208,7 @@
192208
'imported-members',
193209
]
194210
autoapi_root = "chipflow-lib/autoapi"
211+
autoapi_add_toctree_entry = False # Don't auto-add to toctree (we link manually)
195212

196213
# Exclude autoapi templates and in-progress stuff
197214
exclude_patterns = [

0 commit comments

Comments
 (0)