-
Notifications
You must be signed in to change notification settings - Fork 81
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
Make upload.fun configurable via option #214
Comments
This example shows how to override Lines 176 to 188 in de45a37
With that in mind, what are you thinking? |
If specifying |
That example definitely helps, and I personally think calling |
I'm highjacking your issue @wlandau. Note to self: wrap upload.fun and put the logic about doing different things for different venues inside it. Then make that something that is configurable via option. Default behaviour for general population stays the same but people like @wlandau can re-configure and we could share a recipe that helps people in China and can't use imgur.com (see the ending of the #220 saga). |
Thanks, @jennybc! |
Also related to #259 re: making the options better documented. |
I should announce here that, now that the big transition to a proper Rmd document format + |
Adding some context about how knitr can be configured using R options for some of its package level options. Currently overriding knitr::opts_knit$set(upload.fun = identity) Package level option can be set not just by hooks, but also using R options. So setting options(knitr.package.upload.fun = ) is way to set configuration global for knitr. Thought, I believe in reprex context, this may not work, as reprex will overwrite the config by setting opts_knit$set(upload.fun = ) . Lines 73 to 78 in 651f5ef
Checking this R option would be a way for reprex to not overwrite and respect it when this is set in session. So a way to configure the behavior without it being reprex specific. The option is not set by default in knitr, this is just a way to globally configure knitr options (e.g. in .Rprofile) |
I would like to comment on this from the perspective of an R developer working for a large company (100k+ employees). It would partially help to have a configurable option. But we probably have a dozen of R/Rstudio deployments and making sure that this option is set everywhere is a challenging task on its own. I think there is an implicit expectation by users that most functions will not upload any data from memory to a public server without any confirmation prompt. There are, of course, exceptions; like a function which could be called upload.something(). Generally speaking:
So we would be very much in favor of introducing some kind of warning/prompt before data is irreversibly leaked to the outside. One of the potential counterarguments is that sensitive data can be only accessed in validated environments where reprex should be forbidden. In reality, however, that is not true. There are many contexts in which users work with private data which is not intended to be shared with the world (academic researchers, data scientists working with financial data, private individuals doing home budgeting and so on). |
P.S. The reprex function is described as "Run a bit of R code using rmarkdown::render() and write the rendered result to user's clipboard", it's very unclear from this description that anything will be uploaded to a public server without a straightforward mechanism to delete this after. |
As much as I love automatic image embedding in
reprex
, it does present a challenge for those of us collaborating on confidential projects in a locked-down industry setting. My own company's proxies do not block the uploads, and the URLs are public. We would still like to share rendered reprexes in our internal private repos.The text was updated successfully, but these errors were encountered: