-
Notifications
You must be signed in to change notification settings - Fork 130
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
Plotly #302
Plotly #302
Conversation
Thanks for this PR!
It would probably be nicer to include it only in pages that are generated from notebooks. Is it really necessary to include a What about testing for require.js in the section https://nbsphinx.readthedocs.io/en/0.4.2/code-cells.html#Arbitrary-JavaScript-Output-(HTML-only)? We could show there that both jQuery and require.js are available. |
@mgeier I put the script in the
Plotly is one of major libraries, and I included this to be sure it actually works in this package, since in my experience there's always some package tool where it doesn't work. So, let's actually test it works in all of the packages! I can make a better graph so it looks more funny.
I am not sure if I am understanding why. For me, as an end-user, plotly example belongs in Plots since as an end-user I don't care about JavaScript, I care that my graphs are saved. |
I guess the block is called
Sure, and I would like to make it easy for Plotly users. Those plots should Just Work. But I want to keep the dependencies (even if it's only the documentation dependencies) as small as possible, and I don't think we actually need a Plotly plot to test if require.js is available. |
@mgeier I agree upon the dependencies, I removed plotly and graph but how can I test if |
Yes, that's expected, because the Notebook only provides a part of the page, the actual HTML Would you prefer the script to be loaded in If yes, I don't know how to do that with Sphinx (other than adding it to all files, not only notebooks).
Good question. I looked around for a minimal example, but I couldn't find anything concise. What if we don't change the documentation at all? After your PR it should work fine, do we really need additional information in the docs? There are many things which just work even though they are not mentioned in the docs ... |
I am ok with both. Let's merge it and see how it goes. |
@mgeier let's merge it? The tests seem to fail because one website was unavailable. |
@manycoding Sorry for the delay, I've just merged it. I would like to make the URL configurable at some point, but for now the fixed URL has to be enough. |
I've created #327 to make the URL configurable (and optional). |
Closes #128
@mgeier Please review. I am not sure where to put this javascript in the code. Also, should we include it in all the pages?