Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace sphinx_gallery with notebook #3106

Merged
merged 3 commits into from
Jul 13, 2019

Conversation

rabernat
Copy link
Contributor

Today @jhamman and I discussed how to refactor our somewhat fragmented "examples". We decided to basically copy the approach of the dask-examples repo, but have it live here in the main xarray repo. Basically this approach is:

  • all examples are notebooks
  • examples are rendered during doc build by nbsphinx
  • we will eventually have a binder that works with all of the same examples

This PR removes the dependency on sphinx_gallery and replaces the existing gallery with a standalone notebook called visualization_gallery.ipynb. However, not all of the links that worked in the gallery work here, since we are now using nbsphinx to render the notebooks (see spatialaudio/nbsphinx#308).

Really important to get @dcherian's feedback on this, as he was the one who originally introduced the gallery. My view is that having everything as notebooks makes examples easier to maintain. But I'm curious to hear other views.

@rabernat rabernat requested a review from dcherian July 13, 2019 05:35
@rabernat rabernat changed the title Gallery to notebook Replace sphinx_gallery with notebook Jul 13, 2019
@codecov
Copy link

codecov bot commented Jul 13, 2019

Codecov Report

Merging #3106 into scipy19-docs will not change coverage.
The diff coverage is n/a.

@@              Coverage Diff              @@
##           scipy19-docs    #3106   +/-   ##
=============================================
  Coverage         95.99%   95.99%           
=============================================
  Files                63       63           
  Lines             12796    12796           
=============================================
  Hits              12284    12284           
  Misses              512      512

@dcherian
Copy link
Contributor

It wasn't me!

@rabernat
Copy link
Contributor Author

I'm gonna merge this so we can use it at the SciPy sprint. Can always revert later.

@rabernat rabernat merged commit 92cd3c4 into pydata:scipy19-docs Jul 13, 2019
keewis pushed a commit to keewis/xarray that referenced this pull request Nov 21, 2019
* switching out examples to use nbsphinx

* added jupyter_client to doc env

* moved gallery to notebook
dcherian pushed a commit that referenced this pull request Nov 22, 2019
* Switch doc examples to use nbsphinx (#3105)

* switching out examples to use nbsphinx

* added jupyter_client to doc env

* added ipykernel to doc env

* Replace sphinx_gallery with notebook (#3106)

* switching out examples to use nbsphinx

* added jupyter_client to doc env

* moved gallery to notebook

* Allow other tutorial filename extensions (#3121)

* switching out examples to use nbsphinx

* added jupyter_client to doc env

* allow non netcdf tutorial files

* Added ROMS ocean model example notebook (#3116)

* change name of test env to xarray-tests (#3110)

* ROMS_ocean_model example added

* Allow other tutorial filename extensions (#3121)

* switching out examples to use nbsphinx

* added jupyter_client to doc env

* allow non netcdf tutorial files

* Changed load to xr.tutorial.open_dataset(), and
added some extra documentation.

* change name of test env to xarray-tests (#3110)

* ROMS_ocean_model example added

* Changed load to xr.tutorial.open_dataset(), and
added some extra documentation.

* fixed colormap issues leftover from cmocean import

* Added intro paragraph to ROMS example notebook, removed comments, and added citation in whats-new.

* Add an example of ERA5 and GRIB data & visualization to the gallery (#3199)

* Adds an example of ERA5 and GRIB data to the gallery

* Add markdown narrative cells to GRIB example

* Update load method to use xr.tutorial

* Fix load method

* require nbsphinx for the documentation builds

* add more nbsphinx dependencies

* install cfgrib using pip

* add the eccodes library to the dependencies

* remove the dependency on sphinx-gallery

* add the ERA5 GRIB example to the list

* update the documentation links

Missing: section links in visualization_gallery.ipynb don't work yet,
also the one in io.rst (it has a unicode char).

* Fix leap year condition in monthly means example (#3464)

* Typo correction in docs (#3387)

* Update terminology.rst (#3455)

Fixed broken link

* Error in leap year?

I've tried this script; however, it adds +1 to all months of the leap years. It sounds like an error, or I am wrong? So I wrote the condition "and month == 2" line 86 so that only the month of February gets +1.

* Fix leap year (#3464)

* Update doc/whats-new.rst

Co-Authored-By: Deepak Cherian <dcherian@users.noreply.github.com>

* fix the reference to the rasterio geocoordinates docs

* update whats-new.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants