-
Notifications
You must be signed in to change notification settings - Fork 11
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
15 clean r #59
15 clean r #59
Conversation
also adds a couple of checks in case I messed up
* remove building paths from temp directory * ensure that temp files are unique * move up some on.exit() calls to make sure temp directories are removed * some small clean up
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.
Guess the RcppExports somehow barked. Somehow you're removing all the functions. Otherwise fine, thank you!
on.exit(expr = options("OutDec" = od), add = TRUE) | ||
|
||
op <- openxlsx_options() | ||
on.exit(options(op), add = TRUE) |
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.
Note to self: once we have options in a working state (which hopefully will be soon), we should go through a few functions where options are included, but do not seem to provide anything usefull.
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 think a lot of them are probably not needed. The only time it seems to matter is when converting a double to a string. It's probably within the write data so we can just be careful about using using format()
, (e.g., format(7 / pi, scientific = FALSE, digits = 16)
. I'm not entirely convinced that setting the options()
is necessary.
} | ||
|
||
return(origin) | ||
"1900-01-01" | ||
} |
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.
hm, I'm not really happy with this change. makes it harder to spot what is going on and a bit weird that such a long function provides a const character. I mean it looks like it is working, but I preferred the old way
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.
But I'm not even sure if this is used anywhere. Remember that I wrangled with it in writeDataTable
iirc.
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.
Oh, this does the same thing. It just doesn't bother assigning/making an origin
object only to immediately return it.
Could also just simplify the last statement to:
if (grepl('date1904="1"|date1904="true"', workbook, ignore.case = TRUE)) {
"1904-01-01"
} else {
"1900-01-01"
}
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.
Yeah I got what it does, it's just that I don't like the style. It's nothing I'd veto against, but I don't think that it is easily understandable that's all. If change is required, I think we should stick with the simplified if else one.
xmlDir <- file.path(tempdir(), "named_regions_tmp") | ||
xmlDir <- tempfile("named_regions_tmp") | ||
# don't unlink on exit | ||
on.exit(unlink(xmlDir, recursive = TRUE), add = TRUE) |
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.
👍
So, apparently there's this |
Codecov Report
@@ Coverage Diff @@
## main #59 +/- ##
==========================================
+ Coverage 42.65% 42.71% +0.05%
==========================================
Files 40 40
Lines 8343 8320 -23
==========================================
- Hits 3559 3554 -5
+ Misses 4784 4766 -18
Continue to review full report at Codecov.
|
Most likely it was there, because of the manual way Rcpp functions were integrated in |
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.
Thank you!
Resolves #15 (see issue for general changes)