Sorry, something went wrong.
|
Can now force offscreen rendering, so the gallery is being generated. Current issue is figuring out how to format the index.rst and conf.py in order to properly display the gallery. |
Sorry, something went wrong.
Sorry, something went wrong.
|
@clewis7 remove the "nbsphinx", it seems to create some conflicts |
Sorry, something went wrong.
There was a problem hiding this comment.
this solves the refs not being generated
Sorry, something went wrong.
|
@kushalkolar Like Edo said, in order to use sphinx-gallery we would need to remove nbsphinx. Pitfall of this is that then the quickstart.ipynb will not render... |
Sorry, something went wrong.
|
That's ok, specific examples are more important. |
Sorry, something went wrong.
|
This is great 😄 ! Some things: Can you pre-download the images in conf.py so we dont get this: Also need to figure out how to properly set the canvas size so that when the screenshots are taken we don't have that huge blank space. Can you check how we can have animated examples, like pygfx: https://pygfx.com/stable/_gallery/introductory/cube.html#sphx-glr-gallery-introductory-cube-py We can show some of the animations from quickstart, and I guess if you tag it with "test_examples = false" it will generate sphinx gallery docs with that example but not use it for the test suite? Since we don't want animation examples to run with screenshot tests (at least not yet, maybe later 😄 ) |
Sorry, something went wrong.
There was a problem hiding this comment.
More:
For each example, specify that the if __name__ == "__main__" is NOT how it's supposed to be done for interactive use. We should make a doc page on interactive use in ipython and jupyter using this: https://wgpu-py.readthedocs.io/en/stable/gui.html#using-wgpu-interactively
Users should never call fpl.run() for interactive use.
Sorry, something went wrong.
| fig[1, 0].add_image(data=im3) | ||
| fig[1, 1].add_image(data=im4) | ||
|
|
||
| # set canvas variable for sphinx_gallery to properly generate examples |
There was a problem hiding this comment.
specifiy that this line isn't required for users, or see if there's a way for the pygfx scraper to look for fig.canvas instead of canvas?
in all examples
Sorry, something went wrong.
There was a problem hiding this comment.
I think perhaps we can use figure instead...
pygfx scraper looks for one of ["renderer", "canvas"] to be defined, but will also look through proxy objects such as "figure", "display", "disp", "plot"
So I will try that
Sorry, something went wrong.
There was a problem hiding this comment.
I tried changing fig to figure so then the scraper would look for figure.canvas...but then writing the thumbnails failed
Sorry, something went wrong.
There was a problem hiding this comment.
I think for now, we should just to canvas = fig.canvas and have a note saying that it is not required for users and after FENS I can look into fixing them
Sorry, something went wrong.
|
NOTE: |
Sorry, something went wrong.
|
TODO:
|
Sorry, something went wrong.
|
After this I propose:
|
Sorry, something went wrong.
|
After this I propose:
This sounds good to me, and doable before FENS |
Sorry, something went wrong.
|
A few event examples too, click event that changes colors of closest circle, and another example where changing a feature prints the event attributes and event.info. |
Sorry, something went wrong.
|
I added a simple event example but I am going to hold off adding any more examples until we merge this with graphic features PR |
Sorry, something went wrong.
|
@kushalkolar merged main and updated...should be ready for review :D |
Sorry, something went wrong.
| figure.canvas.set_logical_size(700, 560) | ||
|
|
||
| # NOTE: `if __name__ == "__main__"` is NOT how to use fastplotlib interactively | ||
| # please see our docs for using fastplotlib interactively in ipython and jupyter |
There was a problem hiding this comment.
make a section, perhaps in the guide, on using fpl interactively in jupyter lab and ipython, the wgpu docs might provide some inspiration: https://wgpu-py.readthedocs.io/en/stable/gui.html#using-wgpu-interactively
but basically, there is %gui qt and in jupyterlab or ipython they can also do fig = fpl.Figure(canvas="glfw") to use glfw
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, something went wrong.
|
This example seems like it's missing from the gallery 🤔 https://github.com/fastplotlib/fastplotlib/blob/main/examples/desktop/line_collection/line_stack_3d.py |
Sorry, something went wrong.
|
This example seems like it's missing from the gallery 🤔 https://github.com/fastplotlib/fastplotlib/blob/main/examples/desktop/line_collection/line_stack_3d.py ahhh, wasn't rendering properly because of the canvas size I found that the canvas size needs to be (700, 560)...sphinx-gallery likes that best |
Sorry, something went wrong.
start #486 for hopefully the last time :)
According to @almarklein, should just be able to directly use pygfx image scraper
Initially, I am just trying to get it to work with one set of the desktop examples.
Current issues:
@kushalkolar @almarklein thoughts?