Skip to content
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

Dash R 0.9.1 release #272

Merged
merged 68 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
e5b0cfe
contribute test script
Aug 3, 2020
a242d49
remove version updating in DESCRIPTION
Aug 3, 2020
f1b81d6
fix EOL
rpkyle Aug 4, 2020
4d234cb
Merge pull request #222 from plotly/212-untangle-dashr-build
rpkyle Aug 4, 2020
4e4ccb1
Add support for user-defined server routes (#225)
rpkyle Aug 28, 2020
5bd1bbb
Provide support for script and stylesheet attributes (#226)
rpkyle Sep 4, 2020
3f862f9
Authenticate on pulls from Docker Hub (#231)
rpkyle Oct 6, 2020
3a3ee2f
Add support for callback graph improvements and timing (#224)
rpkyle Oct 9, 2020
766e3a8
Update CHANGELOG.md
rpkyle Oct 12, 2020
3b54773
189 - Add Pattern Matching Callbacks for Dash R (#228)
HammadTheOne Oct 21, 2020
03ed383
Fixing Null error with glue::glue interpolation (#233)
HammadTheOne Oct 21, 2020
5b31534
Update CHANGELOG.md
rpkyle Oct 26, 2020
2fdd157
Update dash-renderer to v1.8.2 (#234)
rpkyle Oct 26, 2020
bb9fc6a
bump package version to v0.8.0
Oct 26, 2020
314ced8
Update R/dash.R
rpkyle Oct 27, 2020
3f9f9f1
Update tests/testthat/test-wildcards.R
rpkyle Oct 27, 2020
e093463
Update DESCRIPTION
rpkyle Oct 27, 2020
6ee2702
Merge branch 'master' into dev
rpkyle Oct 27, 2020
b477fe0
add PMC example
Oct 27, 2020
6fffb44
update documentation
Oct 27, 2020
b4ca5f9
update CHANGELOG release date
Oct 27, 2020
24b491a
Merge branch 'dev' of github.com:plotly/dashR into dev
Oct 27, 2020
c120ab2
:hammer: PMC docs refactor
Oct 27, 2020
56d1dc0
Update tests/integration/callbacks/test_pattern_matching.py
rpkyle Oct 27, 2020
226f949
Update tests/integration/callbacks/test_pattern_matching.py
rpkyle Oct 27, 2020
fd5f3da
Update tests/integration/callbacks/test_pattern_matching.py
rpkyle Oct 28, 2020
c3a34b6
add import of glue
Oct 28, 2020
877f463
add glue to imports.R
Oct 28, 2020
b238a57
fix line length issue
Oct 28, 2020
ff858ac
Fix setCallbackContext for wildcard and ordinary inputs (#237)
HammadTheOne Oct 30, 2020
7a23405
Merge branch 'master' into dev
rpkyle Oct 31, 2020
aac1db5
bump dependency versions
Oct 31, 2020
b7b1cfa
update CHANGELOG
Oct 31, 2020
4326e08
update dash-renderer to v1.8.3
Oct 31, 2020
ed022c8
update CHANGELOG
Oct 31, 2020
8c2dc66
Favicon fix (#240)
HammadTheOne Nov 17, 2020
d5a472e
Remove context reference from CircleCI (#241)
rpkyle Jan 19, 2021
0aec5f8
Dash R Core Package Unification (#243)
HammadTheOne May 18, 2021
54c9695
Added deprecation warning if dcc, html, or table packages are attache…
HammadTheOne May 20, 2021
a055015
Update `highlight.js` dependency for dash-table (#262)
HammadTheOne Aug 11, 2021
043c9ee
Add Dash 2 layout syntax wrappers and html tags (#265)
HammadTheOne Aug 25, 2021
456f09d
Fix suppress_callback_exceptions config (#268)
HammadTheOne Sep 22, 2021
948f0f7
Simplified callback syntax and addtional utility functions (#270)
HammadTheOne Sep 29, 2021
ed1acb3
Update monorepo and rebuild package (#271)
HammadTheOne Oct 3, 2021
4419ce3
Merge branch 'master' into dev
HammadTheOne Oct 4, 2021
0b3544b
Updating DESCRIPTION and .Rbuildignore forchecks
HammadTheOne Oct 4, 2021
89f74ef
Updating function descriptions and NAMESPACE imports
HammadTheOne Oct 4, 2021
5dda6f5
Fixed examples and updated docs
HammadTheOne Oct 5, 2021
7c76953
Updating version
HammadTheOne Oct 6, 2021
d419517
Remove references to dash namespace within package
HammadTheOne Oct 7, 2021
aff9b99
Update testthat and remove deprecated context calls
HammadTheOne Oct 7, 2021
0ad3b24
Removed fixup_metadata.R
HammadTheOne Oct 7, 2021
3aa7abd
Removing more dash namespace references
HammadTheOne Oct 8, 2021
e934ca0
Concatenating component function files
HammadTheOne Oct 8, 2021
68427b3
Updating checks
HammadTheOne Oct 8, 2021
cb93cdb
Merging components into package R files
HammadTheOne Oct 8, 2021
3b440da
Fixing check
HammadTheOne Oct 9, 2021
318d7cf
More package cleanup
HammadTheOne Oct 9, 2021
6a1886a
testthat 3.0.0
HammadTheOne Oct 9, 2021
950b90d
Rebuilding package
HammadTheOne Oct 9, 2021
dade919
Fixed conditional for multiple outputs
HammadTheOne Oct 9, 2021
bce3387
Fix no_update test
HammadTheOne Oct 9, 2021
68343eb
Fixing callback_instrumentation test
HammadTheOne Oct 9, 2021
27b98b3
Fixing unit test
HammadTheOne Oct 9, 2021
bde703b
Added DBC to Dash R package (#273)
HammadTheOne Oct 12, 2021
3c5e5e0
Reverting sorted prop order
HammadTheOne Oct 13, 2021
582fd92
Checks updates
HammadTheOne Oct 13, 2021
f71ec43
Re-running test
HammadTheOne Oct 13, 2021
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Imports:
rlang,
utils
Suggests:
testthat,
testthat (>= 3.1.0),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't even know there was a 3.1.0! Looks like it only got released a couple days ago. I think 3.0.0 would be just fine too

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
testthat (>= 3.1.0),
testthat (>= 3.0.0),

rstudioapi
License: MIT + file LICENSE
Encoding: UTF-8
Expand Down
2 changes: 1 addition & 1 deletion R/dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ setWildcardId <- function(id) {

#' Input/Output/State definitions
#'
#' Use in conjunction with the `callback()` method from the [dash::Dash] class
#' Use in conjunction with the `callback()` method from the [Dash] class
#' to define the update logic in your application.
#'
#' The `dashNoUpdate()` function permits application developers to prevent a
Expand Down
2 changes: 1 addition & 1 deletion R/simple_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' if (interactive()) {
#' app <- dash_app() %>%
#' set_layout(
#' dash::dccChecklist(
#' dccChecklist(
#' id = "table_params",
#' labelStyle = list(display = "block"),
#' options = list(
Expand Down
6 changes: 3 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ is_dash_app <- function(x) {

assert_dash <- function(x) {
if (!is_dash_app(x)) {
stop("You must provide a Dash app object (created with `dash::Dash$new()` or `dash::dash_app()`)", call. = FALSE)
stop("You must provide a Dash app object (created with `Dash$new()` or `dash_app()`)", call. = FALSE)
}
invisible(TRUE)
}
Expand All @@ -1559,9 +1559,9 @@ componentify <- function(x) {
stop("dash: layout cannot include Shiny tags (you might have loaded the {shiny} package after loading {dash})", call. = FALSE)
} else if (is.list(x)) {
x <- remove_empty(x)
dash::htmlDiv(children = lapply(x, componentify))
htmlDiv(children = lapply(x, componentify))
} else if (length(x) == 1) {
dash::htmlSpan(children = x)
htmlSpan(children = x)
} else if (is.null(x)) {
return(NULL)
} else {
Expand Down
4 changes: 2 additions & 2 deletions R/wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#' Create a Dash application
#'
#' This is a convenience function that returns a [`dash::Dash`] R6 object.
#' This is a convenience function that returns a [`Dash`] R6 object.
#' For advanced usage, you can use the object as an R6 object directly instead
#' of the functions provided by the `{dash}` package.
#'
Expand Down Expand Up @@ -60,7 +60,7 @@ dash_app <- function(title = NULL,
assets_ignore <- ""
}

app <- dash::Dash$new(
app <- Dash$new(
assets_folder = assets_folder,
assets_url_path = assets_url_path,
assets_ignore = assets_ignore,
Expand Down
2 changes: 1 addition & 1 deletion man/simple_table.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 0 additions & 36 deletions tests/circleci/fixup_metadata.R

This file was deleted.

2 changes: 1 addition & 1 deletion tests/manual/callbacks-simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ library(dash)

dash_app() %>%
set_layout(
dash::dccInput(id = "text", "sample"),
dccInput(id = "text", "sample"),
div("CAPS: ", span(id = "out1")),
div("small: ", span(id = "out2"))
) %>%
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-attributes.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
context("attributes")

test_that("stylesheets can be added with or without attributes", {
stylesheet_pattern <- '^.*<link href="(https.*)">.*$'
script_pattern <- '^.*<script src="(https.*)">.*$'
Expand Down
14 changes: 6 additions & 8 deletions tests/testthat/test-callback.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
context("callback")

test_that("Callback outputs can be provided with or without output function", {

app <- Dash$new()
Expand All @@ -14,7 +12,7 @@ test_that("Callback outputs can be provided with or without output function", {
)
)
)

expect_silent(
app$callback(output(id = 'output-state', property = 'children'),
list(input(id = 'submit-button', property = 'n_clicks'),
Expand All @@ -24,7 +22,7 @@ test_that("Callback outputs can be provided with or without output function", {
sprintf("The Button has been pressed \"%s\" times, Input 1 is \"%s\", and Input 2 is \"%s\"", n_clicks, input1, input2)
})
)

expect_silent(
app$callback(output=list(id = 'output-state', property = 'children'),
list(input(id = 'submit-button', property = 'n_clicks'),
Expand All @@ -37,9 +35,9 @@ test_that("Callback outputs can be provided with or without output function", {
})

test_that("Repeating outputs across callbacks yields an error", {

app <- Dash$new()

app$layout(
htmlDiv(
list(
Expand All @@ -54,7 +52,7 @@ test_that("Repeating outputs across callbacks yields an error", {
)
)
)

app$callback(list(output(id = 'output-state', property = 'children'),
output(id = 'output-two', property = 'children')),
list(input(id = 'submit-button', property = 'n_clicks'),
Expand All @@ -63,7 +61,7 @@ test_that("Repeating outputs across callbacks yields an error", {
function(n_clicks, input1, input2) {
sprintf("The Button has been pressed \"%s\" times, Input 1 is \"%s\", and Input 2 is \"%s\"", n_clicks, input1, input2)
})

expect_error(
app$callback(list(output(id = 'output-state', property = 'children'),
output(id = 'output-three', property = 'children')),
Expand Down
4 changes: 1 addition & 3 deletions tests/testthat/test-components.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
context("components")

test_that("Components work recursively (components can be children of components)", {

# div inside a div
Expand Down Expand Up @@ -75,7 +73,7 @@ test_that("wildcard attributes work with children", {

# test_that("Can translate arbitrary HTML string", {
# skip_if_not_installed("dashDangerouslySetInnerHtml")
#
#
# html <- "<div> 1 </div>"
# expect_is(
# dashDangerouslySetInnerHtml::DangerouslySetInnerHTML(HTML(html)),
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-dash.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
context("dash-api")

test_that("Can access fiery server within a dash app", {

d <- Dash$new()
Expand Down
12 changes: 5 additions & 7 deletions tests/testthat/test-index.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
context("customindex")

test_that("Omitting required template keys produces warnings", {
string <-
"<!DOCTYPE html>
Expand All @@ -18,24 +16,24 @@ test_that("Omitting required template keys produces warnings", {
</footer>
</body>
</html>"

app <- Dash$new()

expect_error(
app$index_string(gsub("\\{\\%config\\%\\}|\\{\\%scripts\\%\\}|\\{\\%app_entry\\%\\}", "", string)),
"Did you forget to include app_entry, config, scripts in your index string?"
)

expect_error(
app$index_string(gsub("\\{\\%scripts\\%\\}", "", string)),
"Did you forget to include scripts in your index string?"
)

expect_error(
app$index_string(gsub("\\{\\%app_entry\\%\\}", "", string)),
"Did you forget to include app_entry in your index string?"
)

expect_error(
app$index_string(gsub("\\{\\%config\\%\\}", "", string)),
"Did you forget to include config in your index string?"
Expand Down
50 changes: 24 additions & 26 deletions tests/testthat/test-layout.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
context("layout")

test_that("layout IDs must be unique", {

app <- Dash$new()
Expand Down Expand Up @@ -41,14 +39,14 @@ test_that("Layout errors", {
test_that("Layout basics", {
expect_identical(
set_get_layout_new(div("one"), h2("two")),
set_get_layout_old(dash::htmlDiv(list(
dash::htmlDiv("one"), dash::htmlH2("two")
set_get_layout_old(htmlDiv(list(
htmlDiv("one"), htmlH2("two")
)))
)
expect_identical(set_get_layout_new("one", "two"), set_get_layout_new(list("one", "two")))
expect_identical(
set_get_layout_new(function() div("one", "two")),
set_get_layout_old(function() dash::htmlDiv(list("one", "two")))
set_get_layout_old(function() htmlDiv(list("one", "two")))
)
})

Expand All @@ -75,15 +73,15 @@ test_that("No need to place everything in containers and lists", {
expect_error(set_get_layout_old("test"))
expect_identical(
set_get_layout_new(div("one", "two")),
set_get_layout_old(dash::htmlDiv(list("one", "two")))
set_get_layout_old(htmlDiv(list("one", "two")))
)
expect_identical(set_get_layout_new("test"), set_get_layout_old(dash::htmlSpan("test")))
expect_identical(set_get_layout_new("test"), set_get_layout_old(htmlSpan("test")))
expect_identical(
set_get_layout_new("one", 5, TRUE),
set_get_layout_old(dash::htmlDiv(list(
dash::htmlSpan("one"),
dash::htmlSpan(5),
dash::htmlSpan(TRUE)
set_get_layout_old(htmlDiv(list(
htmlSpan("one"),
htmlSpan(5),
htmlSpan(TRUE)
)))
)
})
Expand All @@ -101,7 +99,7 @@ test_that("Function as layout works", {
app2 <- Dash$new()
set.seed(1000)
runif(1)
app2$layout(dash::htmlDiv(runif(1)))
app2$layout(htmlDiv(runif(1)))
app2_layout <- app2$layout_get()
expect_identical(app1_layout1, app2_layout)

Expand All @@ -114,7 +112,7 @@ test_that("Function as layout works", {
expect_false(identical(app1_fx_layout1, app1_fx_layout2))
app2_fx <- Dash$new()
set.seed(1000)
app2_fx$layout(function() dash::htmlDiv(runif(1)))
app2_fx$layout(function() htmlDiv(runif(1)))
app2_fx_layout1 <- app2_fx$layout_get()
app2_fx_layout2 <- app2_fx$layout_get()
expect_identical(app1_fx_layout1, app2_fx_layout1)
Expand All @@ -124,19 +122,19 @@ test_that("Function as layout works", {
test_that("Sample apps layout are identical with the compact syntax", {
expect_identical(
set_get_layout_old(
dash::htmlDiv(list(
dash::htmlDiv('Dash To-Do List'),
dash::dccInput(id = 'new-item'),
dash::htmlButton("Add", id = "add"),
dash::htmlButton("Clear Done", id = "clear-done"),
dash::htmlDiv(id = "list-container"),
dash::htmlDiv(id = "totals")
htmlDiv(list(
htmlDiv('Dash To-Do List'),
dccInput(id = 'new-item'),
htmlButton("Add", id = "add"),
htmlButton("Clear Done", id = "clear-done"),
htmlDiv(id = "list-container"),
htmlDiv(id = "totals")
))
),

set_get_layout_new(
div('Dash To-Do List'),
dash::dccInput(id = 'new-item'),
dccInput(id = 'new-item'),
button("Add", id = "add"),
button("Clear Done", id = "clear-done"),
div(id = "list-container"),
Expand All @@ -146,11 +144,11 @@ test_that("Sample apps layout are identical with the compact syntax", {

expect_identical(
set_get_layout_old(
dash::htmlDiv(
htmlDiv(
list(
dash::htmlH1('Hello Dash'),
dash::htmlDiv(children = "Dash: A web application framework for R."),
dash::dccGraph(
htmlH1('Hello Dash'),
htmlDiv(children = "Dash: A web application framework for R."),
dccGraph(
figure=list(
data=list(
list(
Expand All @@ -176,7 +174,7 @@ test_that("Sample apps layout are identical with the compact syntax", {
set_get_layout_new(
h1('Hello Dash'),
div("Dash: A web application framework for R."),
dash::dccGraph(
dccGraph(
figure=list(
data=list(
list(
Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test-routes.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
context("routes")

test_that("URLs are properly redirected with app$redirect", {
app <- Dash$new()

Expand Down
Loading