Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

matusdrobuliak66
Copy link
Contributor

What do these changes do?

  • 🎨 improve release notes (ignore minor version)

Related issue/s

How to test

Dev-ops checklist

Copy link

sonarcloud bot commented Sep 18, 2024

@matusdrobuliak66 matusdrobuliak66 added the t:maintenance Some planned maintenance work label Sep 18, 2024
Copy link

codecov bot commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.9%. Comparing base (cafbf96) to head (32c0921).
Report is 557 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 87.9% <100.0%> (+3.4%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...r/src/simcore_service_webserver/statics/_events.py 92.7% <100.0%> (ø)

... and 370 files with indirect coverage changes

# 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)
Copy link
Member

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

  1. do not modify vtag but rather inject more information to the formatter. Note that your solution, even if correct, is "removing" information.
  2. if _RE_PRODUCTION_RELEASE_VERSION is so relevant, the it MUST be part of the definition of app_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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants