Open moznuy opened 2 years ago
Merging #240 (97c617c) into main (c2339b3) will increase coverage by
0.36%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #240 +/- ##
==========================================
+ Coverage 77.25% 77.61% +0.36%
==========================================
Files 12 12
Lines 1165 1184 +19
==========================================
+ Hits 900 919 +19
Misses 265 265
Flag | Coverage Δ | |
---|---|---|
unit | 77.61% <100.00%> (+0.36%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
aredis_om/model/encoders.py | 59.77% <100.00%> (+8.38%) |
:arrow_up: |
aredis_om/model/model.py | 86.33% <100.00%> (+0.06%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update c2339b3...97c617c. Read the comment docs.
Any input will be appreciated
This is a rough draft
What's is implemented:
datetime.datetime
works as numeric index.datetime.date
works as numeric index.datetime.time
works as numeric index.(very sketchy, see below)What can be added / improved:
datetime.time
custom parsing implementationdatetime.time
because user will have to write parsing(validation) themselves otherwise(seepost_model_time
in tests).datetime.timedelta
(I skipped it for now).Model.find(Model.field < "Thu Sep 25 10:36:28 2003")
or ISO format, or etc...Questions:
Model.find(Model.field < "Thu Sep 25 10:36:28 2003")
or"2003-09-25T10:49:41.5-03:00"
or any other string in expressions. (Becausepydantic
supports only ISO format(I think)). We could usedateutil
. Or make it optional dependency.pydantic
parsing support parsingdatetime
from integers ms out of the box.redis-om-node
, and there they support precision to seconds(I'm not sure): https://github.com/redis/redis-om-node#searching-on-datesModel.datetime < date/time
). Should we support this? Or catch this and raise exception?Problems:
so no int parsing
, very custom logic(probably wrong)Sketchy things:
datetime.time custom parsing implementationresolve_value
. Maybe there is better approach.https://github.com/redis/redis-om-python/pull/240/files#diff-ed42e1a9e452289cee8007ec1dc71beb5e883a54f7f58db63320901b9e4baaf3R546
Fixes #199