-
Notifications
You must be signed in to change notification settings - Fork 58
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
Feature request: Hide inactive tests from validation report #563
Comments
I think I'd prefer this to be handled via post-processing in In the meantime, the missing hack in your solution is to also align x$validation_set <- filter(x$validation_set, sapply(active, isTRUE))
x$validation_set$i <- seq_len(nrow(x$validation_set))
x Note that this isn't public API (!!), though my hope is that this workaround can be made a bit more painless until we get the more principled solution from A note for the future - error is triggered here: pointblank/R/get_agent_report.R Line 451 in 59bb48e
|
Separately, to your comment:
This is because x <- iris |>
create_agent() |>
col_exists("Petal.Length",
active = ~ . %>% has_columns(Petal.Length)) |>
col_exists("Spec",
active = ~ . %>% has_columns(Spec)) |>
col_exists("Sepal.Length",
active = ~ . %>% has_columns(Sepal.Length)) |>
interrogate()
x$validation_set$active
#> [[1]]
#> ~. %>% has_columns(Petal.Length)
#>
#> [[2]]
#> ~. %>% has_columns(Spec)
#>
#> [[3]]
#> ~. %>% has_columns(Sepal.Length) So actually, while x$validation_set$eval_active
#> [1] TRUE FALSE TRUE |
Many thanks! I shall take your advice for the interim workarounds and wait for the I'm happy for you to close this issue if you would like. |
@jl5000 The ability to hide rows by filtering on On dev, the intuitive behavior from your reprex should now work! |
In my use case we have a master dataset containing all columns and rows. This data is then used for bespoke downstream analyses, often using subsets of this data. I have a function which creates a validation report for the master dataset, but I would also like to use this same function to pass through subsets of the data and only apply/show the tests that are relevant to the data. This will be viewed by stakeholders, so I'd prefer not to show them lots of greyed out rows.
I thought I would be able to do this by editing the interrogated agent, but it doesn't seem to work. (Incidentally, I was puzzled why the active column is a list column).
I have a similar situation for creating the data dictionary, it would be good if this skipped columns that didn't exist so I could re-use the same code.
Created on 2024-08-12 with reprex v2.1.1
Session info
The text was updated successfully, but these errors were encountered: