ontocast.cli.plot_graph¶
Attributes¶
DEFAULT_FORMATS = ('svg', 'png')
module-attribute
¶
FORMATS = ('svg', 'png', 'pdf')
module-attribute
¶
NodeShape = Literal['process', 'decision', 'terminal']
module-attribute
¶
frontmatter_config = {'config': {'theme': 'base', 'look': 'handDrawn', 'themeVariables': {'primaryColor': '#FFF3E0', 'primaryBorderColor': '#143642', 'primaryTextColor': '#372237', 'lineColor': '#FFAB91', 'fontFamily': "'Architects Daughter', cursive", 'fontSize': '20px'}, 'flowchart': {'curve': 'basis', 'htmlLabels': True, 'useMaxWidth': True}}}
module-attribute
¶
logger = logging.getLogger(__name__)
module-attribute
¶
Classes¶
FlowEdge
dataclass
¶
Source code in ontocast/cli/plot_graph.py
FlowGraph
dataclass
¶
Source code in ontocast/cli/plot_graph.py
FlowNode
dataclass
¶
Source code in ontocast/cli/plot_graph.py
Functions:¶
draw_flow_graphviz(pgv_module, flow, fname, extensions, rankdir='TB')
¶
Source code in ontocast/cli/plot_graph.py
draw_graphviz(pgv_module, graph, fname, extensions, rankdir='TB')
¶
Source code in ontocast/cli/plot_graph.py
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 | |
facts_loop_flow(*, include_evidence=False)
¶
flow_graph_to_mermaid(flow)
¶
Source code in ontocast/cli/plot_graph.py
main(output_dir, formats)
¶
Render the workflow graph and per-unit loop diagrams.
Rendering needs only the compiled graph topology: the LLM client is never set up and the stores are in memory, so no provider credentials or services are required.
Source code in ontocast/cli/plot_graph.py
ontology_loop_flow(*, include_evidence=False)
¶
unit_loop_flow(phase, *, include_evidence=False, passes_var)
¶
The per-unit loop: one core shared by both phases, plus facts-only exits.
The facts phase adds three things the ontology phase does not have. A skip gate spends no critic call on a citation-metadata unit or an empty render. A critic that returns no critique leaves the loop unpatched and unreviewed. And an optional insert-only completion stage runs after the critic loop, however that loop ended -- except when every render failed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phase
|
str
|
|
required |
include_evidence
|
bool
|
Draw the optional web-evidence branches. |
False
|
passes_var
|
str
|
The setting that bounds the critic passes, named on the diagram so the picture and the configuration agree. |
required |
Source code in ontocast/cli/plot_graph.py
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | |