Skip to content

Distributing this thing #21

Closed
Closed
@etpinard

Description

@etpinard

On 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:

  1. 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.
  2. 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.
  3. Make users download and install the standalone binaries from this repo's release section, add wrapper code to plotly.py and plotly.R and make them spit out errors if called when plotly-graph-exporter isn't installed.

cc @chriddyp @cpsievert @jackparmer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions