[WIP/Experimental] Capturing objects. Bokeh test case#324
[WIP/Experimental] Capturing objects. Bokeh test case#324Titan-C wants to merge 19 commits intosphinx-gallery:masterfrom
Conversation
|
|
||
| * Fix __future__ imports across cells. See `#308 | ||
| <https://github.com/sphinx-gallery/sphinx-gallery/pull/308>` for more details. | ||
| <https://github.com/sphinx-gallery/sphinx-gallery/pull/308>`_ for more details. |
There was a problem hiding this comment.
😞 the syntax for rst link is something I will never get right on the first attempt I am afraid. I have fixed that in master.
0c1f0d4 to
49d4f11
Compare
[MRG] Add note at the beginning of the example to the download section at the bottom (sphinx-gallery#362) * Note at the beginning of the example linking to download section * Add class to download link note Update misleading doc about `download_all_examples` (sphinx-gallery#377) Support for custom default thumbnails in 'RGBA' space (sphinx-gallery#375) PEP 8 API: Refactor image scraping FIX: str FIX: Revert tinybuild changes FIX: Fix doc FIX: Fix example
Codecov Report
@@ Coverage Diff @@
## master #324 +/- ##
=========================================
- Coverage 95.38% 93.8% -1.58%
=========================================
Files 27 24 -3
Lines 2013 2130 +117
=========================================
+ Hits 1920 1998 +78
- Misses 93 132 +39
Continue to review full report at Codecov.
|
|
This is working on my machine. Getting the dependencies installed correctly in CI is a kind of a pain. But you can test on your machine. |
|
Dependencies on Circle CI are good. Don't understand why it doesn't work. I'll try other day. |
|
Figured out the bugs. Here it is |
|
I think most of the necessary functionality now exists in |
I gave it a try on how to capture objects. This takes on the work proposed PR#313
I would also like to have PR #311 dealing with encodings, and PR #239 which is only some refactoring of the functions in gen_rst dealing with the rst files generation merged first.
I base this PR on the idea that the object capturer shall return directly the rst representation for direct embedding in the HTML.
I have seen that a big problem with capturing arbitrary objects is that, unlike matplotlib or mayavi there is no state machine to know what is plotted. Thus scrapers of png images where proposed. In this PR I propose to allow the capture function to access the state dictionary of the executed example and the source code of the block. Then I allow myself to specify as a comment in the source code what has to be captured.