[DT-4061] Add similar and frequently-requested-with study recommendations - #3054
Merged
otchet-broad merged 1 commit intoSep 16, 2026
Conversation
otchet-broad
marked this pull request as ready for review
September 8, 2026 20:45
otchet-broad
requested review from
a team,
fboulnois and
rushtong
and removed request for
a team
September 8, 2026 20:45
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 8, 2026 21:58
2014320 to
e31cd4a
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-recommendations
branch
from
September 8, 2026 21:58
37de009 to
f7668a1
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 9, 2026 13:05
e31cd4a to
d8cc578
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-recommendations
branch
2 times, most recently
from
September 9, 2026 14:04
a7f8085 to
d41a878
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 9, 2026 14:04
d8cc578 to
02c3d83
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-recommendations
branch
from
September 9, 2026 14:33
d41a878 to
a1c1f9e
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 9, 2026 14:33
02c3d83 to
911d47a
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 10, 2026 00:05
911d47a to
9d48687
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-recommendations
branch
from
September 10, 2026 00:05
a1c1f9e to
4d19126
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 10, 2026 00:40
9d48687 to
89f4353
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-recommendations
branch
from
September 10, 2026 00:40
4d19126 to
7f7d63e
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 10, 2026 15:32
89f4353 to
21e53e3
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-recommendations
branch
from
September 10, 2026 15:32
7f7d63e to
086ced7
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 10, 2026 20:08
21e53e3 to
bb9de1b
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-recommendations
branch
from
September 10, 2026 20:08
086ced7 to
af4c136
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 10, 2026 20:53
bb9de1b to
2d5c382
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-recommendations
branch
from
September 10, 2026 20:54
af4c136 to
6e8b06f
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 10, 2026 21:53
2d5c382 to
1497ca8
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-recommendations
branch
from
September 10, 2026 21:53
6e8b06f to
76d0c15
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 14, 2026 17:55
1497ca8 to
46a9c32
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-recommendations
branch
from
September 14, 2026 17:55
76d0c15 to
5faafa5
Compare
…ions
Adds GET /api/metrics/study-recommendations/{studyId}/similar and GET
/api/metrics/study-recommendations/{studyId}/frequently-requested-with.
Both return at most 12 publicly visible studies with their dataset counts.
"Similar" matches on a shared PI or at least one overlapping data type,
ranked by the size of the data type overlap plus a point for the PI match.
A blank pi_name is not an identity, so it never matches another blank one.
"Frequently requested with" ranks candidate studies by how often they
appeared in the same data access request as the source study. Only
submitted, non-archived, non-progress-report DARs score: a draft cart is
not a request, an archived DAR should stop counting, and a progress report
carries its own reference_id, so counting one would score its parent DAR
more than once.
Both queries restrict candidates to public_visibility = TRUE, so a
recommendation never leaks the existence of a private study, and the source
study itself goes through DatasetService#verifyStudyVisibilityAccess.
No migration and no change to any existing response.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
otchet-broad
force-pushed
the
otchet-dt-4061-study-dar-metrics
branch
from
September 14, 2026 20:29
46a9c32 to
c9fe790
Compare
otchet-broad
force-pushed
the
otchet-dt-4061-study-recommendations
branch
from
September 14, 2026 20:29
5faafa5 to
261637c
Compare
otchet-broad
merged commit Sep 16, 2026
19f2ffc
into
otchet-dt-4061-study-dar-metrics
4 checks passed
otchet-broad
added a commit
that referenced
this pull request
Sep 16, 2026
…-fields Catches this branch up to its base after #3052, #3053 and #3054 were squash-merged into it. The squashes carry the same content as the original commits still in this branch's history, so every registration list - the Jersey resources, the Guice module, the OpenAPI paths and the changelog includes - conflicted with itself. Each is resolved as the union of both sides, deduplicated. Verified by taking the branch the other way as well: rebasing onto the new base and dropping the three superseded commits produces a byte-identical tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
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.
Base: branch 4 · 11 files, +447 · Migration: no · UI impact: none
Adds
GET /api/metrics/study-recommendations/{studyId}/similarandGET /api/metrics/study-recommendations/{studyId}/frequently-requested-with. Bothreturn at most 12 publicly visible studies with their dataset counts.
"Similar" matches on a shared PI or at least one overlapping data type,
ranked by the size of the data type overlap plus a point for the PI match. A
blank
pi_nameis not an identity, so it never matches another blank one."Frequently requested with" ranks candidates by how often they appeared in
the same data access request as the source study. Only submitted,
non-archived, non-progress-report DARs score, and the reasons are worth
checking: a draft cart is not a request, an archived DAR should stop
counting, and a progress report carries its own
reference_id, so countingone would score its parent DAR more than once.
Both queries restrict candidates to
public_visibility = TRUE, so arecommendation never leaks the existence of a private study, and the source
study goes through
verifyStudyVisibilityAccess.No migration, no change to any existing response.
Depends on: branch 4 (extends
MetricsService/MetricsResource).Where this sits in the DT-4061 stack
otchet-dt-3990-study-ratings-pi-detailswas too large to review meaningfully(95 files, +8168), so it was split into eight PRs. This PR targets
otchet-dt-4061-study-dar-metrics,not
develop, so its diff shows only its own work.otchet-dt-4061-study-visibility-authzdevelopotchet-dt-4061-study-patch-ownershipotchet-dt-4061-study-visibility-authzotchet-dt-4061-study-pi-detailsotchet-dt-4061-study-visibility-authzotchet-dt-4061-study-commentsotchet-dt-4061-study-pi-detailsotchet-dt-4061-study-dar-metricsotchet-dt-4061-study-commentsotchet-dt-4061-study-recommendations← this PRotchet-dt-4061-study-dar-metricsotchet-dt-4061-study-asset-fieldsotchet-dt-4061-study-recommendationsotchet-dt-4061-study-asset-endpointsotchet-dt-4061-study-asset-fieldsBranch 1b is a sibling rather than a link in the chain: nothing depends on it,
so it can be held or dropped without blocking the others. Land the numbered
chain in order — merging out of order, or squash-merging, will require rebasing
the descendants.
The split is verified lossless: branch 7 plus 1b reproduces the original branch
exactly, apart from five
scripts/verify-study-*.shhelper scripts that weredropped at the author's request.
./mvnw test-compilepasses on each branchindependently.
🤖 Generated with Claude Code