-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Register the full IDate S3 class for S4 dispatch #6844
Conversation
As recommended by ?setOldClass, register c("IDate", "Date"), not just "IDate".
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6844 +/- ##
=======================================
Coverage 98.60% 98.60%
=======================================
Files 79 79
Lines 14661 14661
=======================================
Hits 14457 14457
Misses 204 204 ☔ View full report in Codecov by Sentry. |
@@ -16,7 +16,7 @@ methods::setAs("data.table", "data.frame", function(from) { | |||
as.data.frame(from) | |||
}) | |||
|
|||
methods::setOldClass("IDate") | |||
methods::setOldClass(c("IDate", "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.
up on L6 I see multiple calls for a similar case on the data.table/data.frame class. should we remove the one-class call there, or is there benefit from having both calls here too?
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.
based on the description of the test= argument I guess we should remove L6
Generated via commit f984218 Download link for the artifact containing the test results: ↓ atime-results.zip
|
looks great! missing NEWS |
Instead of defining and exporting an S4 class for data.frame (which we don't own), keep setOldClass(c("data.table", "data.frame")) (which we do).
Hopefully no reverse dependency actually imported the |
As recommended by
?setOldClass
, registerc("IDate", "Date")
, not just"IDate"
. The unit test doesn't involvelubridate
, but also tested withlubridate
manually:Fixes: #6839