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

Display Workflows and save as file #1300

Merged
merged 19 commits into from
Feb 5, 2024
Merged

Display Workflows and save as file #1300

merged 19 commits into from
Feb 5, 2024

Conversation

PProfizi
Copy link
Contributor

@PProfizi PProfizi commented Nov 29, 2023

Proposal for a Workflow viewer in PyDPF.
This uses graphviz rendering and the native system image viewer to show the image obtained with graphviz.

To be discussed.

@PProfizi PProfizi added the enhancement New feature or request label Nov 29, 2023
@PProfizi PProfizi self-assigned this Nov 29, 2023
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (6bddcba) 87.98% compared to head (6606139) 87.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1300      +/-   ##
==========================================
- Coverage   87.98%   87.80%   -0.19%     
==========================================
  Files          81       81              
  Lines        9482     9506      +24     
==========================================
+ Hits         8343     8347       +4     
- Misses       1139     1159      +20     

@PProfizi PProfizi marked this pull request as ready for review November 29, 2023 16:37
@rafacanton
Copy link
Contributor

Generic comment: although I have the graphviz Python dependency in the venv, this was not enough to render the image. It raised this error: graphviz.backend.execute.ExecutableNotFound: failed to execute WindowsPath('dot'), make sure the Graphviz executables are on your systems' PATH, so I needed to manually install graphviz from here. If we want this out the box, maybe we need an additional dependency that installs graphviz server.


# View workflow
if viewer is None:
graphviz.view(filepath=file_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@rafacanton
Copy link
Contributor

This is what I get with (viewer="paraview"):
image

@PProfizi
Copy link
Contributor Author

@FedericoNegri

@PProfizi
Copy link
Contributor Author

This is what I get with (viewer="paraview"): image

I removed the PyVista viewer as it had no added value and just made everything more complicated.

@PProfizi
Copy link
Contributor Author

Generic comment: although I have the graphviz Python dependency in the venv, this was not enough to render the image. It raised this error: graphviz.backend.execute.ExecutableNotFound: failed to execute WindowsPath('dot'), make sure the Graphviz executables are on your systems' PATH, so I needed to manually install graphviz from here. If we want this out the box, maybe we need an additional dependency that installs graphviz server.

Added the requirement to the dosctring

Signed-off-by: paul.profizi <paul.profizi@ansys.com>
Signed-off-by: paul.profizi <paul.profizi@ansys.com>
Signed-off-by: paul.profizi <paul.profizi@ansys.com>
Signed-off-by: paul.profizi <paul.profizi@ansys.com>
Signed-off-by: paul.profizi <paul.profizi@ansys.com>
@PProfizi PProfizi merged commit f5a2821 into master Feb 5, 2024
39 of 40 checks passed
@PProfizi PProfizi deleted the feat/save_workflow branch February 5, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants