-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
setuptools_scm incompatible with default actions/checkout@v2 #480
Comments
if the commit graph is incomplete, setuptools_scm cant connect the dots between tagged commit and current commit |
actions/checkout#249 was requested quite a while back to solve this, it may be necessary to develop a feature in turn where setuptools_scm provides a actions to cheaply generate the metadata however i not in a position to start work on such tooling this year |
Thanks for the quick reply. Will simply rely on |
closing this as upstream issue with gitlab actions |
…elease (#29) This PR ensures that in the release workflow we do a full clone, so that setuptools_scm has enough information to compute a version number. We don't strictly need this if we only ever expect to be making releases from a tagged commit (which seems likely), but the failure mode if this is left out is that we compute a wrong version. So it seems better to include it. If some future version of setuptools_scm makes this an error, it should be safe to remove this. See pypa/setuptools-scm#480 for more discussion.
The automated documentation build workflow currently miscomputes the version number because GitHub Actions makes a shallow clone without tags, so there's no way to compute the version number from the tags. This PR fixes that by having the action clone the whole repository. See also pypa/setuptools-scm#480
…ubstitution (#99) # Description See napari/napari#5509 (comment) The docs live on napari.org don't match PR action downloaded docs when doing napari version substitution (#51) This PR updates the deploy action with `fetch-depth: 0` that was added to the PR `build_docs` action. This should make the version metadata be correct (see pypa/setuptools-scm#480) ## Type of change <!-- Please delete options that are not relevant. --> - [x] Fixes or improves existing content - [ ] Adds new content page(s) - [ ] Fixes or improves workflow, documentation build or deployment # References Adresses issue noted here napari/napari#5509 (comment) ## Final checklist: - [x] My PR is the minimum possible work for the desired functionality
…stitutions (#5557) # Description This PR an an analog to napari/docs#99 The built docs built by this repo PR action have improper napari version substitution (see napari/docs#51) This PR fixes that based on the README of https://github.com/actions/checkout It updates the deploy action with `fetch-depth: 0`. You can see that this was added to the napari/docs PR build_docs action and works correctly. This makes the version metadata be correct (see pypa/setuptools-scm#480) ## Type of change - [x] Bug-fix (non-breaking change which fixes an issue) # References Motivated by napari/docs#51 Analog to napari/docs#99
This is necessary to enable setuptools-scm to infer the version number. Ref: <pypa/setuptools-scm#480>
This resolves the wrong Loki version annotation due to missing git history. See pypa/setuptools-scm#480.
actions/checkout@v2 no longer fetches tags by default, rather only a single commit,
$GITHUB_REF
(actions/checkout#100).Hence,
fetch-depth: 0
is needed for the proper version to be detected (unless GH actions runs was triggered on a tag@HEAD):This however slows down checkout significantly on big repos (actions/checkout#258).
Only fetching tags (manually) does not solve the problem:
What would be the minimum amount of info to fetch for setuptools_scm to pick up the right tag? Any explanation why it doesn't detect version after running
git fetch origin --depth=1 +refs/tags/*:refs/tags/*
? Potentially related comment: https://github.com/actions/checkout#217#issuecomment-614067896The text was updated successfully, but these errors were encountered: