MESMER-group / mesmer

spatially-resolved ESM-specific multi-scenario initial-condition ensemble emulator
https://mesmer-emulator.readthedocs.io/en/latest/
GNU General Public License v3.0
22 stars 15 forks source link

unshallow git repo on rtd #454

Closed mathause closed 1 month ago

mathause commented 1 month ago

While we are at it we should also unshallow the mesmer git repository on rtd (or fetch the tags). See: https://github.com/regionmask/regionmask/blob/2161e2c713fc8ae3c380264ddbeaaed68c7792ad/.readthedocs.yml#L10

Context: we display the version number in the top left corner of the docs. Which includes the version number, and if it's not a realease version, also the number of commits and it's hash. To compute the version number we need the git tag. However, as rtd does a shallow clone and then fetches the commit with a depth of 50, it only downloads the tag if we have fewer than 50 commits. So we just lost it and it now shows version 0

image

image

Originally posted by @mathause in https://github.com/MESMER-group/mesmer/issues/453#issuecomment-2124937480