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 most recent or currently effective to cwms-data/rating/{rating-id} #693

Closed
Enovotny opened this issue Jun 11, 2024 · 5 comments · May be fixed by #909
Closed

Add most recent or currently effective to cwms-data/rating/{rating-id} #693

Enovotny opened this issue Jun 11, 2024 · 5 comments · May be fixed by #909
Assignees
Labels
approved-W192HQ23F0232-task4 Only valid if set by MikeNeilson, DanielO, CharlesG priority:medium We care, and will try and get to it soon.

Comments

@Enovotny
Copy link

add a parameter or a way to grab the most recent or currently active rating curve from the cwms-data/rating/{rating-id} endpoint

currently to get the most recent I can run this end point using method=Lazy to get all of the effective and creation dates. then run it again with the effective date in the Begin field to rating curve with the most current effective date. Would be nice to have this done internally or in a more efficient manor.

This would be based on most recent according to effective date. As in if someone was creating a rating for a time of now what rating curve would be used.

@Enovotny
Copy link
Author

maybe a more uniform utility would be to add a parameter effective date or something like this. User can enter a date and it will grab whatever rating curve that would be effective for that date. if today's date it would pull the current effective rating curve.

@MikeNeilson MikeNeilson added the approved-W192HQ23F0232-task4 Only valid if set by MikeNeilson, DanielO, CharlesG label Jun 11, 2024
@MikeNeilson MikeNeilson added the priority:medium We care, and will try and get to it soon. label Jun 11, 2024
@MikeNeilson
Copy link
Contributor

Nearest to the provided effective date, based on the spec of the table makes sense. To me so does "now" if no date if provided.

@adamkorynta
Copy link
Collaborator

I can definitely see adding a floor + ceiling operator given temporal interpolation and transition dates, but a single effective date could be misleading. The need for the latest curve also makes sense and could also be accomplished by a floor + ceiling operation with the begin/end being the same, though I do think a /{ratingid}/latest type endpoint would simplify things. Also, I presume we'd want to filter out inactive curves from the search.

@MikeNeilson
Copy link
Contributor

Oh yeah, certainly remove inactive by default. as for a /latest, I agree that makes sense. Would probably make sense for location levels as well and we already do that for timeseries.

@adamkorynta
Copy link
Collaborator

Closing this ticket, can create a new ticket if a floor/ceiling for a given date is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved-W192HQ23F0232-task4 Only valid if set by MikeNeilson, DanielO, CharlesG priority:medium We care, and will try and get to it soon.
Projects
Development

Successfully merging a pull request may close this issue.

4 participants