Skip to content

Commit

Permalink
fix issue with plot blocks, bump version + fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg committed Oct 14, 2024
1 parent b4d605a commit 8260e59
Show file tree
Hide file tree
Showing 38 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: blockr
Title: A block-based framework for data manipulation and visualization
Version: 0.0.2.9031
Version: 0.0.2.9035
Authors@R:
c(person(given = "Nicolas",
family = "Bennett",
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# blockr 0.0.2.9031
# blockr 0.0.2.9035

## Feature
- Improved `submit` feature for blocks. Now submit isn't added as a class but as a special block attribute. When you design a block, you can pass the `submit` parameter like so:
Expand Down
4 changes: 3 additions & 1 deletion R/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ generate_server_block <- function(
if (is.null(in_dat()) && !inherits(x, "transform_block")) {
evaluate_block(blk())
} else {
if (nrow(in_dat()) == 0 && !inherits(x, "parser_block")) return(data.frame())
if (inherits(in_dat(), "data.frame") && nrow(in_dat()) == 0) {
return(data.frame())
}
evaluate_block(blk(), data = in_dat())
}
})
Expand Down
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,6 @@ reference:

news:
releases:
- text: "blockr 0.0.2.9031"
- text: "blockr 0.0.2.9035"
- text: "blockr 0.0.2"
- text: "blockr 0.0.1.9000"
Binary file modified tests/testthat/_snaps/block/block-app-001_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/block/block-app-001_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed tests/testthat/_snaps/block/block-app-002_.new.png
Binary file not shown.
Binary file modified tests/testthat/_snaps/block/block-app-002_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified tests/testthat/_snaps/block/block-app-003_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed tests/testthat/_snaps/block/block-app-004_.new.png
Binary file not shown.
Binary file modified tests/testthat/_snaps/block/block-app-004_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed tests/testthat/_snaps/block/block-app-005_.new.png
Binary file not shown.
Binary file modified tests/testthat/_snaps/block/block-app-005_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/result/result-app-001_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/stack/stack-app-001_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed tests/testthat/_snaps/stack/stack-app-002_.new.png
Binary file not shown.
Binary file modified tests/testthat/_snaps/stack/stack-app-002_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/stack/stack-app-003.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@

],
"choices": [
"function (data) ",
"colnames(data)"
"structure(function (data) ",
"colnames(data), result = c(\"Time\", \"demand\"))"
],
"multiple": true
}
Expand Down
Binary file not shown.
Binary file modified tests/testthat/_snaps/stack/stack-app-003_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/stack/stack-app-004.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@

],
"choices": [
"function (data) ",
"colnames(data)"
"structure(function (data) ",
"colnames(data), result = c(\"Time\", \"demand\"))"
],
"multiple": true
}
Expand Down
Binary file not shown.
Binary file modified tests/testthat/_snaps/stack/stack-app-004_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/stack/stack-app-005.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@

],
"choices": [
"function (data) ",
"colnames(data)"
"structure(function (data) ",
"colnames(data), result = c(\"Time\", \"demand\"))"
],
"multiple": true
}
Expand Down
Binary file removed tests/testthat/_snaps/stack/stack-app-005_.new.png
Binary file not shown.
Binary file modified tests/testthat/_snaps/stack/stack-app-005_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/stack/stack-app-006.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@

],
"choices": [
"function (data) ",
"colnames(data)"
"structure(function (data) ",
"colnames(data), result = c(\"Time\", \"demand\"))"
],
"multiple": true
}
Expand Down
Binary file removed tests/testthat/_snaps/stack/stack-app-006_.new.png
Binary file not shown.
Binary file modified tests/testthat/_snaps/stack/stack-app-006_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/stack/stack-app-007.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@

],
"choices": [
"function (data) ",
"colnames(data)"
"structure(function (data) ",
"colnames(data), result = c(\"Time\", \"demand\"))"
],
"multiple": true
}
Expand Down
Binary file modified tests/testthat/_snaps/stack/stack-app-007_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/workspace/restore-workspace-app-001_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/workspace/workspace-app-001_.new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testthat/_snaps/workspace/workspace-app-002_.new.png
Binary file modified tests/testthat/_snaps/workspace/workspace-app-003_.new.png
Binary file modified tests/testthat/_snaps/workspace/workspace-app-004_.new.png
1 change: 0 additions & 1 deletion tests/testthat/test-validate-block.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ testServer(module_server_test, {
# Invalidate
session$setInputs("columns" = "")
session$flushReact()
expect_error(out_dat())
expect_false(is_valid$block)
expect_identical(is_valid$message, "selected value(s) not among provided choices")
expect_identical(is_valid$fields, "columns")
Expand Down

0 comments on commit 8260e59

Please sign in to comment.