sphinx_hwt package¶
Submodules¶
sphinx_hwt.directive_autodoc module¶
- class sphinx_hwt.directive_autodoc.HwtAutodocDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)¶
Bases:
HwtSchematicDirective
- run()¶
Can not use multiple hwt-autodoc/hwt-schematic/hwt-params/hwt-interfaces in a single class
- sphinx_hwt.directive_autodoc.setup(app: Sphinx)¶
sphinx_hwt.directive_buildreport module¶
- class sphinx_hwt.directive_buildreport.BuildreportPaths¶
Bases:
object
Container of the paths for buildreport directives
- SQLICON_PATH = '/home/docs/checkouts/readthedocs.org/user_builds/sphinx-hwt/checkouts/latest/sphinx_hwt/html/sql.png'¶
- classmethod get_db_file_dst_absolute(state)¶
- classmethod get_db_file_dst_absolute_from_env(env)¶
- classmethod get_db_file_dst_uri(state)¶
- classmethod get_sql_icon_name_absolute(env)¶
- classmethod get_static_path(document)¶
- classmethod get_static_path_from_env(env)¶
- class sphinx_hwt.directive_buildreport.HwtBuildReportTableDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine, table_header, table_data)¶
Bases:
Directive
A sphinx directive which adds a single table from provided data into a document
- classmethod create_table_row(row_cells)¶
- generate_table_body()¶
- generate_table_name()¶
- run()¶
- class sphinx_hwt.directive_buildreport.HwtBuildreportDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)¶
Bases:
Directive
- final_argument_whitespace = False¶
May the final argument contain whitespace?
- has_content = False¶
May the directive have content?
- optional_arguments = 1¶
Number of optional arguments after the required arguments.
- register_in_db(component_class_path: str, constructor_name: Optional[str])¶
Adds a record about this component into builds table in database to mark that this component should be build.
- Parameters
component_class_path – class path
constructor_name – aditional name of the function which can configure the component
- run()¶
Add the record about this component into DB to mark it for build and add build report tables from the data in DB if available.
- sphinx_hwt.directive_buildreport.get_config(state)¶
- sphinx_hwt.directive_buildreport.init_static_files_and_database(app: Sphinx, env, docnames)¶
- sphinx_hwt.directive_buildreport.setup(app: Sphinx)¶
sphinx_hwt.directive_components module¶
- class sphinx_hwt.directive_components.HwtComponentsDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)¶
Bases:
Directive
- final_argument_whitespace = False¶
May the final argument contain whitespace?
- has_content = False¶
May the directive have content?
- optional_arguments = 1¶
Number of optional arguments after the required arguments.
- run()¶
- class sphinx_hwt.directive_components.hwt_components(obj_name_to_descr_paragraph: Dict[str, Element], rawsource='', *children, **attributes)¶
Bases:
hwt_objs
A directive which adds a list of defined HDL components for Unit instances The message also contains information about default value and type of the parameter.
- static depart_html(self, node: hwt_components)¶
- static visit_html(self, node: hwt_components)¶
- sphinx_hwt.directive_components.merge_variable_lists_into_hwt_components(app: Sphinx, domain: str, objtype: str, contentnode: Element)¶
- sphinx_hwt.directive_components.setup(app: Sphinx)¶
sphinx_hwt.directive_interfaces module¶
- class sphinx_hwt.directive_interfaces.HwtInterfacesDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)¶
Bases:
Directive
- final_argument_whitespace = False¶
May the final argument contain whitespace?
- has_content = False¶
May the directive have content?
- optional_arguments = 1¶
Number of optional arguments after the required arguments.
- run()¶
- class sphinx_hwt.directive_interfaces.hwt_interfaces(obj_name_to_descr_paragraph: Dict[str, Element], rawsource='', *children, **attributes)¶
Bases:
hwt_objs
A directive which adds a list of HDL defined interfaces for Unit instances The message also contains information about default value and type of the parameter.
- static depart_html(self, node: hwt_interfaces)¶
- static visit_html(self, node: hwt_interfaces)¶
- sphinx_hwt.directive_interfaces.merge_variable_lists_into_hwt_interfaces(app: Sphinx, domain: str, objtype: str, contentnode: Element)¶
- sphinx_hwt.directive_interfaces.setup(app: Sphinx)¶
sphinx_hwt.directive_params module¶
- class sphinx_hwt.directive_params.HwtParamsDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)¶
Bases:
Directive
- final_argument_whitespace = False¶
May the final argument contain whitespace?
- has_content = False¶
May the directive have content?
- optional_arguments = 1¶
Number of optional arguments after the required arguments.
- run()¶
- class sphinx_hwt.directive_params.hwt_params(obj_name_to_descr_paragraph: Dict[str, Element], rawsource='', *children, **attributes)¶
Bases:
hwt_objs
A directive which adds a list of defined HDL parameters for Unit instances The message also contains information about default value and type of the parameter.
- static depart_html(self, node: hwt_params)¶
- static visit_html(self, node: hwt_params)¶
- sphinx_hwt.directive_params.merge_variable_lists_into_hwt_params(app: Sphinx, domain: str, objtype: str, contentnode: Element)¶
- sphinx_hwt.directive_params.setup(app: Sphinx)¶
sphinx_hwt.directive_schematic module¶
- class sphinx_hwt.directive_schematic.HwtSchematicDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)¶
Bases:
Directive
- final_argument_whitespace = False¶
May the final argument contain whitespace?
- has_content = False¶
May the directive have content?
- optional_arguments = 1¶
Number of optional arguments after the required arguments.
- run()¶
- class sphinx_hwt.directive_schematic.SchematicLink(constructor_fn_name: Optional[str], *args, **kwargs)¶
Bases:
General
,Inline
,TextElement
- static depart_html(self, node)¶
- static visit_html(self, node)¶
Generate html elements and schematic json
- class sphinx_hwt.directive_schematic.SchematicPaths¶
Bases:
object
- SCHEMATIC_DIR_PREFIX = '../../'¶
- SCHEMATIC_FILES_DIR = 'hwt_schematics'¶
- SCHEMATIC_FILES_EXTENSION = 'json'¶
- SCHEMATIC_VIEWER_SRC_DIR = '/home/docs/checkouts/readthedocs.org/user_builds/sphinx-hwt/checkouts/latest/sphinx_hwt/html'¶
- SCHEMATIC_VIEWER_URL = 'schematic_viewer/schematic_viewer.html'¶
- classmethod get_sch_file_name(document, absolute_name, serialno)¶
- classmethod get_sch_file_name_absolute(document, absolute_name, serialno)¶
- classmethod get_sch_viewer_dir(env)¶
- classmethod get_sch_viewer_link(document)¶
- classmethod get_static_path(document)¶
- classmethod get_static_path_from_env(env)¶
- sphinx_hwt.directive_schematic.copy_scheme_viewer_static_files(app: Sphinx, env, docnames)¶
- sphinx_hwt.directive_schematic.setup(app: Sphinx)¶
sphinx_hwt.sphinx_hwt module¶
- sphinx_hwt.sphinx_hwt.setup(app: Sphinx)¶
sphinx_hwt.utils module¶
- sphinx_hwt.utils.construct_hwt_obj(absolute_name: str, constructor_fn_name: str, allowed_classes, debug_directive_name: str)¶
- sphinx_hwt.utils.construct_property_description_list(name)¶
Construct a skeleton for sphinx member description block
- sphinx_hwt.utils.generic_import(name: Union[str, List[str]])¶
Import using string or list of module names
- sphinx_hwt.utils.get_absolute_name_of_class_of_node(node)¶
Get a module path for an object from its node in doc.
- sphinx_hwt.utils.get_constructor_name(directive: Directive)¶
Get a first argument of the directive and check if it is a function.
- sphinx_hwt.utils.get_instance_from_directive_node(directive: Directive, allowed_classes)¶
Converts
.. directive: .. directive: constructor_fn_name
to instance, if constructor_fn_name is not specified the current class instantiated.
- class sphinx_hwt.utils.hwt_objs(obj_name_to_descr_paragraph: Dict[str, Element], rawsource='', *children, **attributes)¶
Bases:
General
,Element
A directive which adds a list of HDL defined interfaces for Unit instances The message also contains information about default value and type of the parameter.
- Variables
obj_list – format (name, type_str, value_str)
- sphinx_hwt.utils.merge_variable_lists_into_hwt_objs(app: Sphinx, domain: str, objtype: str, contentnode: Element, hwt_objs_cls) None ¶
Move doc from variable lists in class documentation to HDL param list if the variable is a HDL Param instance.
- sphinx_hwt.utils.ref_to_class(class_obj)¶
Create the sphinx pending_xref for a class