BAAQMD / BAAQMD/tbltools

Move all packages from Depends to Imports

Open
#22 4 comments 1 reaction 0 assignees View on GitHub
check
Dominant language
R
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

When you run R CMD CHECK you get this NOTE:

> N checking package dependencies (3.4s)
Depends: includes the non-default packages:
'codec', 'strtools', 'packtools', 'vartools', 'funtools',
'difftools', 'dplyr', 'lubridate', 'readr', 'readxl', 'rpivotTable',
'data.table', 'digest', 'downloader', 'glue', 'lazyeval', 'purrr',
'stringr', 'tibble', 'tidyselect'
Adding so many packages to the search path is excessive and importing
selectively is preferable.

Depends is somewhat dangerous, because forces the package to be loaded. This means that if someone is working locally, they might have their existing function / data names overridden when they load your package. Even worse, we don't control the packages we are loading. So after a call to `update.packages()`, people might get different results when they reload the package.

Fixing this, I believe, requires us to first fix #21. The reason is that if we move something from Depends to Imports now, and our namespace does not declare a specific `importFrom` call in the NAMESPACE file, R CMD CHECK will create a fatal error and crash. So we must first ensure that we are explicitly importing all necessary functions from each package. Then we can move the packages to Imports.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with issue #21, then inspect the NAMESPACE file for explicit imports before changing the listed packages from Depends to Imports. Run R CMD CHECK afterward; done means the dependency NOTE and any fatal namespace errors are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.