mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-25 18:15:34 +00:00
Docs: Grouping changes
Keep techlibs folder hierarchy. techlibs/* and passes/* groups are now nested under index_techlibs and index_passes respectively, with most (all?) of the passes/* pages getting proper headings, as well as backends/frontends/kernel. `index_passes_techmap` also references `index_techlibs`. Split command reference toc in twain, one with maxdepth=2 and one with maxdepth=3, since passes and techlibs now have an extra level of nesting. Move the `cmd_ref` link to the command reference, instead of top of the page. Remove `index_internal` and `index_other` from the toc, and mark the pages as orphan. Internal commands get a note callout after the command reference toc (although this doesn't work for the pdf build), while other commands are linked in the warning for missing `source_location` (since that *should* be the only time when there are any commands in the "unknown" group). Update autodoc extension versions, and mark the directives extension as not `parallel_read_safe` (it might be, but I'm not sure about how the xref lookups work if it is parallel so better to be safe).
This commit is contained in:
parent
598b41406c
commit
a74aeb1301
41 changed files with 183 additions and 41 deletions
|
@ -228,13 +228,20 @@ class YosysCmdGroupDocumenter(Documenter):
|
|||
|
||||
sourcename = self.get_sourcename()
|
||||
|
||||
if not self.import_object():
|
||||
imported_object = self.import_object();
|
||||
if self.lib_key == 'groups' and self.name == 'unknown':
|
||||
if imported_object:
|
||||
logger.warning(f"Found commands assigned to group {self.name}: {[x[0] for x in self.object]}", type='cmdref')
|
||||
else:
|
||||
return
|
||||
elif not imported_object:
|
||||
log_msg = f"unable to load {self.name} with {type(self)}"
|
||||
if self.lib_key == 'groups':
|
||||
logger.info(log_msg, type = 'cmdref')
|
||||
self.add_line(f'.. warning:: No commands found for group {self.name!r}', sourcename)
|
||||
self.add_line('', sourcename)
|
||||
self.add_line(' Documentation may have been built without ``source_location`` support.', sourcename)
|
||||
self.add_line(' Try check :doc:`/cmd/index_other`.', sourcename)
|
||||
else:
|
||||
logger.warning(log_msg, type = 'cmdref')
|
||||
return
|
||||
|
@ -401,6 +408,6 @@ def setup(app: Sphinx) -> dict[str, Any]:
|
|||
app.add_autodocumenter(YosysCmdGroupDocumenter)
|
||||
app.add_autodocumenter(YosysCmdDocumenter)
|
||||
return {
|
||||
'version': '1',
|
||||
'version': '2',
|
||||
'parallel_read_safe': True,
|
||||
}
|
||||
|
|
|
@ -735,4 +735,7 @@ def setup(app: Sphinx):
|
|||
|
||||
app.add_role('autoref', autoref)
|
||||
|
||||
return {'version': '0.2'}
|
||||
return {
|
||||
'version': '0.3',
|
||||
'parallel_read_safe': False,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue