DT-2532: Replicate Translate Summary in Consent#2814
Open
DT-2532: Replicate Translate Summary in Consent#2814
Conversation
rushtong
commented
Feb 18, 2026
| */ | ||
| // Suppress warning for method complexity (S3776). Due for reevaluation after initial migration | ||
| @SuppressWarnings({"java:S3776"}) | ||
| public DataUseSummary translateSummary(DataUse dataUse) { |
Contributor
Author
There was a problem hiding this comment.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR moves the “Translate Summary” behavior into Consent by implementing a local structured summary generator (TranslationUtil.translateSummary) and wiring OntologyService.translateDataUseSummary to use it, reducing reliance on the external ontology service for this functionality.
Changes:
- Replace
OntologyService.translateDataUseSummaryremote HTTP call with an in-process translation viaTranslationUtil.translateSummary. - Add extensive unit test coverage for structured summary translation in
TranslationUtilTest. - Update Guice wiring and adjust
OntologyServiceTestto reflect the new in-process behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/org/broadinstitute/consent/http/service/OntologyService.java | Removes remote call dependency for summary translation and delegates to TranslationUtil. |
| src/main/java/org/broadinstitute/consent/http/matching/TranslationUtil.java | Adds structured translateSummary implementation used by dataset indexing. |
| src/main/java/org/broadinstitute/consent/http/ConsentModule.java | Updates provider wiring for the new OntologyService constructor. |
| src/test/java/org/broadinstitute/consent/http/service/OntologyServiceTest.java | Updates tests to validate summary generation without MockServer-based HTTP translation. |
| src/test/java/org/broadinstitute/consent/http/matching/TranslationUtilTest.java | Adds broad test coverage for the new structured summary translation behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/org/broadinstitute/consent/http/matching/TranslationUtil.java
Outdated
Show resolved
Hide resolved
|
kevinmarete
approved these changes
Feb 19, 2026
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.



Addresses
https://broadworkbench.atlassian.net/browse/DT-2532
Summary
This PR replicates the Translate Summary endpoint by copying over the
translateSummarymethod to Consent. There were very few tests for this method so there are a large number of new tests inTranslationUtilTestTesting
This method is used when indexing a dataset to Elastic Search. Use the
POST /api/dataset/index/{datasetId}API and this code path will be hit.Have you read CONTRIBUTING.md lately? If not, do that first.