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

Add tests for case list sample counts endpoint #10935

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

alisman
Copy link
Contributor

@alisman alisman commented Aug 12, 2024

No description provided.

@@ -107,11 +109,35 @@ public Map<String, ClinicalDataType> getClinicalAttributeDatatypeMap() {

return attributeDatatypeMap;
}

public static List<CaseListDataCount> mergeCaseListCounts(List<CaseListDataCount> counts) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@haynescd i'm assuming that this should go in some util? let me know the right place or if this is ok to just have it hanging out here.
FYI, i don't love that this merging is done at repository level because it suggest that the result of the underlying mapper is legitimate. it's not. the result must be merged. but i can't figure out a way to do that operation in SQL. ideally, it would be done in the mapper, but the mapper methods have no java implementation so ... what to do?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I would suggest doing this at the service layer.

Creating a class CaseListService? Or whatever where this logic lived.

And the Repository would return getCaseListDataCountsPerStudy()

That way the mapper is still correct and you can do the business logic of merging in the service layer

@haynescd
Copy link
Collaborator

Small unused import but everything else looks good

haynescd
haynescd previously approved these changes Aug 19, 2024
Copy link
Collaborator

@haynescd haynescd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link

sonarcloud bot commented Aug 19, 2024

@alisman alisman merged commit b03b615 into cBioPortal:demo-rfc80-poc Aug 19, 2024
8 of 13 checks passed
@alisman alisman deleted the unit-sample-list branch August 19, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants