Skip to content

Commit 55f49ee

Browse files
chschancpsievertabhilashlakshmanmoutikabdessabourjackparmer
authored
Plotly june2022 (#18)
* Start v4.9.4 release candidate (plotly#1959) * Add crosstalk mapping to computed_mapping (not mapping) when present (plotly#1964) * Follow up to plotly#1952: add crosstalk mapping to computed_mapping (not mapping) when present * use dev version; update news * v4.9.4.1 release candidate (plotly#1965) * v4.9.4.1 release candidate * Reduce some of the warning noise * Reduce some of the warning noise * use dev version * Upgrade to plotly.js 2.0 (plotly#1967) * wip upgrade to plotly.js 2.0 * patch plotly.js source to support phantomjs/shinytest reverts part of plotly/plotly.js#5380 * bump mathjax version * use npm instead of yarn * make geom_bar() default to textposition='none'; approve new vdiffr 0.4 + plotly.js 2.0 baselines * Migrate to vdiffr 1.0 * Use layout.legend.title over layout.annotations to when converting guides for discrete scales * wip migrate to gha * try npm install * setup node * use recommended node version * try mac instead * install phantomjs; various cleanup * intentionally break a visual test * fix * use thematic's approach to testing * bump version * regenerate snapshots * map secrets to env variables * accept new gha baselines * whoops * hmm * approve shinytest baseline * intentionally break a visual test * always upload * revert change; new baselines * Remove the vdiffr dependency and use testthat snaphots directly * More obvious env var naming * more gha details * always upload * new snaps * intentionally break a visual test (again) * Revert "intentionally break a visual test (again)" This reverts commit a4e306c. * Update subplots.R (plotly#1974) To get rid of "Error is get_domains(length(plots), nrows, margin, widths = widths, heights = heights): The sum of the widths and heights arguments must be less than 1. * Better positioning of facet axis annotations (plotly#1975) * Add kaleido() for static image exporting (plotly#1971) * Close plotly#1970: revert plotly.js 2.0 change in default modebar buttons * Add save_image(), a convenience wrapper around kaleido()$transform() (plotly#1981) * Upgrade to plotly.js v2.2.1 (plotly#1982) * Use Plotly.react() to redraw in Shiny if layout.transition is populated (plotly#2001) * Use Plotly.react() to redraw in Shiny if layout.transition is populated * update news * Update to plotly.js v2.5.1 (plotly#2002) * update to plotly.js v2.5.1 * new visual baselines * Closes plotly#2031. ggplot internaly convert `color` to `colour` * Update README.md * update baselines * update URLs * add_area() now uses barpolar instead of area (plotly#2041) * Closes plotly#1872. Implemented to_basic for `geom_function` * 4.10.0 release * Added unit tests. And ran tests using * Conformed with carson's review * Reverted the deletion of _snaps * Added test to check whether the fix works or not. * Added test to check whether the fix works or not. * use dev versioning * Fix "partial argument match" warnings (plotly#1977) * No partial-argument-match warning in ggplotly * Update NEWS.md * Solved the LaTeX2exp error. Closes plotly#2027 (plotly#2030) Co-authored-by: Carson Sievert <[email protected]> * Revert "Solved the LaTeX2exp error. Closes plotly#2027 (plotly#2030)" This reverts commit aeaecd6. * Add ggalluvial support (plotly#2061) Co-authored-by: Carson Sievert <[email protected]> Co-authored-by: Abdessabour Moutik <[email protected]> * Fix ordering of lines in stat_ecdf() (plotly#2065) * Handle geom_tile() with no fill aesthetic (plotly#2063) * More careful joining of group columns (plotly#2064) * Avoid with() to better account for missing tickvals/ticktext (plotly#2062) * Test discrete-ness of fill after statistics have been calculated (plotly#2066) * Announce snapshot files when visual testing isn't enabled so they won't get deleted * Respect guide(aes = 'none') when constructing legend entries (plotly#2067) * Add 'plotly_selecting' to acceptable 'on' events (plotly#1280) * Use faster versions of system.file()/packageVersion()/is_installed() (plotly#2072) * Bump plotly.js to 2.11.1 (plotly#2096) * approve new visual baselines * Use rlang::local_options() in test * new shinytest baselines; avoid rlang altogether * plotly.js fix bug when crosstalk filter keys are null (plotly#2087) * transition `tidyr::gather_` -> `tidyr::pivot_longer` (plotly#2125) * transition `tidyr::gather_` -> `tidyr::pivot_longer` * add `NEWS` entry * Replace `is.na` with `rlang::is_na` in `map_color()` (plotly#2131) * roxygenize * Support renderValue within iframe * Add yaml for auto-P.R./fork updating; RS-2202 * [pull] master from ropensci:master (#2) * New version of scales no longer 'spans the gamut' of a qualitative color palette * reduce Reduce() for merging lists use do.call() instead to avoid quadratic complexity of growing lists * ensure_one(): reduce noise if attrs are NULL ignore NULL values * ggplotly: fix Xaxis anchor if the last row incomplete attach X axis to the last non-empty row in a column * stylistic changes * validate new visual baselines * Doesn't seem like we need to handle yaxis being a factor and if we do, it likely needs a different fix * update shinytest baselines * ugh maintaining shinytest tests for htmlwidgets is a real pain * update sf baselines * go back to using ggplotly() to prepare the widget for shiny rendering * the extra call to plotly_build() forces more computation then necessary and fixes plotly#1569 * Generation of non-intercept data in hline/vline should respect coord_flip(), closes plotly#1519 * update news; fix typo * Account for new changes in ggplot2's internal API, fixes plotly#1561 * Break values of positional scales have moved from to * Text labels of positional scales have moved from to * sf graticule degree labels are now quoted? * include braces * gsub * moar braces * new sf baselines * update news * upgrade to plotly.js v1.49.0 * upgrade to plotly.js v1.49.2 * upgrade to plotly.js v1.49.4 * update baseline * update shinytest baseline * make a deep copy of x.layout.width/x.layout.height for use in the resize method, closes plotly#1553 * Wrap user-supplied expression in evalq(), closes plotly#1528 * Use shiny::installExprFunction to register debug hooks * Asynchronously register plot events * Revert "Merge pull request plotly#1539 from ropensci/renderWidgetPrep" This reverts commit d416cea, reversing changes made to d11bb5a. * no need to be making deep copies * Improvements to algorithm for attaching key attribute for shiny's event data, fixes plotly#1610 * Account for pointNumbers * Do nothing if we don't recognize the case * When pointNumber is a constant, relay it as such * handle the 3 cases separately * use idx instead of i * update news * Call setInputValue only if it's defined, closes plotly#1624 * Revert "Revert "Merge pull request plotly#1539 from ropensci/renderWidgetPrep"" This reverts commit 2856731. * pass along a quoted expr that calls func() * Revert "go back to using ggplotly() to prepare the widget for shiny rendering" This reverts commit a0fa68f. * update news * verify_webgl() shouldn't warn about types that are already gl, closes plotly#1569 * fix test * Do not create structure with NULL to remove warnings * Fix management of environments in renderPlotly(), fixes plotly#1639 Both assignment and evaluation of func() should happen in the local environment * Add test to prove plotly#1299 fix * proposed change to avoid peeking at 'grid' unit internals * improve previous commit * refactor Paul's unit type commits from plotly#1646 * Some CRAN builds don't have pandoc * plot_mapbox() shouldn't force a scattermapbox trace type, closes plotly#1608 * fix R CMD check notes * r-devel apparently doesn't yet have grid::unitType() * remove outdated travis config * Validate changes visual baselines due to changes in R3.6's new RNG method * Add support for new plotly_sunburstclick event, closes plotly#1648 * validate new shinytest baselines * update news * fix silly mistake from 3cbccfc * document * test expectation should account for changes in the default color palette on r-devel * improve the aforementioned test example and add a visual test * Ignore calculated aesthetics that match specified aesthestics After tidyverse/ggplot2@10fa0014, it's possible for calculated aes to exist for all default_aes * fix broken link raster2uri and improve the description * cran hyperlinks must be https * fix roxygen warning * In contrast to attr(x, unit), the new grid::unitType() function always return a vector the same length as it's input * bump to release version; submit to CRAN * Respect sf's plot12 graticule attribute when building axis ticks, fixes plotly#1673 * Remove missing values in ticktext/tickvals As discussed in tidyverse/ggplot2#3566 (comment), it's now possible for the ggplot2 labels/positions to contains missing values, and we should be able to simply ignore them * link to comment * remove outdated/bad test expectation...the visual baseline covers it * Don't assume sf geometry is always accessible via [['geometry']], fixes plotly#1659 * validate baselines * update news * update to plotly.js 1.52.2 * new baselines * Add image and treemap visual tests. Also, ensure treemap's stroke reflects the paper's bgcolor * Add Object.setPrototypeOf polyfill for shinytest and update shinytest json baseline * Add add_image() for easier rendering of image traces via raster objects * Bump version, update news, document, add unit test for add_image() * roxygen escapes % now * Only call locale_dependency() for locales not included with standard bundle, closes plotly#1686 * CRAN submission * plot_mapbox() should default to scattermapbox unless z is present, fixes plotly#1707 * add visual test for plotly#1674 * update poor test expectations that assume stringsAsFactors defaults to TRUE * bump version; update news * update visual tests * remove rnaturalearth dependency in tests Co-authored-by: Carson Sievert <[email protected]> Co-authored-by: Alexey Stukalov <[email protected]> Co-authored-by: Wim <[email protected]> Co-authored-by: Paul Murrell <[email protected]> * Add back missing layout attribute * Pass element instead of ID * VIS-992: add test, use rhtmlBuildUtils (#15) * Initial commit * Remove prepush * Final line for plotly.yml * Re-add lib * Refactor * Create test * Specify rhtmlBuildUtils version * Remove preinstall script * Delete package-lock.json * Update documentation * Update documentation and remove library * Restore files * Restore file * Update build files * VIS-933: add rhtmlwidget-status attribute (#16) * Test callback * Update compiled files * Add rhtmlwidget-status attribute * wording change * VIS-1064: fix PPT exporting issue (#17) * Candidate fix * Bump version * Update widgetdefinition.js and build Co-authored-by: Carson Sievert <[email protected]> Co-authored-by: Abhilash Lakshman <[email protected]> Co-authored-by: Abdessabour Moutik <[email protected]> Co-authored-by: Jack Parmer <[email protected]> Co-authored-by: bersbersbers <[email protected]> Co-authored-by: casperhart <[email protected]> Co-authored-by: Simon P. Couch <[email protected]> Co-authored-by: Paul Hoffman <[email protected]> Co-authored-by: Jeffrey Shen <[email protected]> Co-authored-by: flipDevTools <[email protected]> Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com> Co-authored-by: Alexey Stukalov <[email protected]> Co-authored-by: Wim <[email protected]> Co-authored-by: Paul Murrell <[email protected]> Co-authored-by: Justin Yap <[email protected]>
1 parent 99fc3fc commit 55f49ee

File tree

822 files changed

+1722
-1056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

822 files changed

+1722
-1056
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ revdep/
2020
README.Rmd
2121
abbvie.R
2222
^\.httr-oauth$
23+
^\.github$

.github/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/R-CMD-check.yaml

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# NOTE: This workflow is overkill for most R packages
2+
# check-standard.yaml is likely a better choice
3+
# usethis::use_github_action("check-standard") will install it.
4+
#
5+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
6+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
7+
on:
8+
push:
9+
branches:
10+
- main
11+
- master
12+
pull_request:
13+
branches:
14+
- main
15+
- master
16+
17+
name: R-CMD-check
18+
19+
jobs:
20+
R-CMD-check:
21+
runs-on: ${{ matrix.config.os }}
22+
23+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
config:
29+
- {os: macOS-latest, r: 'release', visual_tests: true, node: "14.x", shinytest: true}
30+
- {os: windows-latest, r: 'release'}
31+
#- {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
32+
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.1.0 (ubuntu-18.04) R (4.1.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
33+
# vdiffr & shinytest only runs on linux r-release since the results aren't cross-platform
34+
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
35+
- {os: ubuntu-18.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
36+
- {os: ubuntu-18.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
37+
- {os: ubuntu-18.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
38+
39+
env:
40+
RSPM: ${{ matrix.config.rspm }}
41+
VISUAL_TESTS: ${{ matrix.config.visual_tests }}
42+
SHINYTEST: ${{ matrix.config.shinytest }}
43+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
44+
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}
45+
plotly_username: ${{ secrets.PLOTLY_USERNAME }}
46+
plotly_api_key: ${{ secrets.PLOTLY_API_KEY }}
47+
48+
steps:
49+
- uses: actions/checkout@v2
50+
51+
- uses: r-lib/actions/setup-r@v1
52+
id: install-r
53+
with:
54+
r-version: ${{ matrix.config.r }}
55+
http-user-agent: ${{ matrix.config.http-user-agent }}
56+
57+
- uses: r-lib/actions/setup-pandoc@v1
58+
59+
- name: Install pak and query dependencies
60+
run: |
61+
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
62+
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
63+
shell: Rscript {0}
64+
65+
- name: Restore R package cache
66+
uses: actions/cache@v2
67+
with:
68+
path: |
69+
${{ env.R_LIBS_USER }}/*
70+
!${{ env.R_LIBS_USER }}/pak
71+
key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
72+
restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-
73+
74+
- name: Install Linux sysdeps
75+
if: runner.os == 'Linux'
76+
run: |
77+
pak::local_system_requirements(execute = TRUE)
78+
pak::pkg_system_requirements("rcmdcheck", execute = TRUE)
79+
shell: Rscript {0}
80+
81+
- name: Install dependencies
82+
run: |
83+
if (Sys.info()[['sysname']] == 'Darwin') options(pkgType = 'mac.binary')
84+
pak::local_install_dev_deps(upgrade = FALSE)
85+
pak::pkg_install("rcmdcheck")
86+
shell: Rscript {0}
87+
88+
- name: Set up Python 3.8
89+
uses: actions/setup-python@v2
90+
with:
91+
python-version: 3.8
92+
93+
- name: Install kaleido
94+
if: matrix.config.visual_tests == true
95+
run: |
96+
sudo chown -R $UID $CONDA # https://github.com/nextstrain/conda/issues/5
97+
Rscript -e "reticulate::install_miniconda()"
98+
Rscript -e "reticulate::conda_install('r-reticulate', 'python-kaleido')"
99+
Rscript -e "reticulate::conda_install('r-reticulate', 'plotly', channel = 'plotly')"
100+
Rscript -e "reticulate::use_miniconda('r-reticulate')"
101+
102+
- name: Install shinytest deps
103+
if: matrix.config.shinytest == true
104+
run: |
105+
Rscript -e 'shinytest::installDependencies()'
106+
R CMD install .
107+
shell: bash
108+
109+
# Run test() before R CMD check since, for some reason, rcmdcheck::rcmdcheck() skips vdiffr tests
110+
- name: Run Tests
111+
run: |
112+
options(crayon.enabled = TRUE, testthat.progress.max_fails=1000)
113+
if (!require(devtools)) pak::pak("devtools")
114+
if (!require(reshape2)) pak::pak("reshape2")
115+
res <- devtools::test()
116+
df <- as.data.frame(res)
117+
if (sum(df$failed) > 0 || any(df$error)) stop("GHA CI tests failed")
118+
shell: Rscript {0}
119+
120+
# Upload the whole pkg since tests where run with devtools::test()
121+
- name: Upload check results
122+
if: always()
123+
uses: actions/upload-artifact@master
124+
with:
125+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
126+
path: ./
127+
128+
# Run check with --no-tests since we ran them abve
129+
- name: Check
130+
run: |
131+
options(crayon.enabled = TRUE)
132+
rcmdcheck::rcmdcheck(args = c("--no-tests", "--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
133+
shell: Rscript {0}
134+
135+
#- name: Show testthat output
136+
# if: always()
137+
# run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
138+
# shell: bash
139+
140+
- name: Don't use tar from old Rtools to store the cache
141+
if: ${{ runner.os == 'Windows' && startsWith(steps.install-r.outputs.installed-r-version, '3.6' ) }}
142+
shell: bash
143+
run: echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ revdep/
1818
travis_debug.R
1919
.httr-oauth
2020
tests/testthat/Rplots.pdf
21-
inst/examples/shiny/event_data/tests/shinytest/mytest-current/

DESCRIPTION

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: plotly
22
Title: Create Interactive Web Graphics via 'plotly.js'
3-
Version: 4.9.4.3
3+
Version: 4.10.0.9001
44
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
55
email = "[email protected]", comment = c(ORCID = "0000-0002-4958-2844")),
66
person("Chris", "Parmer", role = "aut",
@@ -20,8 +20,8 @@ Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
2020
person("Plotly Technologies Inc.", role = "cph"))
2121
License: MIT + file LICENSE
2222
Description: Create interactive web graphics from 'ggplot2' graphs and/or a custom interface to the (MIT-licensed) JavaScript library 'plotly.js' inspired by the grammar of graphics.
23-
URL: https://plotly-r.com, https://github.com/ropensci/plotly#readme, https://plotly.com/r/
24-
BugReports: https://github.com/ropensci/plotly/issues
23+
URL: https://plotly-r.com, https://github.com/plotly/plotly.R, https://plotly.com/r/
24+
BugReports: https://github.com/plotly/plotly.R/issues
2525
Depends:
2626
R (>= 3.2.0),
2727
ggplot2 (>= 3.0.0)
@@ -36,7 +36,7 @@ Imports:
3636
base64enc,
3737
htmltools (>= 0.3.6),
3838
htmlwidgets (>= 1.5.2.9001),
39-
tidyr,
39+
tidyr (>= 1.0.0),
4040
RColorBrewer,
4141
dplyr,
4242
vctrs,
@@ -53,32 +53,31 @@ Suggests:
5353
hexbin,
5454
ggthemes,
5555
GGally,
56+
ggalluvial,
5657
testthat,
5758
knitr,
5859
devtools,
5960
shiny (>= 1.1.0),
6061
shinytest (>= 1.3.0),
6162
curl,
6263
rmarkdown,
63-
vdiffr,
6464
Cairo,
6565
broom,
6666
webshot,
6767
listviewer,
6868
dendextend,
69-
sf,
7069
maptools,
7170
rgeos,
71+
sf,
7272
png,
7373
IRdisplay,
7474
processx,
7575
plotlyGeoAssets,
7676
forcats,
77-
palmerpenguins
77+
palmerpenguins,
78+
rversions,
79+
reticulate
7880
LazyData: true
7981
RoxygenNote: 7.1.2
8082
Encoding: UTF-8
8183
Roxygen: list(markdown = TRUE)
82-
Remotes:
83-
rstudio/thematic,
84-
Displayr/htmlwidgets

NAMESPACE

+8
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ S3method(print,api)
3434
S3method(print,api_grid)
3535
S3method(print,api_grid_local)
3636
S3method(print,api_plot)
37+
S3method(print,kaleidoScope)
3738
S3method(print,plotly_data)
3839
S3method(to_basic,GeomAbline)
40+
S3method(to_basic,GeomAlluvium)
3941
S3method(to_basic,GeomAnnotationMap)
4042
S3method(to_basic,GeomArea)
4143
S3method(to_basic,GeomBoxplot)
@@ -47,6 +49,7 @@ S3method(to_basic,GeomDensity2d)
4749
S3method(to_basic,GeomDotplot)
4850
S3method(to_basic,GeomErrorbar)
4951
S3method(to_basic,GeomErrorbarh)
52+
S3method(to_basic,GeomFunction)
5053
S3method(to_basic,GeomHex)
5154
S3method(to_basic,GeomHline)
5255
S3method(to_basic,GeomJitter)
@@ -65,6 +68,7 @@ S3method(to_basic,GeomSf)
6568
S3method(to_basic,GeomSmooth)
6669
S3method(to_basic,GeomSpoke)
6770
S3method(to_basic,GeomStep)
71+
S3method(to_basic,GeomStratum)
6872
S3method(to_basic,GeomTile)
6973
S3method(to_basic,GeomViolin)
7074
S3method(to_basic,GeomVline)
@@ -136,6 +140,7 @@ export(hide_guides)
136140
export(hide_legend)
137141
export(highlight)
138142
export(highlight_key)
143+
export(kaleido)
139144
export(knit_print.api_grid)
140145
export(knit_print.api_grid_local)
141146
export(knit_print.api_plot)
@@ -168,6 +173,7 @@ export(remove_typedarray_polyfill)
168173
export(rename)
169174
export(rename_)
170175
export(renderPlotly)
176+
export(save_image)
171177
export(schema)
172178
export(select)
173179
export(select_)
@@ -251,6 +257,7 @@ importFrom(purrr,transpose)
251257
importFrom(rlang,"!!!")
252258
importFrom(rlang,"!!")
253259
importFrom(rlang,eval_tidy)
260+
importFrom(rlang,is_na)
254261
importFrom(stats,complete.cases)
255262
importFrom(stats,is.leaf)
256263
importFrom(stats,quantile)
@@ -260,6 +267,7 @@ importFrom(tidyr,unnest)
260267
importFrom(tools,file_ext)
261268
importFrom(tools,file_path_sans_ext)
262269
importFrom(utils,browseURL)
270+
importFrom(utils,capture.output)
263271
importFrom(utils,data)
264272
importFrom(utils,file.edit)
265273
importFrom(utils,getFromNamespace)

0 commit comments

Comments
 (0)