tobac-project / tobac

Tracking and object-based analysis of clouds
BSD 3-Clause "New" or "Revised" License
103 stars 54 forks source link

Thumbnails for Notebook Gallery Got Lost #426

Closed fsenf closed 5 months ago

fsenf commented 8 months ago

It is a bit tricky to selected cool images for the notebook gallery. By default, the gallery plugin is selecting the last image in the notebook, but this looks often similar and is sometime not the pretties ....

To change this, I set meta data tags within the notebooks like this:

       "tags": [
     "nbsphinx-thumbnail"
    ]

in this commit: https://github.com/tobac-project/tobac/pull/411/commits/e28d4c3af4b181bed2fbcbf0bfdd11776cc41dc8

The tags were somehow lost in the code development process and it shows that a smarter way of selecting thumbnails for the gallery is needed.

Maybe we should have a look at other python packages like https://docs.xarray.dev/en/stable/gallery.html

w-k-jones commented 8 months ago

I think this happened because the code to regenerate the notebooks removes all output cells before running them. We will have to check if there is a way to preserve the metadata tags when doing this

freemansw1 commented 5 months ago

Fixed with #428