Skip to content
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

Notebooks become 'not trusted' when code cells are modified in the paired file #203

Closed
mwouts opened this issue Mar 19, 2019 · 4 comments
Closed
Milestone

Comments

@mwouts
Copy link
Owner

mwouts commented Mar 19, 2019

Consider the following notebook made of two cells:

import plotly.offline as offline
import plotly.graph_objs as go
offline.init_notebook_mode()

data = [go.Bar(y=[1, 3, 2])]
offline.iplot(data, show_link=False)

The notebook may become 'not trusted' when we modify the associated text representation (e.g. the associated py:light script).

Precisely,

  • If change the cell content in a way that preserves the output, e.g. if I remove the space between 3, and 2, then the plot is preserved and the notebook remains trusted
  • If I add new markdown cells, the notebook remains trusted
  • But when I add a new code cell in the py:light script, or if I modify the plot other than by adding spaces, then the notebook becomes not trusted.
@mwouts
Copy link
Owner Author

mwouts commented Mar 19, 2019

@stefanuddenberg, do you think the above explains the issue you reported at #12?

@mwouts mwouts added this to the 1.0.4 milestone Mar 19, 2019
@mwouts
Copy link
Owner Author

mwouts commented Mar 19, 2019

The above issue would be solved if we decide to trust notebook for which outputs are either empty (updated or new code cell), or trusted (code cell with unchanged output). This seems to be consistent with the jupyter security model.

@stefanuddenberg
Copy link

@stefanuddenberg, do you think the above explains the issue you reported at #12?

My problem is a little different; the notebooks are becoming un-trusted even when no changes have been made to any representation of the notebooks at all. But fixing this issue sounds like it might end up fixing mine in the process.

@mwouts
Copy link
Owner Author

mwouts commented Mar 19, 2019

I see. I think we should specifically address your issue then. Do you happen to have this issue with every notebook? Could you please test a notebook with just one cell with javascript output, say,

import plotly.offline as offline
offline.init_notebook_mode()

Thanks!

mwouts added a commit that referenced this issue Mar 19, 2019
@mwouts mwouts mentioned this issue Mar 19, 2019
@mwouts mwouts closed this as completed in 20d218e Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants