-
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
Remove CxoTime custom fast parser, use astropy built-in #34
Conversation
@@ -486,7 +364,7 @@ class TimeSecs(TimeCxcSec): | |||
name = "secs" | |||
|
|||
|
|||
class TimeDate(TimeYearDayTime, FastDateParserMixin): | |||
class TimeDate(TimeYearDayTime): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense and seems fine. I note that I'm not immediately lear on how to initialize the astropy time classes, as the docstring doesn't seem to address the items in the init signature. But that's not a cxotime issue.
Init signature:
TimeYearDayTime(
val1,
val2,
scale,
precision,
in_subfmt,
out_subfmt,
from_jd=False,
)
Docstring:
Year, day-of-year and time as "YYYY:DOY:HH:MM:SS.sss...".
The day-of-year (DOY) goes from 001 to 365 (366 in leap years).
For example, 2000:001:00:00:00.000 is midnight on January 1, 2000.
The allowed subformats are:
- 'date_hms': date + hours, mins, secs (and optional fractional secs)
- 'date_hm': date + hours, mins
- 'date': date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These TimeFormat
subclasses are defining a contained object within the Time
class which is not directly set by the user. The Time
class is defined in astropy/time/core.py
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good and makes sense to me. One issue is that it is difficult to see if the astropy built-in is in any way different from the custom fast parser. I think that just means we should keep an eye on the integration tests in this case.
Description
The CxoTime fast C parser was the prototype for astropy. That fast parser is now built in to astropy so there is no need for the custom version in
cxotime
.Interface impacts
None
Testing
Unit tests
Independent check of unit tests by Jean
Functional tests
In the local unit test, I did
git clean -fxd
to ensure no lingering binary files were accidentally allowing things to work.