-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update hardcoded versions, properly fill release notes #17
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nwiltsie
commented
Oct 2, 2024
aholmes
reviewed
Oct 2, 2024
aholmes
reviewed
Oct 2, 2024
aholmes
approved these changes
Oct 2, 2024
yashpatel6
approved these changes
Oct 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more manual version PRs 🎉
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Apologies again for the sprawl - this was supposed to stop at 6abcb41, but then I caught an unrelated bug that needed fixing.
The big change in this PR is the addition of an optional new
version_files
input to the release preparation workflow. That input (a string of comma-separated relative paths) is used to update hard-coded version strings throughout the repository while prepping the release. That means that we can now use this tool for pipelines, point that argument atnextflow.config
, and then never manually adjust a version number again. It should also work for RDESCRIPTION
files, pythonversion.py
files, etc.You can see this in action with https://github.com/uclahs-cds/docker-internal-tests/pull/27 (and all of the other recent releases from that repository):
The way I'm updating those files is intentionally pretty brittle - I've got a big regex that looks for lines of the form
version = xxx
(handling quotes, spaces, commas, comments, capitalization, etc.). If any of the input files have 0 or 2+ matches the action fails. That should hopefully encourage users to keep the version strings distinct and avoid a regex arms-race.The rest of the changes in this PR come from a consequence of #13 - GitHub's default behavior when creating release notes is to use the most recent tag... and since the dynamic
v2
alias tag is explicitly updated after the stable release tag, it ended up getting chosen. See https://github.com/uclahs-cds/docker-internal-tests/releases/tag/v2.1.1 for an example.Fixing that requires parsing the tags and semantic version numbers of prior releases, so I moved the release finalization logic out of JavaScript and into python. You can see the correct link to the prior tag in https://github.com/uclahs-cds/docker-internal-tests/releases/tag/v2.2.0 .
I added a bunch of unit tests for the version file updating and the prior release tag discovery as well:
tool-create-release/tests/test_versionfiles.py
Lines 8 to 77 in a4d5696
Closes #10
Checklist
This PR does NOT contain Protected Health Information (PHI). A repo may need to be deleted if such data is uploaded.
Disclosing PHI is a major problem1 - Even a small leak can be costly2.
This PR does NOT contain germline genetic data3, RNA-Seq, DNA methylation, microbiome or other molecular data4.
.png
, .jpeg
),.pdf
,.RData
,.xlsx
,.doc
,.ppt
, or other output files.To automatically exclude such files using a .gitignore file, see here for example.
I have read the code review guidelines and the code review best practice on GitHub check-list.
I have set up or verified the
main
branch protection rule following the github standards before opening this pull request.The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].
I have added the major changes included in this pull request to the
CHANGELOG.md
under the next release version or unreleased, and updated the date.Footnotes
UCLA Health reaches $7.5m settlement over 2015 breach of 4.5m patient records ↩
The average healthcare data breach costs $2.2 million, despite the majority of breaches releasing fewer than 500 records. ↩
Genetic information is considered PHI.
Forensic assays can identify patients with as few as 21 SNPs ↩
RNA-Seq, DNA methylation, microbiome, or other molecular data can be used to predict genotypes (PHI) and reveal a patient's identity. ↩