-
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
Stop advertising functions that don't fit in openxlsx2 API #694
Conversation
Add link to alternatives in the description.
…to make sure it shows up on function reference.
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.
And the R CMD check should be investigated too
Thanks! since we have two interfaces, the lack of exports is something I'm constantly in fear of. Do you still see the r cmd check, I haven't looked into this yet? |
HI @JanMarvin, regarding the R CMD check, I don't really what is going on. It is failing because of tests only (i.e. only 1 ERROR) It is probably related to a setup on my computer, Windows, R 4.2.3, RStudio 2023.06.0
Here is a snippet of the back trace I get. ── Warning ('test-class-comment.R:62:3'): load comments ────────────────────────
internal error in 'unz' code
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-class-comment.R:62:2
2. └─utils::unzip(file, exdir = xmlDir)
── Warning ('test-class-workbook-wrappers.R:222:3'): wb_add_drawing is a wrapper ──
internal error in 'unz' code
Backtrace:
▆
1. └─openxlsx2::wb_load(file = fl) at test-class-workbook-wrappers.R:222:2
2. └─utils::unzip(file, exdir = xmlDir)
── Warning ('test-class-workbook.R:328:3'): clone worksheet ────────────────────
internal error in 'unz' code
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-class-workbook.R:328:2
2. └─utils::unzip(file, exdir = xmlDir)
── Warning ('test-class-workbook.R:737:3'): changing sheet names works with named regions ──
zip file is corrupt
Backtrace:
▆
1. └─openxlsx2::wb_load(filename) at test-class-workbook.R:737:2
2. └─utils::unzip(file, exdir = xmlDir)
── Warning ('test-cloneWorksheet.R:9:3'): clone Worksheet with data ────────────
zip file is corrupt I checked on R-devel, nothing seems related. Only thing that was fixed in R 4.2.2 Files can now be extracted even from very large zip archives ([PR#18390](https://bugs.r-project.org/show_bug.cgi?id=18390), thanks to Martin Jakt). Edit: other examples.. ══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-class-comment.R:62:3'): load comments ──────────────────────────
Error in `basename(sheets$Target)`: object 'sheets' not found
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-class-comment.R:62:2
2. └─base::basename(sheets$Target)
── Error ('test-class-workbook-wrappers.R:222:3'): wb_add_drawing is a wrapper ──
Error in `basename(sheets$Target)`: object 'sheets' not found
Backtrace:
▆
1. └─openxlsx2::wb_load(file = fl) at test-class-workbook-wrappers.R:222:2
2. └─base::basename(sheets$Target)
── Error ('test-class-workbook.R:328:3'): clone worksheet ──────────────────────
Error in `basename(sheets$Target)`: object 'sheets' not found
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-class-workbook.R:328:2
2. └─base::basename(sheets$Target)
── Error ('test-class-workbook.R:737:3'): changing sheet names works with named regions ──
Error in `basename(sheets$Target)`: object 'sheets' not found
Backtrace:
▆
1. └─openxlsx2::wb_load(filename) at test-class-workbook.R:737:2
2. └─base::basename(sheets$Target)
── Error ('test-cloneWorksheet.R:9:3'): clone Worksheet with data ──────────────
Error in `basename(sheets$Target)`: object 'sheets' not found
Backtrace:
▆
1. └─openxlsx2::wb_load(file = file_name) at test-cloneWorksheet.R:9:2
2. └─base::basename(sheets$Target)
── Error ('test-cloneWorksheet.R:23:3'): clone empty Worksheet |
Hm, maybe a download didn't succeed? There isn't really a to big file in our tests. You could clone the git repo. |
Maybe a couple of |
All good on my end [ FAIL 0 | WARN 0 | SKIP 1 | PASS 1375 ] |
Thanks, merged! |
Great I am glad it passes on your end.. I really have no idea.. If I figure it out, I will let you know. I found this link, but haven't looked at it yet! https://community.rstudio.com/t/devtools-test-passes-but-devtools-check-does-not/129885/7 |
This PR aims to modify the function index https://janmarvin.github.io/openxlsx2/dev/reference/index.html, so that functions that don't fit in the openxlsx2 API are not advertised.
This will not create breakages, as all functions are still exported.
Adds a bunch of
@keywords internal
to the functions that don't fit in the API. (functions still exported, but not advertised)Relocate wb_dims on top ofrowcol_to_dims()
dims_to_rowcols()
, so it shows up first.This PR is minimal. and a overhaul of examples, descriptions links, and deprecation warnings can be done elsewhere (wanted to keep it small)
Edit: this PR got a little larger, because
wb_add_data()
andwrite_data()
were documented together. I separated the docs, to make sure thatwb_add_data()
was not marked with@keywords internal
Edit2 : I was not able to reproduce interactively, but when running R CMD Check in RStudio's build pane. I get the following error.