reichlab / cladetime

Documentation
https://cladetime.readthedocs.io
MIT License
0 stars 0 forks source link

Update timestamp validations when instantiating CladeTime class #33

Closed bsweger closed 1 week ago

bsweger commented 1 week ago

Background

Instantiating CladeTime currently throws an error if you pass a sequence_as_of date that is in the future.

This seemed like a good idea at the time, but that behavior makes it hard to test scenarios like a GitHub action that wants to instantiate based on a round close date.

One solution would be to change the error raised here to a warning, and continue to instantiate the object using datetime.now()

In theory, the GitHub action above should work when run via its cron schedule. However, the awkward hack around daylight savings time leaves a few days a year of incorrect US Eastern/UTC differences.

Definition of done

The list below includes another date-related CladeTime validation change that @elray1 and I have discussed recently.