-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Updated offline mode #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated offline mode #348
Conversation
hey @etpinard @theengineear @cpsievert @cldougl @jackparmer - new offline functionality |
])) | ||
def get_plotlyjs(): | ||
path = os.path.join('offline', 'plotly.min.js') | ||
plotlyjs = resource_string('plotly', path).decode('utf-8') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the future, I'd also like to ship an un-synced version of the plot-schema.json
that corresponds to this particular plotly.min.js
and validate offline mode against that plot-schema.json
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little confused how this is working? I thought you needed a line in setup.py
telling the setup script to include the .js
file in the package information. Like here.
I think you need a 'offline/*.js'
item in that list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, interesting. OK, I'll add it there.
@chriddyp is this reviewable? Mind adding a little context-providing note in the top comment? |
@theengineear - yup, reviewable. here's some context: 6c5f172 |
@chriddyp thanks! i'll check this out today. |
|
||
import requests | ||
from pkg_resources import resource_string | ||
import warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐄 mind flipping these import statements? We typically do from ...
after import ...
.
K, final major comment. Will this play well with on-prem versions? So say an on-prem user using an old version of plotly.js installs the newest version of |
@theengineear - yeah, handled in documentation. Eventually, maybe also handled in shareplot with validation. |
triple 👍 sg. |
@theengineear - just added some more comments, and a couple fixes. |
^^ 😻 |
Okay! As long as you confirm that you didn't take out that newline at the end of the file noted here, 💃 away :) |
No description provided.