Add time utils#3
Conversation
This commit adds time utility functions to enable the Kessler library to make use of CDMs with day of year formats instead of the traditional yy-mm-dd format. This also adds a unit test function along with several test cdms retrieved from the NASA CARA repository.
|
Hi @ANDREWNGT , thank you for the PR, it is much appreciated! Before I have a deeper look at the code (as soon as I find the time), I wanted to ask bring up two aspects:
Thanks again! Giacomo |
Sceki
left a comment
There was a problem hiding this comment.
I have made some comments to review your code. Thank you for your contribution.
Also, please see the comment above, in order to be consistent with the library coding style and organization :)
Codecov Report
@@ Coverage Diff @@
## master #3 +/- ##
=========================================
Coverage ? 11.85%
=========================================
Files ? 6
Lines ? 751
Branches ? 0
=========================================
Hits ? 89
Misses ? 662
Partials ? 0 📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
…into Add_time_utils
Hi, I've implemented the feedback given for this PR. Please review!
|
Thanks for the updates @ANDREWNGT ! Could you please also change from camel case to underscore (e.g. not |
Padded date string with zeros in doy_2_date
|
This looks good to me, I am going to merge it, thanks @ANDREWNGT :) |
This pull request was motivated by the current cdm.py function being unable to take in day of year (DOY) date formats. It could only work with the traditional yy-mm-dd date formats. Since the CCSDS standards mandate that both formats can be used for CDMs, I have taken the liberty to translate the relevant MATLAB code in the NASA CARA analysis tools. https://github.com/nasa/CARA_Analysis_Tools/tree/master/two-dimension_Pc/Main/TransformationCode/TimeTransformations
I have also retrieved several test CDMs that were released by NASA and intend to add them here for easier reference.
Lastly, I have written a unit test for the time_utils functions that I have added.
Happy to take feedback as I am new to open source development workflows!