Adding examples to the gallery#
You have a cool application of HuracanPy? We would love for you to share it with the world to showcase what can be done with the package!
The recommend format for example pages in Jupyter Notebooks. While it is preferable that examples are based on HuracanPy’s embedded example data, on downloadable data, or on data that is generated within the example, it is possible to use your own data. In that case, the notebook cannot be updated when the documentation is re-built (see NB below).
Create a notebook with your code in
docs/examples/, some explanations, and your potential nice images.By default the thumbnail image in the gallery will be the last image. To use a different image, add
nbsphinx-thumbnailto the tags of the cell you want to use. See here for more details.(Optional) Check out the result by building the doc locally. Run
make htmlin thedocsfolder and open the html files indocs/_build/html/Commit and push the changes to your own fork.
Create a pull request to add your example to the online documentation.
NB: Notebooks may or may not be re-run at each documentation build. While re-running helps with keeping the documentation up-to-date, we cannot re-run your notebook if it uses data that is on your own computer. We also do not wish to re-run computations that may take significant time every time.
For your notebook to be re-run, you need to clear cell’s output: In the Edit Menu, select “Clear Outputs of All Cells” before saving your notebook.
For your notebook not to be re-run, do the opposite: Be careful to run all cells before saving the notebook.