Skip to content

feat: introduce epix_as_of_current() for convenience #645

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

Merged
merged 5 commits into from
Apr 4, 2025

Conversation

dshemetov
Copy link
Contributor

@dshemetov dshemetov commented Mar 27, 2025

Checklist

Please:

  • Make sure this PR is against "dev", not "main" (unless this is a release
    PR).
  • Request a review from one of the current main reviewers:
    brookslogan, nmdefries.
  • Makes sure to bump the version number in DESCRIPTION. Always increment
    the patch version number (the third number), unless you are making a
    release PR from dev to main, in which case increment the minor version
    number (the second number).
  • Describe changes made in NEWS.md, making sure breaking changes
    (backwards-incompatible changes to the documented interface) are noted.
    Collect the changes under the next release number (e.g. if you are on
    1.7.2, then write your changes under the 1.8 heading).
  • See DEVELOPMENT.md for more information on the development
    process.

Change explanations for reviewer

REVISED:

  • Add epix_as_of_current(), which is an alias for epix_as_of(.$versions_end)
    • Separate function because epix_as_of() reads poorly
  • Added set_versions_end() to bypass some epix_as_of() limitations
  • Fixed a bug with yearmonth in epix_as_of and epix_slide

Magic GitHub syntax to mark associated Issue(s) as resolved when this is merged into the default branch

@dshemetov dshemetov changed the title feat: common default for epix_as_of feat: introduce epix_as_of_now() for convenience Apr 2, 2025
Copy link
Contributor

@brookslogan brookslogan left a comment

Choose a reason for hiding this comment

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

Did a skim. I should probably look more carefully + actually read the tests; going to stop here & self-re-review-request.

@brookslogan brookslogan self-requested a review April 2, 2025 01:15
@dshemetov dshemetov force-pushed the ds/epix_as_of_default branch from 07f9472 to 77b265b Compare April 2, 2025 01:21
Copy link
Contributor

@brookslogan brookslogan 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 and nearly complete.

  • But @dsweber2's question/comment today makes me think we need to either:
    • Go ahead and place a check here that "now" isn't too far from the pre-existing version end and/or max.
    • Not do the current-time/version stuff and stick with as-of versions_end.

Otherwise we are going to potentially fool people who are attempting to be careful by checking the as_of of the epi_df we give them, by giving them an as_of that wasn't actually recorded and may be nowhere near to one that was recorded.

[Probably I could be convinced otherwise if that's what would actually be helpful in real production forecasting. Just marking this as "Comment" so someone else can go ahead & Approve if that's the case or just bypass & merge.]

@dshemetov
Copy link
Contributor Author

dshemetov commented Apr 3, 2025

Switching back to epix_as_of_current() and rebasing.

* fix yearmonth breaking in epix_as_of() and epix_slide()
@dshemetov dshemetov force-pushed the ds/epix_as_of_default branch from bb830ff to c6b04a7 Compare April 3, 2025 20:47
@dshemetov dshemetov requested a review from brookslogan April 4, 2025 19:46
@dshemetov dshemetov changed the title feat: introduce epix_as_of_now() for convenience feat: introduce epix_as_of_current() for convenience Apr 4, 2025
Copy link
Contributor

@dsweber2 dsweber2 left a comment

Choose a reason for hiding this comment

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

version needs to be bumped, but on a quick read-through looks good

@dshemetov dshemetov merged commit ec9feff into dev Apr 4, 2025
3 checks passed
@dshemetov dshemetov deleted the ds/epix_as_of_default branch April 4, 2025 22:38
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.

epix_slide fails on yearmonths [discussion] epix_as_of(as_of) default setting
3 participants