Fix documentation build and complete API documentation coverage - #632
Merged
Conversation
Both documentation builds were broken and the generated output was
incomplete and in places actively wrong.
Build setup
-----------
* Run Sphinx as `${Python3_EXECUTABLE} -m sphinx` instead of whichever
sphinx-build happens to be first on PATH. hal_py is linked against
that interpreter, so an unrelated sphinx-build crashed the pydoc
target on import. Configure now fails early with an actionable hint
that also covers PEP 668 interpreters.
* Import hal_py in conf.py before autodoc touches a plugin module.
Without it the plugin bindings fail with "referenced unknown base
type hal::BasePluginInterface" and boolean_influence, dataflow and
module_identification produced empty pages.
* Pass the rst files to `cmake -E copy_if_different` explicitly; the
previous '*.rst' glob only worked by accident on shell-based
generators.
* Drop `-q` from the Sphinx invocation so warnings are no longer hidden.
* Doxyfile: drop 16 obsolete tags, replace the stale INPUT list (which
still named a plugin removed years ago while missing 17 existing
ones) with the plugin tree plus excludes, remove *.txt from
FILE_PATTERNS so CMakeLists.txt is no longer parsed as C, set
EXPAND_ONLY_PREDEF together with the Qt and visibility macros, and
derive HAVE_DOT/DOT_PATH from find_package.
Doxygen warnings are down from 295 to 2, Sphinx from 15 to 0.
Documentation content
---------------------
* Every namespace, class and struct now has a full-sentence description
of what it is.
* Fix parameter names that did not match the code, missing and surplus
@PARAM entries, documented return values on void functions, and
several doc comments that described an entirely different function.
* Keep the C++ comments and the pybind11 docstrings in sync, modulo
language-appropriate spellings (list/dict vs vector/map, True/False
vs true/false, None vs nullptr).
* Put true/false/nullptr, None/True/False and file extensions in code
markup, and make every "@returns `true` if ..." state the false case.
* Add the Sphinx pages that were missing entirely, among them
AsyncSetResetBehavior, MACComponent, LogManager, ProjectDirectory and
the base pin classes.
API-visible changes
-------------------
These were needed to make the documentation true, and reviewers should
be aware of them:
* hal_py: log_trace/debug/info/warning/error/critical are now available;
they take the channel first, like the C++ macros, so the previous
one-argument log_info(message) becomes log_info(channel, message).
All in-tree callers are updated.
* hal_py.BooleanFunction.nodes is a read-only property instead of a
method, which is what its docstring always claimed.
* GateLibrary.get_gate_location_data_identifiers was registered under
the name of the category getter and was therefore unreachable.
* Keyword arguments corrected: GateType.add_boolean_function(name),
GateType.has_property(property), Module.contains_module(recursive),
NetlistFactory.load_netlist_from_string(netlist_string).
* Rename DotViewerCallFromTread to DotViewerCallFromThread.
* xilinx_toolbox::LOC members are default-initialised; the XDC parser
leaves them untouched for pin LOCs.
* GateLibrary::add_include and z3_utils::from_bf /
value_from_binary_string parameters renamed for consistency.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
julianspeith
requested review from
SimonKlx,
joern274,
nils1603 and
swallat
as code owners
August 11, 2026 14:04
The file had drifted from the tree: two of its rules pointed at directories that no longer exist and fifteen plugins had no entry at all, so they fell through to the catch-all rule. Since the code owner mechanism is not used the way it is meant to be, remove the file rather than maintain a stale mapping. Note that "Require review from Code Owners" is still enabled in the branch protection of master. Without a CODEOWNERS file nothing matches, so the setting has no effect any more and can be switched off separately. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both documentation builds were broken and the generated output was incomplete and in places actively wrong. This fixes the build, then works through the content.
Doxygen warnings: 295 → 2. Sphinx warnings: 15 → 0.
Build setup
${Python3_EXECUTABLE} -m sphinxrather than whicheversphinx-buildis first onPATH.hal_pyis linked against that interpreter, so an unrelatedsphinx-buildsegfaulted thepydoctarget on import. Configure now fails early with an actionable hint that also covers PEP 668 interpreters.hal_pyinconf.pybefore autodoc touches a plugin module. Without it the plugin bindings fail with "referenced unknown base type hal::BasePluginInterface", andboolean_influence,dataflowandmodule_identificationproduced empty pages.cmake -E copy_if_differentexplicitly; the*.rstglob only worked by accident on shell-based generators.-qfrom the Sphinx invocation so warnings stop being hidden.INPUTlist (which still named a plugin removed years ago while missing 17 existing ones) with the plugin tree plus excludes; remove*.txtfromFILE_PATTERNSso everyCMakeLists.txtstops being parsed as C; setEXPAND_ONLY_PREDEFwith the Qt and visibility macros (Q_DECLARE_METATYPEand__attribute__were silently swallowing whole classes); deriveHAVE_DOT/DOT_PATHfromfind_package.Documentation content
@paramentries, documented return values onvoidfunctions, and several doc comments that described an entirely different function.list/dictvsvector/map,True/Falsevstrue/false,Nonevsnullptr).true/false/nullptr,None/True/Falseand file extensions are in code markup, and every@returns `true` if ...states the false case.AsyncSetResetBehavior,MACComponent,LogManager,ProjectDirectory, the base pin classes and the logging functions.API-visible changes
Needed to make the documentation true — worth a careful look:
hal_py.log_trace/debug/info/warning/error/criticallog_info(message)→log_info(channel, message). All in-tree callers updated.hal_py.BooleanFunction.nodesGateLibrary.get_gate_location_data_identifiersGateType.add_boolean_function(name),GateType.has_property(property),Module.contains_module(recursive),NetlistFactory.load_netlist_from_string(netlist_string).DotViewerCallFromTreadDotViewerCallFromThread.xilinx_toolbox::LOCGateLibrary::add_include,z3_utils::from_bf,z3_utils::value_from_binary_string.Verification
-DBUILD_ALL_PLUGINS=ON: exit 0, no compile errors.boolean_function_table_model.cpp.masterwith comments and docstring bodies stripped: only the 22 files listed above differ in actual code.Note:
tests/python_binding/test_netlist.pyhas a pre-existing syntax error andtest_gate_library.pyreferences APIs removed long ago; both are untouched here.