xarray-contrib/xbatcher

Show version snapshots in xbatcher's readthedocs page

Closed this issue · 6 comments

Is your feature request related to a problem?

Currently at https://xbatcher.readthedocs.io/en/latest/api.html, there are only 'latest' and 'stable' versions of the documentation to switch between. With 'latest' being what's on xbatcher's 'main' branch, and 'stable' being the last release (v0.2.0).

image

Describe the solution you'd like

Each tagged version should have it's own documentation page. E.g. in xarray at https://docs.xarray.dev/en/v2022.12.0, it is possible to show the documentation for different release versions
image

This helps when there are significant API changes (which might be coming up in future xbatcher releases), and people need to refer back to older versions like v0.1.0.

Describe alternatives you've considered

Keep the status quo of just 'latest' and 'stable'.

Additional context

The readthedocs setting is documented at https://docs.readthedocs.io/en/stable/versions.html. If I'm not mistaken, it should involve unchecking the 'Single version' box at https://readthedocs.org/dashboard/xbatcher/advanced?

image

Also, it should be possible to build previous tagged versions (v0.1.0, v0.2.0) at https://readthedocs.org/projects/xbatcher/versions/

Seems like a good idea to me! That box is already unchecked, but I could look into this more or add you to the project on readthedocs if you're interested in working on it.

Hmm, maybe the setting is somewhere else. If you add me as a maintainer (my readthedocs username is same as on GitHub), I'll try to find it. I knew I had to do it in weiji14/zen3geo#13, but forgot exactly how 😅

Thanks Max for the invite! I think I've figured it out, the steps are:

  1. Go to https://readthedocs.org/projects/xbatcher/versions/
  2. Under 'Activate a version', select a tag (e.g. v0.2.0) and click on 'Activate'
  3. Check the 'Activate' box and click 'Save'
    Activating the v0.2.0 docs build
  4. Wait for the tagged versions to build, see progress under https://readthedocs.org/projects/xbatcher/builds
    Builds triggered for tags v0.2.0 and 0.1.0

Not sure if we have to manually trigger this for every tagged release (I don't recall having to do it for zen3geo), but yeah, here are the tagged builds:

Closing this issue as completed.

Super, thanks @weiji14!

reopening in order to add the version switcher to the pydata theme configuration (https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html#version-switcher-dropdowns)

Fixed by #152