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

Add DeepnoteRenderer to pio.renderers #4389

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jakubzitny
Copy link

@jakubzitny jakubzitny commented Oct 19, 2023

Adding a dedicated renderer for Deepnote notebooks, similar to ColabRenderer, CoCalcRenderer, or AzureRenderer.

Disclaimer: I am an engineer from Deepnote, we are requesting this after having a number of users of Deepnote misconfiguring renderers in Plotly which lead to broken chart rendering.

  • 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 codegen files and not generated files.
  • I have added tests (if submitting a new feature or correcting a bug) or
    modified existing tests.
  • For a new feature, I have added documentation examples in an existing or
    new tutorial notebook (please see the doc checklist as well).
  • I have added a CHANGELOG entry if fixing/changing/adding anything substantial.
  • For a new feature or a change in behaviour, I have updated the relevant docstrings in the code to describe the feature or behaviour (please see the doc checklist as well).

@@ -74,7 +74,7 @@ fig

> To be precise, figures will display themselves using the current default renderer when the two following conditions are true. First, the last expression in a cell must evaluate to a figure. Second, `plotly.py` must be running from within an `IPython` kernel.

**In many contexts, an appropriate renderer will be chosen automatically and you will not need to perform any additional configuration.** These contexts include the classic [Jupyter Notebook](https://jupyter.org/), [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), [Visual Studio Code notebooks](https://code.visualstudio.com/docs/python/jupyter-support), [Google Colaboratory](https://colab.research.google.com/notebooks/intro.ipynb), [Kaggle](https://www.kaggle.com/kernels) notebooks, [Azure](https://notebooks.azure.com/) notebooks, and the [Python interactive shell](https://www.python.org/shell/).
**In many contexts, an appropriate renderer will be chosen automatically and you will not need to perform any additional configuration.** These contexts include the classic [Jupyter Notebook](https://jupyter.org/), [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), [Visual Studio Code notebooks](https://code.visualstudio.com/docs/python/jupyter-support), [Google Colaboratory](https://colab.research.google.com/notebooks/intro.ipynb), [Kaggle](https://www.kaggle.com/kernels) notebooks, [Azure](https://notebooks.azure.com/) notebooks, [Deepnote](https://deepnote.com/) notebooks, and the [Python interactive shell](https://www.python.org/shell/).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you planning to add a new auto-detection block then in _renderers.py?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, will do. Thanks.

@@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- Repair crash on Matplotlib 3.8 related to get_offset_position [[#4372](https://github.com/plotly/plotly.py/pull/4372)],
- Handle deprecation of `pandas.Series.dt.to_pydatetime()` calls and suppress the `FutureWarning` they currently emit. [[#4379](https://github.com/plotly/plotly.py/pull/4379)]
- Add DeepnoteRenderer to pio.renderers [[#4389](https://github.com/plotly/plotly.py/pull/4389)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd call this ### Added, rather than ### Fixed 😉

@Coding-with-Adam
Copy link
Contributor

hi @jakubzitny
Thanks for starting this PR. I wanted to follow up and encourage you to continue the process. We would love to see this PR completed.

@gvwilson gvwilson added feature something new P2 considered for next cycle community community contribution labels Aug 12, 2024
@gvwilson
Copy link
Contributor

@alexcjohnson can you please have a look and let us know whether we should have someone pick this up and get it over the finish line? thanks - @gvwilson

@alexcjohnson
Copy link
Collaborator

I'm happy for us to accept this PR - we have lots of renderers for other proprietary notebook systems, and we want plotly.py to work easily in all of them. But it really should be completed by someone from Deepnote, or an active Deepnote user, particularly the auto-detection part, they'll have much better context than we can about the most robust and future-proof way to interact with Deepnote.

@jakubzitny are you still interested in completing this? Or is there someone else at Deepnote who would like to complete it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community contribution feature something new P2 considered for next cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants