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

Fixes to the DAG path visualizations #518

Merged
merged 3 commits into from
Nov 8, 2023
Merged

Fixes to the DAG path visualizations #518

merged 3 commits into from
Nov 8, 2023

Conversation

zilto
Copy link
Collaborator

@zilto zilto commented Nov 7, 2023

The viz would display the set of nodes + their immediate parents. The driver function would only pass the "nodes on the path" and have the viz draw the parents.

This caused an issue because nodes not explicitly passed didn't received styling. Instead, they were implicitly created when trying to create to them.

Changes

There are 3 sets of changes:

  1. Create_graphviz_graph(): added logic to highlight path in red
  2. Driver visualizations: expose the new params (show_legend, orient, hide_inputs, deduplicate_inputs) to all visualization functions
  3. Path visualizations (between, upstream, downstream): The changes force the parameter strictly_display_only_passed_in_nodes=True and handles the nodes to pass at the Driver level (i.e., includes the parents explicitly).

How I tested this

The existing test suite still works. Changes only affect how the set of node is passed from the Driver to the create_graphviz_graph() function and how nodes / edges are displayed.

Notes

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

There are 3 sets of changes:
1. Create_graphviz_graph(): added logic to highlight path in red
2. Driver visualizations: expose the new params (show_legend, orient, hide_inputs, deduplicate_inputs) to all visualization functions
3. Path visualizations (between, upstream, downstream): previously, the viz would display the set of nodes + their immediate parents. The driver function would only pass the "nodes on the path" and have the viz draw the parents. This caused an issue because nodes not explicitly passed didn't received styling. Instead, they were implicitly created when trying to create to them. The changes force the parameter strictly_display_only_passed_in_nodes=True and handles the nodes to pass at the Driver level.
Copy link
Contributor

sweep-ai bot commented Nov 7, 2023

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.

To use new rendering.
So that they now match the new way things are rendered.
@skrawcz skrawcz merged commit 2858f02 into main Nov 8, 2023
22 checks passed
@skrawcz skrawcz deleted the fix/dag_viz_path branch November 8, 2023 00:37
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.

None yet

3 participants