QuantumGraphMermaidVisualizer¶
- class lsst.pipe.base.quantum_graph.visualization.QuantumGraphMermaidVisualizer¶
- Bases: - QuantumGraphVisualizer[- BaseQuantumGraph,- QuantumInfo,- DatasetInfo]- A visualizer for quantum graphs in the Mermaid language. - Methods Summary - render_dataset(dataset_id, data)- Return the representation of a dataset in a graph visualization. - render_edge(a, b, data)- Return the representation of an edge a graph visualization. - render_footer(qg, is_bipartite)- Return the ending of a graph visualization. - render_header(qg, is_bipartite)- Return the beginning of a graph visualization. - render_quantum(quantum_id, data, is_bipartite)- Return the representation of a quantum in a graph visualization. - write_bipartite(qg, stream)- Write a visualization for graph with both quantum and dataset nodes. - write_quantum_only(qg, stream)- Write a visualization for graph with only quantum nodes. - Methods Documentation - render_dataset(dataset_id: UUID, data: DatasetInfo) str¶
- Return the representation of a dataset in a graph visualization. - Parameters:
- dataset_iduuid.UUID
- ID of the dataset. 
- dataDatasetInfo
- Mapping with additional information about the dataset. 
 
- dataset_id
- Returns:
- renderedstr
- String that represents the dataset. May contain newlines, but an additional newline will automatically be added after the string, before the next node or edge. 
 
- rendered
 
 - render_edge(a: UUID, b: UUID, data: BipartiteEdgeInfo | None) str¶
- Return the representation of an edge a graph visualization. - Parameters:
- auuid.UUID
- ID of the quantum or dataset for which this is an outgoing edge. 
- buuid.UUID
- ID of the quantum or dataset for which this is an incoming edge. 
- dataBipartiteEdgeInfo
- Mapping with additional information about the dataset. 
 
- a
- Returns:
- renderedstr
- String that represents the edge. May contain newlines, but an additional newline will automatically be added after the string, before the next edge. 
 
- rendered
 
 - Return the ending of a graph visualization. - Parameters:
- qgBaseQuantumGraph
- Quantum graph to visualize. 
- is_bipartitebool
- Whether a bipartite graph visualization is being requested. 
 
- qg
- Returns:
- renderedstr
- String that ends the visualization. May contain newlines, but an additional newline will automatically be added after the string, at the end of the file. 
 
- rendered
 
 - render_header(qg: BaseQuantumGraph, is_bipartite: bool) str¶
- Return the beginning of a graph visualization. - Parameters:
- qgBaseQuantumGraph
- Quantum graph to visualize. 
- is_bipartitebool
- Whether a bipartite graph visualization is being requested. 
 
- qg
- Returns:
- renderedstr
- String that starts the visualization. May contain newlines, but an additional newline will automatically be added after the string, before the first node. 
 
- rendered
 
 - render_quantum(quantum_id: UUID, data: QuantumInfo, is_bipartite: bool) str¶
- Return the representation of a quantum in a graph visualization. - Parameters:
- quantum_iduuid.UUID
- ID of the quantum. 
- dataQuantumInfo
- Mapping with additional information about the quantum. 
- is_bipartitebool
- Whether a bipartite graph visualization is being requested. 
 
- quantum_id
- Returns:
- renderedstr
- String that represents the quantum. May contain newlines, but an additional newline will automatically be added after the string, before the next node or edge. 
 
- rendered