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

Attempt to fix Result block don't get updated properly #432 #435

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
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())
Copy link
Collaborator Author

@DivadNojnarg DivadNojnarg Oct 14, 2024

Choose a reason for hiding this comment

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

sorry this thing was a dumb idea from me ...

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.
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
Loading