ctsit / redcapcustodian

Simplified, automated data management on REDCap systems
Other
12 stars 6 forks source link

Properly scope function calls and data references in sync_metadata #51

Closed ChemiKyle closed 2 years ago

ChemiKyle commented 2 years ago

Close #49

pbchase commented 2 years ago

Have you run the Build Check in Rstudio? there are 2 or 3 more problems beyond the fix I just added. It says

> checking Rd cross-references ... WARNING
  Missing link or links in documentation object 'sync_metadata.Rd':
    ‘REDCapR::retrieve_credentials_local’

  See section 'Cross-references' in the 'Writing R Extensions' manual.

> checking Rd \usage sections ... WARNING
  Documented arguments not in \usage in documentation object 'set_super_api_token':
    ‘credential_df’ ‘local_conn’

  Functions with \usage entries need to have the appropriate \alias
  entries, and all their arguments documented.
  The \usage entries must correspond to syntactically valid R code.
  See chapter ‘Writing R documentation files’ in the ‘Writing R
  Extensions’ manual.

The check also adds the file man/set_super_api_token.Rd. as an untracked file.

This feels like hurried work.

ChemiKyle commented 2 years ago

Both of these are certainly issues but outside the intent of this PR - the branch name is too broad - which is just to rectify scoping omissions in sync_metadata.

Those docstrings need a rework entirely since we just need the format of REDCapR's credential lists. That's a very early version.
set_super_api_token is actually a duplicate! The proper function lives below it. I'll remove the vestigial function definition that doesn't actually do anything.

pbchase commented 2 years ago

Sorry, I wanted all the errors to go away. I was greedy.

Merged.