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

Build different approach for handling options #8

Open
francisbarton opened this issue Feb 18, 2025 · 0 comments
Open

Build different approach for handling options #8

francisbarton opened this issue Feb 18, 2025 · 0 comments
Assignees

Comments

@francisbarton
Copy link
Owner

Instead of

boundr::bounds(....., opts = boundr::opts(...))

I wonder if it would be easier for users to think in terms of something like:

boundr::bounds(...) |>
  boundr::boundr_opts(...) |>
  ...

so the options would be a pipeable secondary function rather than a parameter within bounds()/lookup() etc.

This would probably be a thin wrapper around withr::with_options(), but with built-in documentation for the available options.

It could also read in environment variables by default (as fallback values, if a var is found).
This would allow a user to set an envvar for a project (eg with a project .Renviron file) or at the top of a script workflow. For example, "for this whole project I want to work with ESPG 27700 and I am fed up of having to tell boundr this every time." Or "always look for BGC-resolution boundary data".

@francisbarton francisbarton self-assigned this Feb 18, 2025
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

No branches or pull requests

1 participant