-
Notifications
You must be signed in to change notification settings - Fork 29
DOCK-2608: Incorporate other signals into version sorting #6081
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
DOCK-2608: Incorporate other signals into version sorting #6081
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #6081 +/- ##
=============================================
+ Coverage 74.41% 74.45% +0.03%
Complexity 5639 5639
=============================================
Files 386 386
Lines 20206 20231 +25
Branches 2088 2088
=============================================
+ Hits 15037 15062 +25
Misses 4170 4170
Partials 999 999
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| .when(cb.isTrue(valid), 3.) | ||
| .otherwise(1.); | ||
| Expression<Double> metricsWeight = cb.<Double>selectCase() | ||
| .when(cb.isNotEmpty(metricsByPlatform), 2.) |
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.
CriteriaBuilder.isNotEmpty accepts a Collection argument, which metricsByPlatform is not (it's a Map, which doesn't implement Collection), but somehow this works.
| .when(cb.isNotEmpty(metricsByPlatform), 2.) | ||
| .otherwise(1.); | ||
|
|
||
| // Calculate a base "score", which ranks "mainstem" branches highest and tags higher. |
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.
mainstream typo
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.
"mainstem" was intended, see definition here: https://en.wikipedia.org/wiki/Main_stem
Open to some other adjective to denote important branches like "main", "master", "develop"...
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.
Ok, haven't seen that before. Maybe "evergreen"?
Will ponder
|
|
||
| // Calculate a base "score", which ranks "mainstem" branches highest and tags higher. | ||
| Expression<Double> baseScore = cb.<Double>selectCase() | ||
| .when(cb.equal(name, "master"), 20.) |
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.
could be ticket, we could also grab what they set as the default branch for their repo, it may be in our database already
Description
This PR enhances the default version table sorting so that it takes into account the following additional factors:
with the goal of ranking the more relevant versions higher.
While not directly described by the ticket, this PR sprang from some experiments with UI mods that would feature metrics more prominently.
The underlying mechanism scores each version, per an equation that:
We calculate the age relative to the beginning of tomorrow (the upcoming midnight), so that the version ordering does not constantly change.
Generally, this PR seems to improve the ordering. The mainstem branch(es) always appear near the top, and tags and versions with metrics tend to predominate in the first page of results. Recently-modified branches can appear at the top, but will fall in rank more quickly at they age, relative to tags. Most invalid branches without metrics are clustered at the end.
See the screenshots below.
gatk/mutect2

Before:
After:

Review Instructions
View the versions table and make sure that it:
Issue
https://ucsc-cgl.atlassian.net/browse/DOCK-2608
#6059
Security and Privacy
If there are any concerns that require extra attention from the security team, highlight them here and check the box when complete.
e.g. Does this change...
Please make sure that you've checked the following before submitting your pull request. Thanks!
mvn clean install@RolesAllowedannotation