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

Issue 693 - Rating curve retrieval #909

Merged
merged 11 commits into from
Dec 19, 2024

Conversation

zack-rma
Copy link
Collaborator

@zack-rma zack-rma commented Oct 10, 2024

Fixes #693 - Adds support for retrieving a rating closest to a specified date.

@zack-rma zack-rma marked this pull request as ready for review October 11, 2024 17:14
Copy link
Contributor

@MikeNeilson MikeNeilson left a comment

Choose a reason for hiding this comment

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

Looks good. nitpick about variable/parameter names.

String timezone = ctx.queryParamAsClass(TIMEZONE, String.class).getOrDefault("UTC");
Instant date = null;
String specificDate = ctx.queryParam(EFFECTIVE_DATE);
Copy link
Contributor

Choose a reason for hiding this comment

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

use effectiveDate throughout. it's confusing having this go from EFFECTIVE_DATE, to specificDate, to just "date" in the later code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated to use effectiveDate and effectiveDateParam for consistency

Copy link
Collaborator

Choose a reason for hiding this comment

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

While consistency is good, I think this illuminates that the parameter is confusing on this endpoint. I recommend using a separate endpoint. I might be missing a use case where a the closest effective date to a parameter is needed, but given temporal interpolation and transitional dates, that seems to be too complicated.

@adamkorynta adamkorynta removed their request for review October 31, 2024 22:50
@zack-rma zack-rma requested a review from adamkorynta November 26, 2024 23:29
@zack-rma zack-rma requested a review from adamkorynta December 2, 2024 18:01
@zack-rma
Copy link
Collaborator Author

zack-rma commented Dec 7, 2024

Build failures appear to be unrelated to this PR

@MikeNeilson
Copy link
Contributor

Build failures appear to be unrelated to this PR

Yep, it's the usual failures from other end points.

@zack-rma zack-rma requested a review from adamkorynta December 17, 2024 20:29
@MikeNeilson MikeNeilson merged commit 6448c34 into USACE:develop Dec 19, 2024
3 checks passed
@zack-rma zack-rma deleted the bugfix/rating_curve_issue_693 branch December 20, 2024 18:19
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.

Add most recent or currently effective to cwms-data/rating/{rating-id}
5 participants