guardrails
guardrails copied to clipboard
Make datetime separate datatype
The dateutil library is robust, capable of parsing a wide variety of datetime formats, including those with seconds and milliseconds (see ‘ISO format’ and ‘Hours with letters work’).
However, given that Python’s standard datetime library provides options to return an object as a date, time, or datetime, it might be useful to introduce a separate DateTime datatype that exclusively returns the datetime.datetime object. This allows the existing Date and Time classes to handle their respective strings while returning datetime.date and datetime.time objects.
In addition, each datatype can handle its own edge cases such as Unix epoch strings or ISO date weeks, both of which have a rudimentary implementation in this pull request.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:exclamation: No coverage uploaded for pull request base (
main@9df4acd
). Click here to learn what that means.
Additional details and impacted files
@@ Coverage Diff @@
## main #407 +/- ##
=======================================
Coverage ? 80.32%
=======================================
Files ? 34
Lines ? 3903
Branches ? 0
=======================================
Hits ? 3135
Misses ? 768
Partials ? 0
Flag | Coverage Δ | |
---|---|---|
unittests | 80.32% <0.00%> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
guardrails | ⬜️ Ignored (Inspect) | Visit Preview | Nov 3, 2023 0:28am |
outdated, we're now only supporting datatypes available in JsonSchema