Skip to content

unneeded dependency on nbconvert #771

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

Closed
nzjrs opened this issue Jun 12, 2017 · 9 comments
Closed

unneeded dependency on nbconvert #771

nzjrs opened this issue Jun 12, 2017 · 9 comments

Comments

@nzjrs
Copy link

nzjrs commented Jun 12, 2017

AFAICT nbconvert only appears to be used in the tests, yet is required to be installed. nbconvert then itself depends on jupyter-core.

maybe they can be moved to a test dependency and not a run-time one?

@jonmmease jonmmease added this to the v3.3.0 milestone Sep 22, 2018
@jonmmease
Copy link
Contributor

Ok, so here's the back story on the nbformat dependency. It was added in response to the problem reported in #692, where notebooks using the offline iplot support would result in validation failures if the version of nbformat was <4.2.

I feel comfortable removing this dependency now because our jupyter installation instructions specify notebook and ipywidgets versions that require nbformat>=4.2 anyway.

cc @chriddyp

@chriddyp
Copy link
Member

I'm OK with keeping it in. Not everyone follows the instructions and we really do need that minimum version.

@jonmmease
Copy link
Contributor

Ok, yeah. it's probably not worth risking a regression by changing this. This is a tricky problem in general for us now though. We also need ipywidgets >7 for FigureWidget to work, but this is currently not a dependency because that would make the entire Jupyter Notebook a dependency.

On the conda side there is a run_constrained construct that allows packages to specify version constraints for optional dependencies, so in the future I may see what it would look like to use this for nbformat and ipywidgets.

@jonmmease jonmmease removed this from the v3.3.0 milestone Sep 26, 2018
@AbdealiLoKo
Copy link

I would like to open this up again, I have a scenario where we are not using Jupyter notebooks, but want to use plotly.
We are generating plotly figures and saving HTML files to render appropriately.
Jupyter is not whitelisted in my installation location, and due to the: plotly -> nbformat -> jupyter-core dependency, I am unable to install plotly.
This seems to be a hard constraint in some of the locations where I am trying to install my package and application ...

Note: I am installing plotly from pip.
Is it possible to have an extra_requires called plotly[jupyter] that people should use when trying to install plotly and use in jupyter ? (atleast for pip?)

@jonmmease
Copy link
Contributor

Hi @AbdealiJK,

Thanks for describing how this dependency has caused you issues. I think version 4 will be a good time to change this. In version 4 we are making a concerted effort to make it more pleasant to use plotly.py in non-jupyter contexts, so this would fit well with that goal.

nbformat 4.2 was released in December 2016 (https://pypi.org/project/nbformat/#history), so I think the chances of someone ending up with plotly v4 and nbformat<4.2 are pretty low. If it does become a problem, we could also add a runtime version check in the offline.iplot code.

@nicolaskruchten @chriddyp

@jonmmease jonmmease added the V4 label Jun 15, 2019
@nicolaskruchten
Copy link
Contributor

I'm OK with it if @chriddyp doesn't object.

@jonmmease
Copy link
Contributor

Doing this for v4 in #1631. I removed the hard dependency and opted for a runtime check on the version of nbformat when mimetype rendering is requested. Thanks for bring this up again @AbdealiJK.

@AbdealiLoKo
Copy link

On a slightly unrelated note, I was trying to understand the changes that were planned on plotly v4 - specifically I was interested in whether plotly transforms were being supported better (currently I have to convert to JSON > dict and then add transforms)

And couldn't find a place to identify all v4 changes. I did see plotly_future .v4
But it would be nice to have a v4 (unreleased) section to note down all these changes so people can understand better what v4 will bring.

@jonmmease
Copy link
Contributor

Hi @AbdealiJK,

The best summary right now is probably the V4 GitHub tag. We'll be working on better release notes soon. Thanks

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

5 participants