Skip to content

v4.9.4.1 release candidate #1965

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

Merged
merged 3 commits into from
Jun 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: plotly
Title: Create Interactive Web Graphics via 'plotly.js'
Version: 4.9.4.9000
Version: 4.9.4.1
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
email = "[email protected]", comment = c(ORCID = "0000-0002-4958-2844")),
person("Chris", "Parmer", role = "aut",
@@ -36,7 +36,7 @@ Imports:
base64enc,
htmltools (>= 0.3.6),
htmlwidgets (>= 1.5.2.9001),
tidyr,
tidyr (>= 1.0.0),
RColorBrewer,
dplyr,
vctrs,
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 4.9.4.9000
# 4.9.4.1

## BUG FIXES

2 changes: 1 addition & 1 deletion R/ggplotly.R
Original file line number Diff line number Diff line change
@@ -346,7 +346,7 @@ gg2list <- function(p, width = NULL, height = NULL,
x <- reComputeGroup(x, z)
tib <- tibble::as_tibble(x[c("PANEL", "group")])
tib[["key"]] <- key
nested <- tidyr::nest(tib, key, .key = key)
nested <- tidyr::nest(tib, key = key)
# reduce the dimensions of list column elements from 2 to 1
nested$key <- lapply(nested$key, function(x) x[[1]])
nested
2 changes: 1 addition & 1 deletion tests/testthat/test-ggplot-bar.R
Original file line number Diff line number Diff line change
@@ -127,7 +127,7 @@ test_that('guides(colour="none") does not affect fill legend', {
test_that("guides(fill=FALSE) does not affect colour legend", {
gg <- ggplot(data = df, aes(x = time, y = total_bill, colour = time)) +
geom_bar(fill = "grey", stat = "identity") +
guides(fill = FALSE)
guides(fill = "none")
info <- expect_traces(gg, 2, "aes-colour-guides-fill-FALSE")
for(tr in info$data){
expect_equivalent(tr$marker$color, toRGB("grey"))
6 changes: 4 additions & 2 deletions tests/testthat/test-ggplot-quantile.R
Original file line number Diff line number Diff line change
@@ -10,7 +10,8 @@ test_that("Basic geom_quantile() works", {
geom_point() +
geom_quantile()

l <- plotly_build(p)$x
# partial match of 'coef' to 'coefficients'
l <- suppressWarnings(plotly_build(p)$x)

expect_length(l$data, 4)

@@ -35,7 +36,8 @@ test_that("Can specify gpar() in geom_quantile()", {
geom_point() +
geom_quantile(colour = "red", alpha = 0.5)

l <- plotly_build(p)$x
# partial match of 'coef' to 'coefficients'
l <- suppressWarnings(plotly_build(p)$x)

expect_length(l$data, 4)

2 changes: 1 addition & 1 deletion tests/testthat/test-plotly-data.R
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ test_that("plotly_data returns data frame", {
})

test_that("plotly_data preserves groups in data", {
d <- plotly_data(group_by_(plot_ly(mtcars), c("vs", "am")))
d <- plotly_data(group_by(plot_ly(mtcars), vs, am))
expect_true(dplyr::groups(d)[[1]] == "vs")
})

2 changes: 1 addition & 1 deletion tests/testthat/test-plotly-filename.R
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ test_that("filename supports names with paths included ", {
endpt <- sprintf("files/%s/trash", file$fid)
res <- api(endpt, "POST")
}
f <- plotly_POST(p, filename = filename)
f <- api_create(p, filename = filename)
expect_match(f$filename, "awesome")
expect_true(f$parented)
})
14 changes: 7 additions & 7 deletions tests/testthat/test-plotly-getfigure.R
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
context("get_figure")
context("api_download_plot")

test_that("requests made by a user who doesn't exist error a 404", {
skip_on_cran()
skip_if_not_master()
expect_error({
get_figure("klmadslfjdfljdsf", 0)
api_download_plot(0, "klmadslfjdfljdsf")
}, ".*404.*")
})

test_that("requests made to retrieve a figure that doesn't exist returns a 404", {
skip_on_cran()
skip_if_not_master()
expect_error({
get_figure("get_test_user", 18324823)
api_download_plot(18324823, "get_test_user")
}, ".*404.*")
})

test_that("requests made to retrieve some elses private file errors", {
skip_on_cran()
skip_if_not_master()
expect_error(get_figure("get_test_user", 1))
expect_error(api_download_plot(1, "get_test_user"))
})

test_that("retrieving a public figure ... works.", {
skip_on_cran()
skip_if_not_master()
fig <- get_figure("get_test_user", 0)
fig <- api_download_plot(0, "get_test_user")
# get the data behind the hash
p <- plotly_build(fig)$x
expect_equivalent(p$data[[1]]$x, c("1", "2", "3"))
@@ -34,7 +34,7 @@ test_that("retrieving a public figure ... works.", {
test_that("can add traces to a subplot figure", {
skip_on_cran()
skip_if_not_master()
fig <- get_figure('chelsea_lyn', 6366)
fig <- api_download_plot(6366, 'chelsea_lyn')
p <- add_lines(fig, x = c(1, 2, 3), y = c(4, 2, 4))
expect_equivalent(
length(plotly_build(fig)$x$data) + 1,
@@ -45,7 +45,7 @@ test_that("can add traces to a subplot figure", {
test_that("posting a hidden plot returns a secret key", {
skip_on_cran()
skip_if_not_master()
res <- plotly_POST(plot_ly(), sharing = "secret")
res <- api_create(plot_ly(), sharing = "secret")
expect_true(res$share_key_enabled)
expect_true(nchar(res$share_key) > 1)
})