pyiron_workflow.knowledge module
- pyiron_workflow.knowledge.export_to_dict(node: Node, change: SemantikonRecipeChange | None = None, with_values: bool = True, with_default: bool = True) dict[source]
- pyiron_workflow.knowledge.is_involved(validation: tuple[bool, ConjunctiveGraph | Graph, str], new_edge_change: SemantikonRecipeChange) bool[source]
- pyiron_workflow.knowledge.is_valid(validation: tuple[bool, ConjunctiveGraph | Graph, str]) bool[source]
- pyiron_workflow.knowledge.parse_workflow(workflow: ~pyiron_workflow.workflow.Workflow, with_values: bool = True, with_default: bool = True, graph: ~rdflib.graph.Graph | None = None, inherit_properties: bool = True, ontology=<class 'semantikon.ontology.SNS'>, append_missing_items: bool = True) Graph[source]
Generate RDF graph from a pyiron workflow object
- Parameters:
workflow (pyiron_workflow.workflow.Workflow) – workflow object
with_values (bool) – include channel values in the graph
with_default (bool) – include default values in the graph
graph (rdflib.Graph) – graph to add workflow information to
- Returns:
graph containing workflow information
- Return type:
(rdflib.Graph)
- pyiron_workflow.knowledge.validate_workflow(root, new_edge_change: SemantikonRecipeChange | None = None, knowledge: Graph | None = None) tuple[bool, ConjunctiveGraph | Graph, str][source]
A shortcut for running semantikon.validate_values on a graph generated by a pyiron_workflow node (the graph root node).
Takes care of converting the workflow to a compatible representation, and allows new edges to be added prior to validation.
- Parameters:
root – The workflow or macro to validate.
new_edge_change – A (semantikon-representation) node path to where the new edge
added. (should be)
knowledge – Optional additional knoweldge to apply at validation time.
- Returns:
The validation report.
- Return type:
dict