Skip to content

redirection layer for test projects #539

Closed
@wibeasley

Description

  • Add a layer of redirection so the test code calls the type of project (eg, "simple read-write") instead of the project_id of a specific server.
  • This will allow swapping of credential files that swap servers.

starter code for loading yaml:

system.file("misc/project-redirection.yml", package = "REDCapR") |> 
  yaml::yaml.load_file(
    handlers = list(map = \(x) tibble::as_tibble(x))
  ) |> 
  dplyr::bind_rows() |>
  tidyr::unnest(projects) |> 
  tidyr::pivot_longer(
    cols = -c("instance", "credential_file"),
    names_to = "tag",
    values_to = "project_id"
  ) |> 
  tidyr::drop_na(project_id)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions