-
Notifications
You must be signed in to change notification settings - Fork 27
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
🎨 improve release notes (ignore minor version) #6393
base: master
Are you sure you want to change the base?
🎨 improve release notes (ignore minor version) #6393
Conversation
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6393 +/- ##
=========================================
+ Coverage 84.5% 87.9% +3.4%
=========================================
Files 10 361 +351
Lines 214 18066 +17852
Branches 25 0 -25
=========================================
+ Hits 181 15898 +15717
- Misses 23 2168 +2145
+ Partials 10 0 -10
Flags with carried forward coverage won't be shown. Click here to find out more.
|
# https://github.com/ITISFoundation/osparc-issues/blob/master/release-notes/osparc/{vtag}.md | ||
data["vcsReleaseUrl"] = template_url.format(vtag=vtag) | ||
data["vcsReleaseUrl"] = template_url.format(vtag=updated_vtag) |
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.
This solution is possible but IMO very restrictive. The main idea here should rather be passing as much information to the template_url
formatter so that we are as flexible as possible to compose the url
Let me illustrate you with an example, if we instead deduce and pass more granulated information to the formatter like major
, minor
, etc
#lets assume
template_url = product.vendor["release_notes_url_template"]
data["vcsReleaseUrl"] = template_url.format(vtag=vtag, major=major, minor=minor, patch=patch)
then in the database (which s more convenient) we could redo at any time the url template without. Here some examples
release_notes_url_template = "https://mydoc/{vtag}". # old template format
release_notes_url_template = "https://mydoc/v{major}.{minor}.0" # new
# ...
release_notes_url_template = "https://mydoc/v{major}/{minor}.md" # my prediction for 2025's format
So, in summary
- do not modify
vtag
but rather inject more information to the formatter. Note that your solution, even if correct, is "removing" information. - if
_RE_PRODUCTION_RELEASE_VERSION
is so relevant, the it MUST be part of the definition ofapp_settings.SIMCORE_VCS_RELEASE_TAG
, i.e. we should not accept non-conformal strings for this input. If you do not want to fail upon validation then create a pre-validator that nullifies with a warning it if it is invalid- if the format of this field is guranteed, then it is very easy to extract major, minor and patch from this. e.g.
v = packaging.version.Version(app_settings.SIMCORE_VCS_RELEASE_TAG.removeprefix("v")), v.major, v.minor
- if the format of this field is guranteed, then it is very easy to extract major, minor and patch from this. e.g.
What do these changes do?
Related issue/s
How to test
Dev-ops checklist