-
Notifications
You must be signed in to change notification settings - Fork 1
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
Incorporate timestamp when using an "as_of" date to get the VersionID of an S3 object #24
Closed
2 tasks done
Milestone
Comments
@elray1 Am reviewing some old tickets, and I'm not sure I stated the first "definition of done" item correctly. Cladetime now works exclusively in UTC time, but it sounds like if someone specifies a date w/o a time, the most helpful behavior would be to use 23:59 UTC as the timestamp instead of midnight. Current behavior: from cladetime import CladeTime
ct = CladeTime(tree_as_of="2024-09-03")
ct
CladeTime(sequence_as_of=2024-11-13 21:10:23+00:00, tree_as_of=2024-09-03 00:00:00+00:00)
|
|
bsweger
added a commit
that referenced
this issue
Jan 3, 2025
Resolves #24 When someone instantiates a CladeTime object using string-based date formats (YYYY-MM-DD) for sequence_as_of or tree_as_of, set the corresponding timestamp to 11:59:59 to ensure that the entire day is included when searching for S3 object versions that match the date.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a follow up to #23
That PR added the ability to look up an S3 versionID for a specific date, but as noted in that PR review, we really should make that feature "timestamp aware."
Definition of Done
as_of
date is supplied when downloading files from Nextstrain's S3 bucket, the default date should be UTCdatetime.now()
(i.e., current timestamp) instead of the current date at midnight.as_of
date without a timestamp, default the time to midnight UTC.2025-01-3 update: If someone passes YYYY-MM-DD in string format (i.e., 2025-01-01), Cladetime should interpret that as
datetime(2024, 1, 1, 11, 59, 59)
. However, if someone passes a Pythondatetime
object without a time (i.e.,datetime(2025, 1, 1, 0, 0, 0)
), it's hard to interpret intent--maybe they want to use midnight as a time stamp? Therefore, in the latter case, Cladetime should not override the timestamp to 11:59:59)The text was updated successfully, but these errors were encountered: