insightsengineering / insightsengineering/teal.picks
[Question]: Reduce warnings on terminal for delayed / explicit arguments
- Dominant language
- R
- Stars
- 4
- Forks
- 0
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 3
Description
### What is your question?
Currently there are some warnings that are being displayed when initializing picks objects with:
- Delayed choices and explicit selected
- Delayed datasets and explicit variables/values
- Or delayed variables and explicit values
I believe we should:
- Reduce warnings (either by only throwing them during actual resolution problems or just once every X hours as lifecycle does)
- Allow global envvar/option to disable warnings (for use in tests outside the package)
#### Example of 2 known cases
```r
teal.picks::variables(selected = "A")
#> Warning message:
#> In FALSE : teal.picks::variables(selected = "A")
#> - Setting explicit `selected` while `choices` are delayed (set using `tidyselect`) doesn't guarantee that `selected` is a subset of `choices`.
#>
#> choices: tidyselect::everything()
#> selected: A
#> multiple=FALSE, ordered=FALSE, fixed=FALSE, allow-clear=FALSE
teal.picks::picks(
teal.picks::datasets(),
teal.picks::variables("AGE")
)
#> Warning message:
#> In FALSE :
#> variables has eager choices (character) while datasets has dynamic choices. It is not guaranteed that explicitly defined choices will be a subset of data selected in a previous element.
#>
#> :
#> choices: tidyselect::everything()
#> selected: 1L
#> multiple=FALSE, ordered=FALSE, fixed=FALSE
#> :
#> choices: AGE
#> selected: 1L
#> multiple=FALSE, ordered=FALSE, fixed=TRUE, allow-clear=FALSE
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct.
### Contribution Guidelines
- [x] I agree to follow this project's Contribution Guidelines.
### Security Policy
- [x] I agree to follow this project's Security Policy.
Contributor guide
Assessment
This issue has not been assessed yet.