rstudio / plumber

Turn your R code into a web API.
https://www.rplumber.io
Other
1.39k stars 255 forks source link

Fall back to sys env var if R option doesn't exist #934

Closed meztez closed 10 months ago

meztez commented 10 months ago

…umber`.

PR task list:

Setting an option that requires a function using an environment variable with most likely fail. Environment variable are characters.

meztez commented 10 months ago

I'm investigating using package options as @gadenbuie suggested. I'll do a second PR, we can work from there to choose which one makes the most sense.

schloerke commented 10 months ago

I'll do a second PR, we can work from there to choose which one makes the most sense.

Yes, it looks promising! https://dgkf.github.io/options/articles/options.html

We could probably soft deprecate options_plumber() (as it was mainly a place for documentation for all options) or just have options_plumber() use options::opt/options::opts internally. We could then mark options_plumber as @keywords internal (and drop from other docs) to favor the {options} package usage.