ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

Allow `embed_minimal_html` to generate minified JSON for widgets and `json_data`

Open shivshankardayal opened this issue 3 years ago • 0 comments
trafficstars

Problem

I am generating sphinx gallery docs for http://github.com/deepchecks/deepchecks which generates rst files of the order of 100s of MBs leading sphinx to cause OOM. This is because I am using embed_minimal_html generates image pixels each on a new line. Even if I specify indent=0 it is still pretty big file. There should be an option to minify the JSON output for json.dumps in embed_snippet function.

Proposed Solution

Accept a kwarg in embed_minimal_function and modify embed_snippet accordingly. If you want I can create a PR for this.

shivshankardayal avatar Mar 15 '22 21:03 shivshankardayal