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

Allow saving pipeline to svg and png #638

Closed
1 task done
danielgafni opened this issue Nov 20, 2021 · 7 comments
Closed
1 task done

Allow saving pipeline to svg and png #638

danielgafni opened this issue Nov 20, 2021 · 7 comments

Comments

@danielgafni
Copy link

danielgafni commented Nov 20, 2021

Description

The kedro viz export command would allow visualizing the pipeline DAG from the command line.

Options:

  • --pipeline pipeline to export
  • --format [png, svg]
  • --resolution if png format is used
  • --output output path

Context

This can be used in:

  • CI pipelines

  • pre-commit hooks (always up to date project documentation)
    And other automation.

  • Include labels so that we can categorise your feature request

@danielgafni danielgafni changed the title Add kedro viz --export command Add kedro viz export command Nov 20, 2021
@limdauto limdauto changed the title Add kedro viz export command [KED-3305] Add kedro viz export command Jan 4, 2022
@yetudada
Copy link
Contributor

Hi @danielgafni! Thanks for raising this feature. I wanted to find out what you would expect to happen when you've run this command. Is it that you're trying to "screenshot" a version of the pipeline?

@danielgafni
Copy link
Author

Yeah, something like this.

Could be useful for automatic documentation updates (for example, push the image to Confluence).

@tynandebold tynandebold moved this to Inbox in Kedro-Viz Apr 20, 2022
@tynandebold
Copy link
Member

Hi @danielgafni. Thank you for raising this. We're going to close this issue for now and will certainly circle back in the future if additional demand for this arises.

In the meantime, please note that you can download the pipeline visualization from the Kedro-Viz interface (though that's a manual process, not programatic).

Repository owner moved this from Inbox to Done in Kedro-Viz May 4, 2022
@tynandebold tynandebold reopened this Jul 4, 2022
@tynandebold tynandebold moved this from Done to Todo in Kedro-Viz Jul 4, 2022
@tynandebold tynandebold changed the title [KED-3305] Add kedro viz export command Add kedro viz export command Jul 4, 2022
@antonymilne
Copy link
Contributor

antonymilne commented Jul 4, 2022

Given that we already have pipeline and save-file flags in kedro viz, I would suggest we implement this as:

  • kedro viz --save-file=file.json
  • kedro viz --save-file=file.png
  • kedro viz --save-file=file.svg

and work out the correct format from the file extension. If no extension is given then use json as we do currently.

I'm not sure how easily we will be able to directly access the export functionality from the backend side though. Currently it's all buried a bit in exportGraph.

@antonymilne antonymilne changed the title Add kedro viz export command Allow saving pipeline to svg, png Jul 4, 2022
@antonymilne antonymilne changed the title Allow saving pipeline to svg, png Allow saving pipeline to svg and png Jul 4, 2022
@tynandebold
Copy link
Member

Agree on the implementation thoughts.

And yes, I'm not sure how we'd get the contents of exportGraph in the backend either. Maybe we could write a script that would programmatically start Viz and then use Selenium or something similar to select the export icon and button that downloads the file, then closes everything down.

@tynandebold
Copy link
Member

@Huongg Huongg self-assigned this May 4, 2023
@Huongg Huongg moved this from Backlog to In Progress in Kedro-Viz May 4, 2023
@Huongg
Copy link
Contributor

Huongg commented May 11, 2023

After investigating the possibility of using Selenium to initiate Kedro-viz and subsequently selecting the export button, we have come to the realization that it would be highly complex from a technical standpoint. Additionally, we believe that the most suitable method for exporting the SVG or PNG would be through the user interface, as it involves taking a screenshot of the current visualization browser at the time. Therefore, we have decided to temporarily close this matter.

  • Below are some of the steps on how to export the pipeline to svg or png via kedro viz UI
Screenshot 2023-05-11 at 13 14 04 Screenshot 2023-05-11 at 13 14 44

@Huongg Huongg closed this as completed May 11, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Kedro-Viz May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

6 participants