aiida.sphinxext package

Defines reStructuredText directives to simplify documenting AiiDA and its plugins.

aiida.sphinxext.setup(app)[source]

Setup function to add the extension classes / nodes to Sphinx.

Submodules

Defines an rst directive to auto-document AiiDA calculation job.

class aiida.sphinxext.calcjob.AiidaCalcJobDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Bases: aiida.sphinxext.process.AiidaProcessDirective

__module__ = 'aiida.sphinxext.calcjob'
annotation = 'calcjob'
signature = 'CalcJob'
class aiida.sphinxext.calcjob.AiidaCalcJobDocumenter(*args: Any)[source]

Bases: aiida.sphinxext.process.AiidaProcessDocumenter

Sphinx Documenter for AiiDA CalcJobs.

__module__ = 'aiida.sphinxext.calcjob'
classmethod can_document_member(member, membername, isattr, parent)[source]

Called to see if a member can be documented by this Documenter.

directivetype = 'aiida-calcjob'
objtype = 'calcjob'

name by which the directive is called (auto…) and the default generated directive name

priority = 20

priority if multiple documenters return True from can_document_member

aiida.sphinxext.calcjob.setup_extension(app)[source]

Defines an rst directive to auto-document AiiDA processes.

class aiida.sphinxext.process.AiidaProcessDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Bases: sphinx.util.docutils.SphinxDirective

Directive to auto-document AiiDA processes.

EXPAND_NAMESPACES_FLAG = 'expand-namespaces'
HIDE_UNSTORED_INPUTS_FLAG = 'hide-nondb-inputs'
__module__ = 'aiida.sphinxext.process'
annotation = 'process'
build_content()[source]

Returns the main content (docstring, inputs, outputs) of the documentation.

build_doctree(title, port_namespace)[source]

Returns a doctree for a given port namespace, including a title.

build_node_tree()[source]

Returns the docutils node tree.

build_outline_doctree(outline)[source]

Build the doctree for a spec outline.

build_outline_lines(outline, indent)[source]

Return a list of lines which describe the process outline.

build_port_content(name, port)[source]

Build the content that describes a single port.

build_portnamespace_doctree(port_namespace)[source]

Builds the doctree for a port namespace.

build_signature()[source]

Returns the signature of the process.

final_argument_whitespace = True

May the final argument contain whitespace?

static format_valid_types(valid_type)[source]

Format valid types.

has_content = True

May the directive have content?

initialize()[source]

Set internal attributes of the class.

Includes importing the process class.

option_spec = {'expand-namespaces': <function flag>, 'hide-nondb-inputs': <function flag>, 'module': <function unchanged_required>}

Mapping of option names to validator functions.

optional_arguments = 0

Number of optional arguments after the required arguments.

required_arguments = 1

Number of required directive arguments.

run()[source]
signature = 'Process'
class aiida.sphinxext.process.AiidaProcessDocumenter(*args: Any)[source]

Bases: sphinx.ext.autodoc.ClassDocumenter

Sphinx Documenter class for AiiDA Processes.

__module__ = 'aiida.sphinxext.process'
classmethod can_document_member(member, membername, isattr, parent)[source]

Called to see if a member can be documented by this Documenter.

directivetype = 'aiida-process'
objtype = 'process'

name by which the directive is called (auto…) and the default generated directive name

priority = 10

priority if multiple documenters return True from can_document_member

aiida.sphinxext.process._is_non_db(port)[source]
aiida.sphinxext.process.setup_extension(app)[source]

Defines an rst directive to auto-document AiiDA workchains.

class aiida.sphinxext.workchain.AiidaWorkChainDocumenter(*args: Any)[source]

Bases: aiida.sphinxext.process.AiidaProcessDocumenter

Sphinx Documenter class for AiiDA WorkChains.

__module__ = 'aiida.sphinxext.workchain'
analyzer: ModuleAnalyzer
args: str
classmethod can_document_member(member, membername, isattr, parent)[source]

Called to see if a member can be documented by this Documenter.

config: Config
directivetype = 'aiida-workchain'
env: BuildEnvironment
fullname: str
modname: str
module: ModuleType
object: Any
object_name: str
objpath: List[str]
objtype = 'workchain'

name by which the directive is called (auto…) and the default generated directive name

parent: Any
priority = 20

priority if multiple documenters return True from can_document_member

retann: str
class aiida.sphinxext.workchain.AiidaWorkchainDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Bases: aiida.sphinxext.process.AiidaProcessDirective

__module__ = 'aiida.sphinxext.workchain'
annotation = 'workchain'
signature = 'WorkChain'
aiida.sphinxext.workchain.setup_extension(app)[source]