Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/remove tmp dot #889

Merged
merged 4 commits into from
May 6, 2024
Merged

Fix/remove tmp dot #889

merged 4 commits into from
May 6, 2024

Conversation

zilto
Copy link
Collaborator

@zilto zilto commented May 5, 2024

See #884 and #888

zilto added 4 commits May 3, 2024 19:32
Hamilton visualizations rely on the graphviz library.
It defines graphs using the DOT language, which
defines one statement per line using a string.

Previously, Hamilton used `graphviz.Digraph.render()`
to produce visualizations. This has the side-effect
of producing an intermediary DOT file on disk. This
is most often of no use and clutters the directory.

Now, we are switching to `graphviz.Digraph.pipe()`
to write bytes directly to an open file. Tests were
updated accordingly.

The keyword argument `keep_dot` was added to viz
functions in case users still want this DOT file
to be produced. It allows to rerender the viz with
a different style without re-executing the Hamilton
code. It could be useful when iterating over custom
styling.
@skrawcz skrawcz merged commit c0a88bb into main May 6, 2024
23 checks passed
@skrawcz skrawcz deleted the fix/remove-tmp-dot branch May 6, 2024 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants