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

add whitelists #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dmi3kno
Copy link
Contributor

@dmi3kno dmi3kno commented Jun 28, 2023

I implemented whitelists in options that are loaded onLoad.
The whitelists are extensible via options("rbbt.whitelist.user"=c()).

The vector whitelists are converted to regex in internal function and then excluded from the vector of keyes using the str_subset as you suggested.

@paleolimbot
Copy link
Owner

I don't have the ability to test this anymore but am happy to merge this if it makes anybody's life easier. From a design perspective I think setting options in .onLoad() could lead to unexpected behaviour and should be avoided...probably just the ability to add a whitelist_quarto = TRUE or a separate bbt_xxx_quarto() function that adds the appropriate whitelists seems more explicit.

@dmi3kno
Copy link
Contributor Author

dmi3kno commented May 1, 2024

whitelist_quarto=TRUE shifts the burden of maintenance on you as a maintainer of the package (same with bbt_xxx_quarto() plus duplication of code). Lots of things are specified in options(), including the width of dataframe print method (using pillar) and whatnot. I think options is a pretty standard solution. I am happy to remove it from .onLoad() and rely on user-specified options in the .Rprofile. Is that what you would prefer instead?

@mbojan
Copy link

mbojan commented May 23, 2024

No, please no option-setting by .onLoad()!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants