Skip to content

Commit

Permalink
Merge pull request #548 from OuhscBbmc/dev
Browse files Browse the repository at this point in the history
final touched for v1.3.0
  • Loading branch information
wibeasley authored Oct 23, 2024
2 parents c4975da + 6b22f5a commit eab8873
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 189 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Description: Encapsulates functions to streamline calls from R to the REDCap
University. The Application Programming Interface (API) offers an avenue
to access and modify data programmatically, improving the capacity for
literate and reproducible programming.
Version: 1.2.0.9000
Version: 1.3.0
Authors@R: c(person("Will", "Beasley", role = c("aut", "cre"), email =
"[email protected]", comment = c(ORCID = "0000-0002-5613-5006")),
person("David", "Bard", role = "ctb", comment = c(ORCID = "0000-0002-3922-8489")),
Expand Down
7 changes: 2 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# REDCapR (development version)

Release History
==========================================================

Expand All @@ -10,14 +8,13 @@ Quick links:
* [Current & previous GitHub Issues](https://github.com/OuhscBbmc/REDCapR/issues?q=is%3Aissue)
* [Documentation for current GitHub version](https://ouhscbbmc.github.io/REDCapR/)

Version 1.3.x (Not yet released on CRAN)
Version 1.3.0 (released 2024-10-22)
==========================================================

These features are not yet on CRAN. Install with `remotes::install_github("OuhscBbmc/REDCapR")`

### Minor Enhancements

* Redirection layer for test suite allows you to plug in your own server (#539, #542, #544)
* Skip a test when checked on CRAN servers (but not on local or GitHub Action machines)

Version 1.2.0 (released 2024-09-08)
==========================================================
Expand Down
49 changes: 9 additions & 40 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Description
===============================================

This submission is primarily to address a change in the REDCap server. A lot of packages additions in the meantime were building up.
This submission is primarily to address a failing test.
One of the test (out of hundreds) was missing `testthat::skip_on_cran()`.

Thank you for taking the time to review my submission, and please tell me if there's something else I should do for CRAN. -Will Beasley

Expand All @@ -11,53 +12,21 @@ Test environments
1. Local Ubuntu, R 4.4.1
2. Local Win11, R 4.4.1 patched
3. R-hub
1. [Ubuntu Linux, R-devel](https://github.com/OuhscBbmc/REDCapR/actions/runs/10748844649/job/29817754743)
2. [Windows Server, R-devel](https://github.com/OuhscBbmc/REDCapR/actions/runs/10748844649/job/29817754878)
3. [MacOS, R-devel](https://github.com/OuhscBbmc/REDCapR/actions/runs/10748844649/job/29817754969)
4. [win-builder](https://win-builder.r-project.org/6a44Y48qLSlw/), development version.
1. [Ubuntu Linux, R-devel](https://github.com/OuhscBbmc/REDCapR/actions/runs/11469699615/job/31917444604)
2. [Windows Server, R-devel](https://github.com/OuhscBbmc/REDCapR/actions/runs/11469699615/job/31917445020)
3. [MacOS, R-devel](https://github.com/OuhscBbmc/REDCapR/actions/runs/11469699615/job/31917445170)
4. [win-builder](https://win-builder.r-project.org/7m12AMR9sIC2//), development version.
5. [GiHub Actions R-CMD-check](https://github.com/OuhscBbmc/REDCapR/actions/workflows/check-release.yaml), Ubuntu 22.04 LTS

R CMD check results
-----------------------------------------------

* No ERRORs or WARNINGs on any builds.
* One one Ubuntu build, there was this warning.
I don't understand the source. I'm not calling any function called `tidy()` when I search. And the two hyperlinks containing "tidy" look fine to my eye.

```
❯ checking HTML version of manual ... NOTE
Skipping checking HTML validation: no command 'tidy' found
```
* One NOTE:
* <https://www.hhs.gov/answers/hipaa/what-is-phi/index.html> produced a 403 in the check, but it resolves fine in the browser.

Downstream dependencies
-----------------------------------------------

With one exception,
packages that depend/import/suggest REDCapR pass the
All packages that depend/import/suggest REDCapR pass the
[Reverse dependency check](https://github.com/OuhscBbmc/REDCapR/actions/workflows/recheck.yml)s.

I worked with **tidyREDCap** team and they accepted a PR that fixes the problem:
<https://github.com/RaymondBalise/tidyREDCap/pull/61>.
It completes successfully on my local machine.

```
------- Check results summary ------
Check status summary:
ERROR NOTE OK
Source packages 0 0 1
Reverse depends 1 2 3
Check results summary:
REDCapR ... OK
rdepends_REDCapCAST ... OK
rdepends_REDCapDM ... NOTE
* checking data for non-ASCII characters ... NOTE
rdepends_REDCapTidieR ... OK
rdepends_ReviewR ... NOTE
* checking data for non-ASCII characters ... NOTE
rdepends_codified ... OK
rdepends_tidyREDCap ... ERROR
* checking tests ... ERROR
```

Results: <https://github.com/OuhscBbmc/REDCapR/blob/main/revdep/cran.md>
15 changes: 15 additions & 0 deletions inst/test-data/projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,18 @@ Steps to recreate on a fresh server
1. 'unittestphifree': First name = "Unit Test"; Last name "Phi Free".
1. 'unittestphifree-dag1': First name = "Unit Test"; Last name "PHI Free DAG1"
1. Install plugins
1. Copy from [source](https://github.com/OuhscBbmc/REDCapR/tree/main/utility/plugins)
1. Change the `project_id` value at the bottom of each php file.
1. Move to destination directory
1. Update [plugin-redirection.yml](https://github.com/OuhscBbmc/REDCapR/blob/main/inst/misc/plugin-redirection.yml)
1. Copy all the projects to the new server
1. Assign the user (created above) to the "api" user role for each project.
1. Add a token for each project
1. Create a credential file for the new project
(examples [1](https://github.com/OuhscBbmc/REDCapR/blob/main/inst/misc/example.credentials) and
[2](https://github.com/OuhscBbmc/REDCapR/blob/main/inst/misc/dev-2.credentials))
1. Update `redcap_uri`
1. Update the corresponding `project_id`
1. Update the corresponding `token`
1. Leave `username` and `comment` untouched
1. Add new entries to [project-redirection.yml](https://github.com/OuhscBbmc/REDCapR/blob/main/inst/misc/project-redirection.yml)
7 changes: 0 additions & 7 deletions revdep/.gitignore

This file was deleted.

70 changes: 0 additions & 70 deletions revdep/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions revdep/cran.md

This file was deleted.

5 changes: 0 additions & 5 deletions revdep/email.yml

This file was deleted.

1 change: 0 additions & 1 deletion revdep/failures.md

This file was deleted.

39 changes: 0 additions & 39 deletions revdep/problems.md

This file was deleted.

2 changes: 1 addition & 1 deletion tests/testthat/test-write-batch.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test_that("default", {
})

test_that("update-one-field", {
testthat::skip_on_cran
testthat::skip_on_cran()
skip_if_onlyread()

path_expected <- "test-data/specific-redcapr/write-batch/update-one-field.R"
Expand Down
2 changes: 1 addition & 1 deletion vignettes/BasicREDCapROperations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ vignette: >
%\VignetteEncoding{UTF-8}
---

This vignette covers the the basic functions exposed by the [httr](https://github.com/r-lib/httr) and [curl](https://cran.r-project.org/package=curl) packages which allow you to interact with [REDCap](https://www.project-redcap.org/) through its API.
This vignette covers the the basic functions exposed by the [httr](https://github.com/r-lib/httr) and [curl](https://cran.r-project.org/package=curl) packages which allow you to interact with [REDCap](https://projectredcap.org/) through its API.

Reading REDCap Data
==================================================================
Expand Down
2 changes: 1 addition & 1 deletion vignettes/SecurityDatabase.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This database contains the tokens and other sensitive content (such as passwords
Create a DSN on each client
========================================

After executing the SQL code in an existing database, create an ODBC [DSN](https://en.wikipedia.org/wiki/Data_source_name) on *each* client machine that calls the database. Download the most recent drivers (as of Aug 2018, the [most recent version is 17](https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server) for Windows and Linux), then run the wizard. Many values in the wizard will remain at the default values. Here are the important ones to change.
After executing the SQL code in an existing database, create an ODBC [DSN](https://en.wikipedia.org/wiki/Data_source_name) on *each* client machine that calls the database. Download the most recent drivers (as of Aug 2018, the [most recent version is 17](https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server) for Windows and Linux), then run the wizard. Many values in the wizard will remain at the default values. Here are the important ones to change.

1. Set the DSN's `name` field to whatever is used in the repository's R code.
2. Set the authenticity method to `Integrated Windows authentication`.
Expand Down
4 changes: 2 additions & 2 deletions vignettes/TroubleshootingApiCalls.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ knitr::opts_chunk$set(
)
```

There are many links in the pipeline between your institution's [REDCap](https://www.project-redcap.org/) server and the API user. When the end result is unsuccessful, this document should help narrow the location of the possible problem. The first two sections will be relevant to almost any language interacting with the API. The remaining sections are possibly relevant only to your language (*e.g.*, Python, R, PHP, SAS, bash), or your software library such as [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.io/en/latest/) in Python).
There are many links in the pipeline between your institution's [REDCap](https://projectredcap.org/) server and the API user. When the end result is unsuccessful, this document should help narrow the location of the possible problem. The first two sections will be relevant to almost any language interacting with the API. The remaining sections are possibly relevant only to your language (*e.g.*, Python, R, PHP, SAS, bash), or your software library such as [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pypi.org/project/pycap/) in Python).

Language Agnostic
==================================================================
Expand Down Expand Up @@ -124,7 +124,7 @@ knitr::include_graphics("images/PostmanScreenshot.png")
curl -X POST -H "Cache-Control: no-cache" -F "token=9A068C425B1341D69E83064A2D273A70" -F "content=record" -F "format=csv" "https://redcap-dev-2.ouhsc.edu/redcap/api/"
```
If all these checks pass, proceed to the next section. If not, start by consulting with your REDCap administrator. If that fails, consider creating a GitHub issue for your package (*e.g.*, [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.io/en/latest/) in Python).
If all these checks pass, proceed to the next section. If not, start by consulting with your REDCap administrator. If that fails, consider creating a GitHub issue for your package (*e.g.*, [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pypi.org/project/pycap/) in Python).
Writing
------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion vignettes/advanced-redcapr-operations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ vignette: >
%\VignetteEncoding{UTF-8}
---

This vignette covers the the less-typical uses of [REDCapR](https://github.com/OuhscBbmc/REDCapR) to interact with [REDCap](https://www.project-redcap.org/) through its API.
This vignette covers the the less-typical uses of [REDCapR](https://github.com/OuhscBbmc/REDCapR) to interact with [REDCap](https://projectredcap.org/) through its API.

```{r set_options}
#| echo = FALSE,
Expand Down

0 comments on commit eab8873

Please sign in to comment.