PyCall.jl icon indicating copy to clipboard operation
PyCall.jl copied to clipboard

Add parsing for datetime.time

Open nateybear opened this issue 2 years ago • 3 comments

Using same patterns as elsewhere in this file (and avoiding timezones like in DateTime), add support for parsing times from the Python datetime package to Julia's Dates.Time struct. This came up as a need I had in a personal project and was a quick addition.

nateybear avatar Dec 15 '23 20:12 nateybear

Looks good. Could you add a couple of tests?

stevengj avatar Dec 16 '23 17:12 stevengj

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (d407513) 67.75% compared to head (c74af34) 68.02%. Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1069      +/-   ##
==========================================
+ Coverage   67.75%   68.02%   +0.27%     
==========================================
  Files          20       20              
  Lines        2025     2036      +11     
==========================================
+ Hits         1372     1385      +13     
+ Misses        653      651       -2     
Flag Coverage Δ
unittests 68.02% <100.00%> (+0.27%) :arrow_up:

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.

codecov-commenter avatar Dec 17 '23 16:12 codecov-commenter

Looks good. Could you add a couple of tests?

I added a rountripeq test like for Date and DateTime

ETA: added @test_throws to satisfy coverage checker too

nateybear avatar Dec 17 '23 16:12 nateybear

@stevengj bumping since I also forgot about this. Tests have been implemented, check failures seem unrelated to this change.

nateybear avatar Mar 10 '24 14:03 nateybear

Looks good, thanks!

stevengj avatar Mar 11 '24 02:03 stevengj