-
Notifications
You must be signed in to change notification settings - Fork 6
feat(lapis): add new endpoint /component/queriesOverTime
#1496
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This is a preview of the changelog of the next release. If this branch is not up-to-date with the current main branch, the changelog may not be accurate. Rebase your branch on the main branch to get the most accurate changelog. Note that this might contain changes that are on main, but not yet released. Changelog: 0.6.4 (2026-01-13)Features |
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.
Pull request overview
This PR adds a new endpoint /component/queriesOverTime that generalizes the existing mutations-over-time functionality to support arbitrary queries. The implementation refactors the existing MutationsOverTimeModel into a more general QueriesOverTimeModel that can handle both specific mutation queries and custom query expressions.
Key Changes
- Introduced a new
/component/queriesOverTimeendpoint accepting custom query expressions with separate count and coverage queries - Refactored
MutationsOverTimeModeltoQueriesOverTimeModelto support both mutations and arbitrary queries - Updated the existing mutations-over-time endpoints to use the refactored model while maintaining backward compatibility
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lapis/src/main/kotlin/org/genspectrum/lapis/controller/QueriesOverTimeController.kt | Renamed controller and added new postQueriesOverTime endpoint |
| lapis/src/main/kotlin/org/genspectrum/lapis/model/mutationsOverTime/QueriesOverTimeModel.kt | Renamed model class and added evaluateQueriesOverTime method for handling arbitrary queries |
| lapis/src/main/kotlin/org/genspectrum/lapis/request/QueriesOverTimeRequest.kt | Added new request types for queries over time functionality |
| lapis/src/main/kotlin/org/genspectrum/lapis/response/LapisResponse.kt | Generalized response type to support both mutations and queries |
| lapis/src/main/kotlin/org/genspectrum/lapis/openApi/*.kt | Added OpenAPI schema definitions for the new endpoint |
| lapis/src/test/kotlin/org/genspectrum/lapis/controller/QueriesOverTimeControllerTest.kt | Added comprehensive tests for the new endpoint |
| lapis/src/test/kotlin/org/genspectrum/lapis/model/mutationsOverTime/*.kt | Updated tests to use refactored model class |
| lapis-e2e/test/queriesOverTime.spec.ts | Added end-to-end test for the new endpoint |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1382ac3 to
1279a42
Compare
fhennig
left a comment
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.
Nice!
resolves #1480
The
MutationsOverTimeModelalready had a quite well-suited abstraction that made the implementation straight forward. I renamed a bunch of things to fit the more general case that we have now.PR Checklist