Closed oscargus closed 1 year ago
Merging #200 (20fe86b) into master (126cbce) will not change coverage. The diff coverage is
100.00%
.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@ Coverage Diff @@
## master #200 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 33 33
Lines 1089 1090 +1
=========================================
+ Hits 1089 1090 +1
Impacted Files | Coverage Δ | |
---|---|---|
graphviz/jupyter_integration.py | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Thanks for the PR!
I think that Jupyter first looks at _reprmimebundle, so it shouldn't affect that.
Can you try to render https://github.com/xflr6/graphviz/blob/master/examples/graphviz-notebook.ipynb with this branch?
AFAICT this change makes all graphs image being included twice (once as image/svg+xml
, once as text/html
with the same content). Assuming that this is not intended.
If it renders twice, it is actually the fault of Jupyter as an object can have any number of _repr_*_
methods: https://ipython.readthedocs.io/en/stable/config/integrating.html#custom-methods
But as mentioned in #199, it may be better to solve this on the sphinx-gallery side (although there should be no harm in providing this as well, modulo that it is up to the "terminal" to determine which representation to render).
Thanks for checking, closing: superseded by https://github.com/sphinx-gallery/sphinx-gallery/pull/1138
Closes #199
This adds a
_repr_html_
method toGraph
andDigraph
. This is useful for displaying graphs directly in e.g. sphinx-gallery. The method is simply the SVG generation as SVG is valid HTML.I think that Jupyter first looks at
_repr_mimebundle_
, so it shouldn't affect that.