-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hi Emily,
Excellent idea. I took the package for a spin - mainly to see if it can live with the not-recommended scheme of having the measure in the second level.
That's how I found a minor bug in create_pb_agent()
, where no checks are run by {pointblank} if level
is set to 2 or more.
Reprex:
library(convo)
library(tibble)
library(pointblank)
dt <- tibble(car_id = numeric(), car_name = character(),
passenger_cnt = numeric())
cnv <- structure(list(level1 = list(car = NULL,
passenger = NULL),
level2 = list(id = list(valid = "col_is_numeric()"),
cnt = list(valid = "col_is_numeric()"),
name = NULL)), class = c("convo", "list"))
evaluate_convo(cnv, names(dt))
#> Level 1
#> -
#> Level 2
#> -
cagent <- create_pb_agent(cnv, dt, level = 2)
cagent$validation_set
#> # A tibble: 0 x 29
#> # … with 29 variables: i <int>, step_id <chr>, sha1 <chr>,
#> # assertion_type <chr>, column <list>, values <list>, na_pass <lgl>,
#> # preconditions <list>, actions <list>, label <chr>, brief <chr>,
#> # active <list>, eval_active <lgl>, eval_error <lgl>, eval_warning <lgl>,
#> # capture_stack <list>, all_passed <lgl>, n <int>, n_passed <int>,
#> # n_failed <int>, f_passed <dbl>, f_failed <dbl>, warn <lgl>, notify <lgl>,
#> # stop <lgl>, row_sample <dbl>, tbl_checked <list>, time_processed <dttm>,
#> # proc_duration_s <dbl>
# interrogate(cagent2) # shows no checks if run in an interactive session
Created on 2021-01-13 by the reprex package (v0.3.0)
Looking at the debug, I think it's caused by a bit of regex. I am aware this is experimental but in case it would be helpful I'd be happy to submit my local fix as a PR.
Metadata
Metadata
Assignees
Labels
No labels