Distributing this thing
See original GitHub issueOn top of the @plotly/image-exporter
npm package , we’ll add standalone Mac, Linux and Window binaries to the release section after every release similar to what’s done currently in plotly-database-connector.
Standalone binaries ship with node.js and electron bundled up, but without the fonts we use on prod (if users want the fonts, they’ll have to install them locally or use docker). We’ll probably use electron-packager
same as plotly-database-connector for this task, although there are other options. This part is easy.
Now, we need to figure how to distribute image-exporter
to python and R API users. We’ll also need to write (thin) python and R wrapper around the plotly-graph-exporter
CLI command e.g in python:
from subprocess import call
import json
fig = {"data": [{"y": [1,2,1]}]}
call(['plotly-graph-exporter', json.dumps(fig)])
For distributing, I can think of three different options:
- Include the
image-exporter
standalone binaries in plotly.py and plotly.R packages and write the wrapper there, similar to what we currently do with the plotly.js bundle for offline. Potential problems, we’ll have to make platform-dependent installs - is that possible with pip and CRAN? Download times might increase significantly too. - Make new
plotly-image-exporter
py/pip and R/CRAN packages from this repo - which would include the py/R wrappers. This option would require platform-specific install too. - Make users download and install the standalone binaries from this repo’s release section, add wrapper code to
plotly.py
andplotly.R
and make them spit out errors if called whenplotly-graph-exporter
isn’t installed.
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (15 by maintainers)
Top GitHub Comments
Orca v1.0.0 is out:
Please see the installations instructions here.
Our release process is far from perfect, but good enough I’d say to close this issue closed.
It would be useful for my workplace if this was bundled in a python package as we don’t currently have a good internal way to distribute anything else like node packages as we are python focused. You can make OS dependent wheel files as other projects do