refactor(graphviz): move graph_render module from fabro-workflows to fabro-graphviz

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-25 10:58:37 -04:00
parent 937ff79575
commit 0c5bbf5bc1
No known key found for this signature in database
7 changed files with 9 additions and 8 deletions

1
Cargo.lock generated
View file

@ -1474,6 +1474,7 @@ dependencies = [
name = "fabro-graphviz"
version = "0.176.2"
dependencies = [
"anyhow",
"nom",
"regex",
"serde",

View file

@ -1510,7 +1510,7 @@ async fn get_retro(
/// Render DOT source to a styled SVG via `render_dot` on a blocking thread.
pub(crate) async fn render_dot_svg(dot_source: &str) -> Response {
use fabro_workflows::graph_render::{render_dot, GraphFormat};
use fabro_graphviz::render::{render_dot, GraphFormat};
let source = dot_source.to_owned();
match tokio::task::spawn_blocking(move || render_dot(&source, GraphFormat::Svg)).await {

View file

@ -68,7 +68,7 @@ pub fn run(args: &GraphArgs, styles: &Styles) -> anyhow::Result<()> {
let source = read_workflow_file(&dot_path)?;
let source = apply_direction(&source, args.direction);
let rendered = fabro_workflows::graph_render::render_dot(&source, args.format.into())?;
let rendered = fabro_graphviz::render::render_dot(&source, args.format.into())?;
if let Some(ref output_path) = args.output {
std::fs::write(output_path, &rendered)?;
@ -91,7 +91,7 @@ pub enum GraphOutputFormat {
Png,
}
impl From<GraphOutputFormat> for fabro_workflows::graph_render::GraphFormat {
impl From<GraphOutputFormat> for fabro_graphviz::render::GraphFormat {
fn from(value: GraphOutputFormat) -> Self {
match value {
GraphOutputFormat::Svg => Self::Svg,

View file

@ -9,6 +9,7 @@ description = "Graphviz DOT parser and typed graph data model"
doctest = false
[dependencies]
anyhow.workspace = true
nom = "7"
regex = { workspace = true }
serde = { workspace = true }

View file

@ -3,6 +3,7 @@ pub mod error;
pub mod fidelity;
pub mod graph;
pub mod parser;
pub mod render;
pub mod stylesheet;
pub use fidelity::Fidelity;

View file

@ -95,21 +95,19 @@ pub mod checkpoint;
pub mod conclusion;
pub mod condition;
pub mod context;
pub mod graph;
pub mod lifecycle;
pub mod node_handler;
pub mod cost;
pub mod devcontainer_bridge;
pub mod error;
pub mod event;
pub mod git;
pub mod graph;
pub mod graph_ops;
pub mod graph_render;
pub mod handler;
pub mod lifecycle;
pub mod node_handler;
pub mod operations;
pub mod outcome;
pub mod pipeline;
pub mod preamble;
pub mod pull_request;
pub mod run_dir;
pub mod run_lookup;