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

Development of v0.2.2 #15

Merged
merged 11 commits into from
May 3, 2024
Merged

Development of v0.2.2 #15

merged 11 commits into from
May 3, 2024

Conversation

dschlaep
Copy link
Member

No description provided.

- [if_not_else_linter] In a simple if/else statement, prefer `if (A) x else y` to the less-readable `if (!A) y else x`
- [scalar_in_linter] Use == to match length-1 scalars, not %in%. Note that == preserves NA where %in% does not
- [unreachable_code_linter] Code inside a conditional loop with a deterministically false condition should be removed.
- [implicit_assignment_linter] Avoid implicit assignments in function calls. For example, instead of `if (x <- 1L) { ... }`, write `x <- 1L; if (x) { ... }`
- [paste_linter] Construct file paths with file.path(...) instead of paste(..., sep = "/"). If you are using paste(sep = "/") to construct a date, consider using format() or lubridate helpers instead. Note that paste() converts empty inputs to "", whereas file.path() leaves it empty.
…iable parameters

- new argument "bind_params" (replacing deprecated "mukeys_unique") for single or multi-variable parameter injections
- new argument "injection_format" to locate format string used to bind/inject values in parametrized queries

- updated documentation and test cases
Previously, the condition `res[[k]] > 0` was true but `inherits(res[[k]], "try-error")` failed because res[[k]] was of length k - 1 if soilDB::SDA_query() returned NULL

Now, we test if `res[[k]] >= k` before checking `inherits(res[[k]], "try-error")`
- new sqlQuote() which wraps its argument in single quote
- this replaces shQuote() which returns double quotes on Windows OS; double quotes fail when querying soils data from NRCS SDA
- extract_topography_NEDUSA() now correctly extracts values from one layer if requested
- previously, an erroneous check enforced at least two layers

- updated example code and tests that extract from one layer
@dschlaep dschlaep merged commit 17a7ed5 into main May 3, 2024
14 checks passed
@dschlaep dschlaep deleted the release/devel_v0.2.2 branch May 3, 2024 12:38
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.

1 participant