Skip to content

[WIP] Plotly scraper and examples#493

Closed
emmanuelle wants to merge 10 commits intosphinx-gallery:masterfrom
emmanuelle:plotly
Closed

[WIP] Plotly scraper and examples#493
emmanuelle wants to merge 10 commits intosphinx-gallery:masterfrom
emmanuelle:plotly

Conversation

@emmanuelle
Copy link
Copy Markdown
Contributor

Following encouraging ❤️ in #441, here is a WIP PR for a plotly scraper in scrapers.py, and two examples (2D and 3D). The examples should probably be in a separate gallery like the mayavi ones, but I first wanted to see whether there is interest for this addition.

@emmanuelle
Copy link
Copy Markdown
Contributor Author

I had to write a couple of hacks for generating the notebooks, in particular for the first notebook cell and also to replace the "plot" commands by "iplot".

@emmanuelle
Copy link
Copy Markdown
Contributor Author

The different CIs are failing because of installation problems with the orca executable used by plotly to generate static images, I'll work on this issue later.

Copy link
Copy Markdown
Contributor

@larsoner larsoner left a comment

Choose a reason for hiding this comment

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

Sorry for the slow feedback. Thinking about maintainability, it might make more sense to have new scrapers outside SG. The dependencies for CIs alone will create nightmares for us that are much better addressed by the individual external packages (in their repos).

Then in SG we can look to the API pages for packages that expose scraper functions. WDYT?

@larsoner
Copy link
Copy Markdown
Contributor

Seeing half a dozen commits already for tweaking CIs to get them to run here (something that plotly must have solved on their own internally, and already maintains, etc.) makes me think more strongly that #441 (comment), or some other variant of "keep code for other scrapers in the packages that need scraping", is a better approach. Before working too hard on the CIs here, can you see if you agree?

@emmanuelle
Copy link
Copy Markdown
Contributor Author

@larsoner now that I've started the PR I'd like to debug the CI :-). But of course I'm fine with the approach you recommend and which is described in more details in #441. It's just that the doc of sphinx-gallery says "If you've developed a custom scraper for Sphinx-gallery that would be useful to the broader community, we encourage you to contribute it to the list of natively-supported scrapers located in the scrapers module. We welcome PRs!". Since plotly is a quite popular plotting library and it's been discussed in a couple of issues, I thought it qualified as "useful for the broader community" ;-). But of course you'll need to limit the number of scrapers for maintainability. Maybe this bit in docs/advanced.rst should be updated?

@larsoner
Copy link
Copy Markdown
Contributor

If you've developed a custom scraper for Sphinx-gallery that would be useful to the broader community, we encourage you to contribute it to the list of natively-supported scrapers located in the scrapers module. We welcome PRs

Yeah I think we should update this. On further inspection I think it wasn't as good a plan as I/we originally thought.

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.

2 participants