traitecoevo / austraits.build

Source for AusTraits
Other
16 stars 2 forks source link

Becca 90 fix warnings #739

Closed dfalster closed 1 year ago

dfalster commented 1 year ago

Extends PR #722 from @Becca-90, addressing #620 . As noted there

There have been some changes to syntax in some dplyr functions. Specifically, use of .data in tidyselect expressions was deprecated in tidyselect 1.2.0. It is also necessary in some circumstances to use either the all_of() or any_of() function with the select() function

See:

  1. https://cran.r-project.org/web/packages/tidyselect/news/news.html
  2. https://tidyselect.r-lib.org/reference/faq-external-vector.html

There also seems to be a problem using .data in the rename() function, changing this removed about 20 more warnings.

All select syntax has now been updated in the austraits/R folder of functions, most warnings have now gone but there are still 4 referring to line 140 of test-xamples.R that all say:

data %>% select(v)

should be changed to either:

data %>% select(all_of(v))

or

data %>% select(any_of(v))

Line 140 in test-xamples.R uses the function test_build_dataset

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 87.50% and project coverage change: -0.07 :warning:

Comparison is base (f4c7bb4) 80.20% compared to head (5e39277) 80.14%.

:exclamation: Current head 5e39277 differs from pull request most recent head 37acd5a. Consider uploading reports for the commit 37acd5a to get more accurate results

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #739 +/- ## =========================================== - Coverage 80.20% 80.14% -0.07% =========================================== Files 7 7 Lines 1531 1536 +5 =========================================== + Hits 1228 1231 +3 - Misses 303 305 +2 ``` | [Impacted Files](https://app.codecov.io/gh/traitecoevo/austraits.build/pull/739?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=traitecoevo) | Coverage Δ | | |---|---|---| | [R/setup.R](https://app.codecov.io/gh/traitecoevo/austraits.build/pull/739?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=traitecoevo#diff-Ui9zZXR1cC5S) | `50.66% <0.00%> (-0.34%)` | :arrow_down: | | [R/process.R](https://app.codecov.io/gh/traitecoevo/austraits.build/pull/739?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=traitecoevo#diff-Ui9wcm9jZXNzLlI=) | `91.85% <98.00%> (+0.03%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.