Add workaround for broken SVGs in nbconvert#575
Conversation
Codecov ReportBase: 95.74% // Head: 95.75% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #575 +/- ##
=======================================
Coverage 95.74% 95.75%
=======================================
Files 29 29
Lines 3996 4000 +4
=======================================
+ Hits 3826 3830 +4
Misses 170 170
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
@desilinguist I tested on linux. some plots are not shown in the report, only black boxes. otherwise it's ok. |
|
@tamarl08 you saw block boxes on this branch? That's what this PR is supposed to fix so something didn't work right for you. I had also tested on Linux and didn't see any black boxes. Are you sure you tested this branch and not |
|
Of course I tested |
|
looks good on the branch! |
|
Tested on EC2. Works as expected! |
Newer versions of nbconvert use a "clean_html" filter on SVG elements that break SVG rendering; so we override that filter here with a custom function that is essentially a noop. For more details, please refer to #571.
To review this properly, please run the following on both your Macs and on a Linux server (EC2 instance will work too):
CONDA_SUBDIR=osx-64 mamba create -n rsmdev --file requirements.txt python=3.8to create the conda environment. If on a Linux server, runmamba create -n rsmdev --file requirements.txt python=3.8instead.pip install -e .rsmtool tests/data/experiments/lr-subgroups-with-h2/lr_subgroups_with_h2.json foobar.open foobar/report/lr_subgroups_with_h2_report.htmland make sure that all the figures in the report are visible and as expected.