Skip to content

Conversation

@kevineger
Copy link

Full context in #5471.

The current implementation detects if the google.colab module is available. This has a couple problems:

  1. Anyone can install that library, outside of Colab.
  2. The recently launched Colab VS Code extension does not work with that web-based renderer.

Snapping to the conventions used for the other notebooks/renderers (e.g. Kaggle, Azure), this change now looks for the presence of the COLAB_NOTEBOOK_ID environment variable. I'm an engineer on Colab and have verified that we set this on kernel init for all notebooks accessed through our web app (https://colab.research.google.com/).

Code PR

  • I have read through the contributing notes and understand the structure of the package. In particular, if my PR modifies code of plotly.graph_objects, my modifications concern the code generator and not the generated files.
  • I have added tests or modified existing tests.
    • There were no existing tests for this that I could find.
  • For a new feature, I have added documentation examples (please see the doc checklist as well).
    • Not a new feature.
  • I have added a CHANGELOG entry if changing anything substantial.
    • Not substantial.
  • For a new feature or a change in behavior, I have updated the relevant docstrings in the code.
    • Not a substantial feature change. I can update any docs if requested.

The current implementation detects if the `google.colab` module is available. This has a couple problems:

1. Anyone can install that library, outside of Colab.
2. The recently launched [Colab VS Code extension](https://marketplace.visualstudio.com/items?itemName=Google.colab) does not work with that web-based renderer.

Snapping to the conventions used for the other notebooks/renderers (e.g. Kaggle, Azure), this change now looks for the presence of the `COLAB_NOTEBOOK_ID` environment variable. I'm an engineer on Colab and have verified that we set this on kernel init for all notebooks accessed through our web app (https://colab.research.google.com/).

More context in plotly#5471.
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

Successfully merging this pull request may close these issues.

1 participant