-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #568 from yjunechoe/rollback-pb_call-tracking
Roll-back tracking full language objects for internal calls
- Loading branch information
Showing
9 changed files
with
72 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Ensure that rendering reports in Quarto do not produce `data-qmd` attributes | ||
# since the reports are not *data* tables | ||
|
||
quarto::quarto_render("tests/manual_tests/test_quarto_render.qmd") | ||
stopifnot(file.exists("tests/manual_tests/test_quarto_render.html")) | ||
utils::browseURL("tests/manual_tests/test_quarto_render.html") | ||
|
||
test_qmd <- xml2::read_html("tests/manual_tests/test_quarto_render.html") | ||
|
||
data_qmd_divs <- xml2::xml_find_all(test_qmd, "//div[@data-qmd]") | ||
data_qmd_divs | ||
|
||
stopifnot(length(data_qmd_divs) == 0) | ||
|
||
unlink("tests/manual_tests/test_quarto_render.html") | ||
unlink("tests/manual_tests/test_quarto_render_files/*", recursive = TRUE) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Setup | ||
library(pointblank) | ||
agent <- create_agent(data.frame(x = 1)) |> | ||
col_vals_equal(x, 1) |> | ||
interrogate() | ||
show_size <- function(x) { | ||
size <- if (is.character(x) && file.exists(x)) file.size(x) else object.size(x) | ||
scales::label_bytes()(as.integer(size)) | ||
} | ||
|
||
# Assign something large to env | ||
largeobj <- replicate(100, mtcars[sample(nrow(mtcars), 1e4, replace = TRUE),]) | ||
show_size(largeobj) | ||
|
||
# Serialize | ||
f <- tempfile(fileext = ".rds") | ||
saveRDS(agent, f) | ||
|
||
# Should be equivalent | ||
stopifnot(identical(agent, readRDS(f))) | ||
|
||
# File size check | ||
show_size(agent) | ||
show_size(f) | ||
|
||
# Should be uninfluenced by size of objects in env | ||
stopifnot(file.size(f) < as.integer(object.size(largeobj))) | ||
|
||
# Cleanup | ||
file.remove(f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters