-
Notifications
You must be signed in to change notification settings - Fork 261
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
add excel serializer/parser #975
Conversation
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.
LGTM! Just missing tests for the serializer and parser
Feel free to duplicate how parquet approached them:
plumber/tests/testthat/test-parse-body.R
Lines 112 to 135 in f4230ed
test_that("Test parquet parser", { skip_if_not_installed("arrow") tmp <- tempfile() on.exit({ file.remove(tmp) }, add = TRUE) r_object <- iris res <- try(arrow::write_parquet(r_object, tmp)) skip_if( inherits(res, "try-error"), "arrow::write_parquet() isn't working." ) val <- readBin(tmp, "raw", 10000) parsed <- parse_body(val, "application/vnd.apache.parquet", make_parser("parquet")) # convert from parquet tibble to data.frame parsed <- as.data.frame(parsed, stringsAsFactors = FALSE) attr(parsed, "spec") <- NULL expect_equal(parsed, r_object) }) - https://github.com/rstudio/plumber/blob/f4230ed45fa67d57179a901976245687427559d2/tests/testthat/test-serializer-feather.R
Thank you!
You can't see the uncommitted new-file |
@schloerke should be good now, tests are confirmed committed, |
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!!
* main: (28 commits) feat: add `excel` serializer/parser (#975) ci: Error on spelling (#981) docs: Improve forward docs a bit (#978) Fix file path tests on windows (#979) bug: Update default debug behaviour to `FALSE` (#976) perf: Avoid disk I/O during parsing (#972) docs: Add note on annotating required parameters (#971) Allows port to be specified as an environment variable (#963) tests: Replace `with_mock()` with `with_mocked_bindings()` (#970) feat(serializer): Add support for ragg and svglite (#964) chore: Fix pkgdown warnings. Use lifecycle inline R badges (#965) v1.2.2 release candidate (#948) bug: Use `{rlang}` instead of `{ellipsis}` (#958) docs: Update URLs (#954) docs: fix table spacing (#951) docs: change link to httr2 in routing and input vignette (#944) Specify interactive mode in doc (#932) Fall back to sys env var if R option doesn't exist (#934) Add support for quoted boundary for multipart request parsing. (#924) chore: Remove parse comment to match implementation (#931) ...
Fixes #973
Fixes #959
PR task list:
devtools::document()