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

feature render Driver in notebooks #788

Merged
merged 1 commit into from
Mar 28, 2024
Merged

feature render Driver in notebooks #788

merged 1 commit into from
Mar 28, 2024

Conversation

zilto
Copy link
Collaborator

@zilto zilto commented Mar 27, 2024

Simple quality of life improvement to directly call driver.display_all_functions(). The change was inspired by the logic found in Jupyter Magic.

This simply propagates the "render attribute" of the graphviz.Digraph object returned by driver.display_all_functions() so it should be robust.

image

Changes

  • added ._repr_mimebundle_() to Driver class

How I tested this

  • tests succeeded locally
  • intended behavior works in Jupyter notebooks (browser interface) and VSCode notebooks

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.

@zilto zilto added the enhancement New feature or request label Mar 27, 2024
Copy link
Collaborator

@skrawcz skrawcz left a comment

Choose a reason for hiding this comment

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

Looks good. Can you make the PR message the body of the commit for this please, since the PR message provides a good explanation of why that would be useful to have in the commit. Thanks!

@zilto zilto merged commit 57074a5 into main Mar 28, 2024
23 checks passed
@zilto zilto deleted the feat/driver-repr branch March 28, 2024 18:02
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