-
Notifications
You must be signed in to change notification settings - Fork 89
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
chore: start using hatch-vcs for version numbers #3007
base: main
Are you sure you want to change the base?
Conversation
This will have to wait until after 2.6.1. We can use 2.6.2rc1 as a practice-run, like Uproot 5.2.2rc1. |
The issue here is that the default GitHub checkout includes a single commit. That's not sufficient to deduce the version. We might be able to do something smart and download full-history only when the current workflow was triggered by a non-tag event (and filter that tag to ensure it's a |
All of the tags in this git repo match one of three patterns:
It would be fine to consider only the first case. |
How long does it take for GitHub to clone the entire repo history? It is for sure wasteful, but if it is less than 10 seconds is it that much of a delay in dev flow on PRs? |
Personally, I'm not at all concerned with the time needed to clone the entire repo. It's much less than the time needed to run all of the tests. |
I delved into this again, and it looks like there's still no easy way to avoid Normally I'm one to push for plugins, but taking a step back I think it might not be a needed change. My feeling is that we want to make the release workflows simpler and less error prone. This PR would make that easier by detecting the version set by a new Release in the GitHub UI. I wonder if it would be "better" to invert it, and have a workflow that creates a draft release when the version is bumped. Some potential benefits:
Honestly, I'm biased; I don't love VCS versioning because it adds abstraction to something that I find useful to read from the source files. I'm happy to write the CI infrastructure to do this release work, but if @jpivarski you'd prefer the VCS-based solution, I won't keep pushing this alternative! I can push this PR over the line in that case. |
Until this year, I was against VCS because I wanted to have control over the version numbers; I wanted the version number to be what I set it to in a file. However, as releases got more routine, I've been sold on streamlining the process. As a bonus, if someone checks out the code with git and builds it locally, the version number is different from any official release, which is useful information to consider in bug reports. Then the blocker was that Awkward has a C++ part that doesn't integrate well with hatch-vcs. But now all of that is separated out into I'm a little worried that our suite of GitHub Actions workflows is too complex, in the sense that I don't understand them well enough to fix problems if they go awry. The tasks that I know they do are:
After that, it starts to get hazier: documentation is built and deployed in PR mergers, and it's built and put in a staging area on AWS for PR commits (a very useful feature when writing documentation). Those are probably docs.yml and docs-version.yml. Wheel-building gets tested separately from the basic CI, and that's build-wheels.yml, packaging-test.yml, or both. What remains is coverage.yml, lint.yml, and header-only-test.yml; I can guess what they do from their names, but I don't know when they run. That was a long story—but if the thing that's holding this back is a formality, especially if it's one that complicates the workflows, rather than making them simpler, then I'd be on the side of removing that formality and adding standard hatch-vcs. |
At the least, I can get this PR up to date with |
No description provided.