Skip to content

Introduce preliminary updates for version 3 of the API#2

Closed
a-asil-companioni wants to merge 16 commits intoDisplacement-Tracking-Matrix:mainfrom
a-asil-companioni:apiV3
Closed

Introduce preliminary updates for version 3 of the API#2
a-asil-companioni wants to merge 16 commits intoDisplacement-Tracking-Matrix:mainfrom
a-asil-companioni:apiV3

Conversation

@a-asil-companioni
Copy link
Copy Markdown
Member

Includes:

  • Refactoring in line with standards more common to R.
  • Two new functions related to the introduction of subscription keys: set_subscription_key() and get_subscription_key(). One of which, get_subscription_key() is designed to work within testthat's unit tests by referring to an encrypted string (placed safely within the function definition owing to such encryption).
  • Additional GitHub actions.
  • Transfer of parts of README.rd's text to the introduction/User Guide vignette, since they repeat each other and tend to be updated.

- Note: The base / native pipe operator was introduced in the R 4.1.0 update.
- Remove calls to import the magrittr library or calls to import the pipe specifically.
- Replace existing magrittr pipe calls with the base R pipe.
- This is as opposed to using jsonlite::fromJSON(). Using httr2::resp_body_string() and then fromJSON() is not as clean as just using httr2::resp_body_json(). httr2::resp_body_json() does uses fromJSON() under the hood.

- Some comments were edited or added to reflect the changes in code, particularly regarding the use of as.data.frame() and the expectation that resp_body_json(response, simplifyVector=TRUE)$result will likely be a dataframe.
- The refactoring is such that the codebase becomes more in line with the tidyverse style guide.

Refactor codebase and remove unneeded comments

Refactor edit
Change version from 0.0.3 to 0.1.0
withr is an R library that allows changes to state to be reverted and managed cleanly.

Add withr package to DESCRIPTION file
The large deletion and emphasis on referring to the introduction just means that there's much less repetition and that the changes to the introduction vignette are reflected in what users are likely to read.
Updating CI 2

CI edit

CI update

CI work edit
Update Roxygen2-generated files
Edit _pkgdown.yml to reflect change in introduction.Rmd
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.

1 participant