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

Floating viewer for Graphviz output #947

Merged
merged 2 commits into from
Oct 23, 2024
Merged

Floating viewer for Graphviz output #947

merged 2 commits into from
Oct 23, 2024

Conversation

quffaro
Copy link
Member

@quffaro quffaro commented Oct 22, 2024

Since I mainly use Vim to develop, I don't have an embedded file viewer like VSCode so I wrote this snippet to visualize graphs in a floating window. But I'm opening this draft PR to open the discussion whether it should be upstreamed, and if so, what technical considerations.

I'm aware that isdefined(Main, :VSCodeServer) allows us to check if the REPL is being run in VSCode (and likewise for Juypter and IJulia), but I didn't write a validation to check that as I assumed a user would call this function in order to visualize the graph in a floating window.

  1. Should run statements be used in code?
  2. What other considerations besides operating system should a viewer check for? feh for example is not an image viewer everyone uses.
  3. How can this code be generalized?
  4. How can it be tested?

@quffaro quffaro requested a review from epatters October 22, 2024 16:56
@quffaro quffaro changed the title adding viewer adding floating viewer Oct 22, 2024
@quffaro quffaro self-assigned this Oct 22, 2024
@epatters epatters changed the title adding floating viewer Floating viewer for Graphviz output Oct 23, 2024
src/graphics/Graphviz.jl Outdated Show resolved Hide resolved
src/graphics/Graphviz.jl Outdated Show resolved Hide resolved
src/graphics/Graphviz.jl Outdated Show resolved Hide resolved
Copy link
Member

@epatters epatters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Matt! A few comments below.

@AlgebraicJulia AlgebraicJulia deleted a comment from github-actions bot Oct 23, 2024
@quffaro quffaro marked this pull request as ready for review October 23, 2024 19:54
Copy link
Member

@epatters epatters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@epatters epatters merged commit 764b4c0 into main Oct 23, 2024
12 checks passed
@epatters epatters deleted the cm/graphviz_viewer branch October 23, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants