Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

larsoner
Copy link
Contributor

Closes #441.
Closes #493.

@larsoner
Copy link
Contributor Author

@emmanuelle @banesullivan let me know if these docs look good to you:

https://880-25860190-gh.circle-artifacts.com/0/rtd_html/configuration.html#image-scrapers
https://880-25860190-gh.circle-artifacts.com/0/rtd_html/advanced.html#integrate-custom-scrapers-with-sphinx-gallery

Once you've implemented the private interface in the modules in the external list, it would be nice to say they can be used by just doing 'image_scrapers': ['pyvista'] or ['plotly']. So please feel free to make a PR to SG to add a note about this once it's implemented.

@larsoner larsoner changed the title ENH: Add private API for external scrapers MRG, ENH: Add private API for external scrapers May 20, 2019
@codecov-io
Copy link

codecov-io commented May 20, 2019

Codecov Report

Merging #494 into master will decrease coverage by 0.03%.
The diff coverage is 92.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #494      +/-   ##
==========================================
- Coverage   96.34%   96.31%   -0.04%     
==========================================
  Files          29       29              
  Lines        2681     2711      +30     
==========================================
+ Hits         2583     2611      +28     
- Misses         98      100       +2
Impacted Files Coverage Δ
sphinx_gallery/scrapers.py 97.43% <ø> (ø) ⬆️
sphinx_gallery/gen_gallery.py 92.3% <100%> (+0.55%) ⬆️
sphinx_gallery/gen_rst.py 97.7% <50%> (-0.56%) ⬇️
sphinx_gallery/tests/test_scrapers.py 98.56% <95.65%> (-0.61%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8c630d0...4882cc3. Read the comment docs.

banesullivan added a commit to pyvista/pyvista that referenced this pull request May 20, 2019
@banesullivan
Copy link
Contributor

Looks good to me! I just added _get_sg_image_scraper to the master branch of PyVista so this will be live on our next release!

@larsoner
Copy link
Contributor Author

Cool. @choldgraf you okay with the updated docs and functionality? Here is what pyvista did to make it work (assuming @banesullivan tested it locally and it did indeed work):

https://github.com/pyvista/pyvista/blob/master/pyvista/__init__.py#L34
https://github.com/pyvista/pyvista/blob/master/pyvista/sphinx_gallery.py#L10-L18

@banesullivan
Copy link
Contributor

banesullivan commented May 20, 2019

(assuming @banesullivan tested it locally and it did indeed work)

Tested in pyvista/pyvista@d474c94

@larsoner
Copy link
Contributor Author

I meant with the nicer syntax 'image_scrapers': ['pyvista'] (while on this branch)

banesullivan added a commit to pyvista/pyvista that referenced this pull request May 20, 2019
banesullivan added a commit to pyvista/pyvista that referenced this pull request May 20, 2019
@emmanuelle
Copy link
Contributor

Thanks @larsoner ! Looks good to me.

@banesullivan
Copy link
Contributor

I meant with the nicer syntax 'image_scrapers': ['pyvista'] (while on this branch)

Tested and working on a separate branch shown in my last linked commit ^^^ https://travis-ci.org/pyvista/pyvista/builds/534954544

@larsoner larsoner merged commit c19bffc into sphinx-gallery:master May 21, 2019
@larsoner larsoner deleted the scrape branch May 21, 2019 13:38
@larsoner
Copy link
Contributor Author

Okay it's in, @banesullivan after you integrate and release, feel free to open a PR here to update the instructions to say 'pyvista' works

@banesullivan
Copy link
Contributor

Okay it's in, @banesullivan after you integrate and release, feel free to open a PR here to update the instructions to say 'pyvista' works

@larsoner: PyVista 0.20.3 is out with the _get_sg_image_scraper method imlemented. I'm a bit confused on what I need to do here on the SG side... tips?

@larsoner
Copy link
Contributor Author

First make sure the string actually works in your builds. Then update the docs to say something like:

From PyVista 0.20.3 on, you can simply use 'image_scrapers': ('pyvista',) to scrape PyVista images

@larsoner
Copy link
Contributor Author

(update the SG gallery docs in the image scrapers section I mean)

Also maybe we should now break up the section a bit. Let me try

@larsoner larsoner mentioned this pull request Jun 20, 2019
banesullivan added a commit to pyvista/pyvista that referenced this pull request Jun 27, 2019
* Test for sphinx-gallery/sphinx-gallery#494

* Test string get for sphinx-gallery/sphinx-gallery#494

* Use latest sphinx-gallery

* Require sphinx-gallery>=0.4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Plotly
4 participants