Skip to content

Necessary changes to pass devtools::check()#7

Merged
rwbuie merged 7 commits intodevfrom
pass_check
Feb 24, 2025
Merged

Necessary changes to pass devtools::check()#7
rwbuie merged 7 commits intodevfrom
pass_check

Conversation

@dcolombara
Copy link
Copy Markdown
Contributor

I was going to work on addressing a few issues on this package and found that it failed devtools::check() with multiple errors, warnings, and notes.

I methodically addressed the identified issues and saved them as discrete commits.

The only commit that I believe may have impacted functionality is Fixes for chi_generate_tro_shell test failure, because there were inconsistencies across multiple files.

After making these changes, devtools::check() returns 0 errors, 0 warnings, and 0 notes.

Documentation is needed for some functions (e.g., chi_calc()) and more extensive tests are needed, but it is now it is in good enough shape that some issues can be addressed with the ability to test the package afterward.

Finally, I added a dev branch, that is simply a copy of main at this point. I think the best practice for a package that is used by others is to always have a main branch that works and a dev branch where bug fixes, improvements, new functions, etc. can be added and thoroughly tested. Hence the reason why this pull request is into dev.

 - drop VignetteBuilder: knitr b/c no vignettes to build
 - added future and future.apply to imports
 - replace remote install of rads.data with rads b/c rads is needed too
   and auto installs rads data
 - removed self reference to github::PHSKC-APDE/apde.chi.tools
 - changed role = 'auth' to role = 'aut'
 - tweaked the Description paragraph, which must be in complete sentences
 - specify namespace for substrRight, calc,chi_cols,
   compare_estimate, get_population,
 - added @importFrom for crossing & substrRight
 - replace .() with list()
 - added trend.span parameter that was missing
 - name space updated by devtools::document() due to importFrom
 - to avoid warnings about missing visible bindings for global variables
- chi_generate_trend_years does not exist for testing
 - added year.span as explicit argument to chi_generate_tro_shell()  and test
 - replaced `span` (undefined var) with `trend.span) in chi_process_trends
- Replaced `assign()` calls with local variable assignments within `chi_calc`
  function to improve encapsulation and avoid unintended
  side effects in the global environment
- Simplified code for better readability and maintainability
- Removed unnecessary cleanup of global variables (`rm()`)
- Eliminating globals within package functions is important
  for ensuring predictability, avoiding conflicts,
  and maintaining clean, self-contained functions
@dcolombara dcolombara assigned dcolombara and rwbuie and unassigned dcolombara Feb 10, 2025
@rwbuie rwbuie merged commit 535823c into dev Feb 24, 2025
@rwbuie rwbuie deleted the pass_check branch February 24, 2025 17:18
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.

2 participants