-
Notifications
You must be signed in to change notification settings - Fork 10
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
Issue https://github.com/ATFutures/calendar/issues/57 fix 🔧 #58
Conversation
* Added person-object to description; Serkan Korkmaz * Fixed typo: iCalender to iCalendar
See issue #57. The function is a high-level stopifnot()- and tryCatch()-function wrapper built on {cli}-package.
* The function now uses the assert()-function instead of the stopifnot()-function * The function now uses inherits() instead of methods::is()
* ical()-function update: * The function now asserts passed arguments instead of storing the class. * All stop-controls have been replaced with assert. * Removed redundant assignment of column names to `n`. It is now directly passed into the control-flow. * description update: * methods have now been deleted from imports. Only a few functions were using it. * cli have been added to the import section * another typo in the title and description have been fixed. Was "iCalander" and now is "iCalendar"
Great stuff, will take a look! |
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.
|
||
return(x) | ||
|
||
} | ||
|
||
stopifnot(methods::is(object = x, class2 = "character") | methods::is(object = x, class2 = "list")) | ||
assert( | ||
inherits(x = x, what = "character") | inherits(x = x, what = "list"), |
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.
👍
BEGIN = "VCALENDAR", | ||
PRODID = "ATFutures/calendar", | ||
VERSION = "2.0", | ||
BEGIN = "VCALENDAR", |
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.
Why this extra whitespace?
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.
I don't know if it's redundant. But I thought it "looked better" honestly. I changed it from,
a = 2
aa = 2
aaa = 2
to
a = 2
aa = 2
aaa = 2
I am away so quick reply from me to say if it passes the tests (coverage of which I just checked is now deactivated on CodeCov) it is good enough for me. Thanks @serkor1 for the contribution. |
Hi,
I have created a new
R
-script calledutils
, which contains theassert()
-function. For some devs this is the standard file to put these kind of helper-functions in - this is at least what I do 😄Note
I have only added the functionality to functions that already used a mix of
stopifnot
andstop
. I haven't added this functionality on any other functions.I found two typos that I have corrected also. See commit e63371e and 24c1211.
The dependency on {methods} are gone, and a new dependency on {cli} is made. The {methods}-package were only used in two functions. So I believe this was a good choice.
I have run
devtools::check()
and everything passes locally.Best,
@serkor1