Automatically generate the pipeline graph at the end of a build #1177
Replies: 2 comments 5 replies
-
One strategy I use is to make the This isn't perfect, as sometimes things that change the graph fall outside of the main |
Beta Was this translation helpful? Give feedback.
-
That's a great point. Because the graph depends on everything in the pipeline, a To mitigate or avoid the circularity, you could use |
Beta Was this translation helpful? Give feedback.
-
Help
Description
I really love using
tar_visnetwork()
,tar_glimpse()
, andtar_mermaid()
to generate visuals of the pipeline nodes and connections before, during, and/or after a call totar_make()
. I am trying to get better at committing these graphs (either as images or Markdown chunks withmermaid.js
code) to the GitHub repo that contains my pipeline code so that users can see changes to the pipeline structure over time. The issue is that everyone has to manually remember to run one of these functions after they build the pipeline.I know that we can't have these run as targets within the pipeline because we end up with strange circular behavior. For the moment, I have a wrapper function called
tar_make_and_viz()
that contains the following and is sourced and run instead oftar_make()
:However, it would be great if there was some way to integrate this step into
tar_make()
itself.viz_method = c('none', 'visnetwork', 'glimpse', 'mermaid')
+viz_output = 'tar_config_get("viz_output")'
whereviz_output
is a filepathpost_build_script = tar_config_get("post_build_script")
wherepost_build_script
is a filepath to an R script that is run after a successfultar_make()
.Beta Was this translation helpful? Give feedback.
All reactions