From 81b9d5bfcdaa369461b6834f01b46bea4378b5f5 Mon Sep 17 00:00:00 2001 From: Martin Yeo <40734014+trexfeathers@users.noreply.github.com> Date: Wed, 2 Oct 2024 11:22:31 +0100 Subject: [PATCH] Use unshallow Git fetch for setuptools-scm (Read the Docs) (#491) * Test unshallow. * Add comment. --- .readthedocs.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 444107b5..85a1e60b 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,9 +6,10 @@ build: python: mambaforge-4.10 jobs: post_checkout: - # reference: https://github.com/SciTools/cf-units/pull/272 - # perform a "git fetch --unshallow" when the cf-units repo - # becomes incomplete i.e., there is a .git/shallow. + # The SciTools/cf-units repository is shallow i.e., has a .git/shallow, + # therefore complete the repository with a full history in order + # to allow setuptools-scm to correctly auto-discover the version. + - git fetch --unshallow - git fetch --all pre_install: # create a "common" link to the underlying rtd conda environment,