Skip to content

Commit ac2b27f

Browse files
authored
Merge pull request #205 from FAIRDataPipeline/fix-new-r
Fix new r
2 parents ad89588 + 24d43e4 commit ac2b27f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+86
-90
lines changed

Diff for: .github/workflows/pkgdown.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
env:
1515
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818

1919
- uses: r-lib/actions/setup-r@v2
2020

@@ -32,7 +32,7 @@ jobs:
3232
shell: Rscript {0}
3333

3434
- name: Restore R package cache
35-
uses: actions/cache@v3
35+
uses: actions/cache@v4
3636
with:
3737
path: ${{ env.R_LIBS_USER }}
3838
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}

Diff for: .github/workflows/test-build.yaml

+22-26
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ on:
33
branches:
44
- '*'
55
workflow_dispatch:
6-
# pull_request:
7-
# branches:
8-
# - master
96

107
jobs:
118
R-CMD-check:
@@ -17,14 +14,14 @@ jobs:
1714
fail-fast: false
1815
matrix:
1916
config:
20-
# - {os: windows-latest, r: 'release'}
21-
# - {os: macOS-latest, r: 'release'}
17+
- {os: windows-latest, r: 'release'}
18+
- {os: macOS-latest, r: 'release'}
2219
- {os: ubuntu-latest, r: 'release'}
2320
env:
2421
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2522

2623
steps:
27-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2825
- uses: r-lib/actions/setup-pandoc@v2
2926
- uses: r-lib/actions/setup-r@v2
3027
with:
@@ -37,14 +34,11 @@ jobs:
3734
rcmdcheck
3835
remotes
3936
40-
- uses: actions/setup-python@v4
37+
- uses: actions/setup-python@v5
4138
with:
42-
python-version: '3.9'
43-
architecture: 'x64'
44-
- name: Install local registry
45-
run: curl -fsSL https://data.scrc.uk/static/localregistry.sh | /bin/bash -s -- -b main
39+
python-version: '3.12'
4640
- name: Checkout FAIRDataPipeline/FAIR-CLI
47-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4842
with:
4943
repository: FAIRDataPipeline/FAIR-CLI
5044
path: FAIR-CLI
@@ -60,25 +54,25 @@ jobs:
6054
run: |
6155
cd ../FAIR-CLI
6256
poetry install
63-
source .venv/bin/activate
64-
cd ${{ github.workspace }}
57+
source $VENV
58+
cd '${{ github.workspace }}'
59+
fair registry install --version main
6560
fair init --ci
6661
fair registry start
62+
shell: bash
63+
64+
- name: Copy token on windows
65+
run: |
66+
mkdir -p C:/Users/runneradmin/Documents/.fair/registry/
67+
cp C:/Users/runneradmin/.fair/registry/token C:/Users/runneradmin/Documents/.fair/registry/token
68+
shell: bash
69+
if: runner.os == 'Windows'
6770

6871
- name: Install R API system requirements (macOS-latest)
6972
if: runner.os == 'macOS'
7073
run : |
71-
rm '/usr/local/bin/gfortran'
7274
brew install hdf5
7375
brew install gdal
74-
- name: Install R API system requirements (ubuntu-20.04)
75-
if: matrix.config.os == 'ubuntu-20.04'
76-
run: |
77-
while read -r cmd
78-
do
79-
eval sudo $cmd
80-
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')
81-
8276
- name: Check
8377
env:
8478
_R_CHECK_CRAN_INCOMING_: false
@@ -88,12 +82,14 @@ jobs:
8882
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
8983
shell: Rscript {0}
9084
- name: Show testthat output
91-
if: always()
85+
if: ${{ !cancelled() }}
9286
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
9387
shell: bash
9488
- name: Upload check results
95-
if: failure()
96-
uses: actions/upload-artifact@main
89+
if: ${{ failure() }}
90+
uses: actions/upload-artifact@v4
9791
with:
9892
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
9993
path: check
94+
overwrite: true
95+
include-hidden-files: true

Diff for: .github/workflows/test-coverage.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
rDataPipeline::fair_init(
6060
name = "Sonia Mitchell",
6161
identifier = "https://orcid.org/0000-0003-1536-2066",
62-
endpoint = "http://localhost:8000/api/")
62+
endpoint = "http://127.0.0.1:8000/api/")
6363
shell: Rscript {0}
6464
- name: Test coverage
6565
env:

Diff for: DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: rDataPipeline
22
Title: Functions to Interact with the 'FAIR Data Pipeline'
3-
Version: 0.6.0
4-
Authors@R: c(person("Sonia", "Mitchell", email = "[email protected]",
3+
Version: 0.60.0
4+
Authors@R: c(person("Sonia", "Mitchell",
55
role = c("aut"), comment = c(ORCID = "0000-0003-1536-2066")),
66
person("Ryan", "Field", email = "[email protected]", role = c("cre", "aut"),
77
comment = c(ORCID = "0000-0002-4424-9890")))

Diff for: NEWS.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NEWS
2-
# rDataPipeline v0.6.0
2+
# rDataPipeline v0.60.0
33
## Improvements:
4-
Updates to work with latest versions of R
4+
Updates to work with latest version of data registry
55
- v0.54.1
66
- Initial release
77
- v0.54.2

Diff for: R/check_dataproduct_exists.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ check_dataproduct_exists <- function(write_dataproduct,
2121
namespace = write_namespace_id),
2222
endpoint = endpoint)
2323

24-
write_namespace_url <- file.path("http://localhost:8000", "api",
24+
write_namespace_url <- file.path("http://127.0.0.1:8000", "api",
2525
"namespace", write_namespace_id)
2626
write_namespace <- get_entity(write_namespace_url)$name
2727

Diff for: R/check_exists.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
check_exists <- function(table,
1515
query) {
1616

17-
output <- httr::GET(paste0("http://localhost:8000/api/", table, ""),
17+
output <- httr::GET(paste0("http://127.0.0.1:8000/api/", table, ""),
1818
query = query)
1919

2020
if (any(names(output) == "status_code")) {

Diff for: R/create_config.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ create_config <- function(path,
3333

3434
# Generate run_metadata block
3535
run_metadata <- list(description = description,
36-
local_data_registry_url = "http://localhost:8000/api/",
36+
local_data_registry_url = "http://127.0.0.1:8000/api/",
3737
remote_data_registry_url = "https://data.scrc.uk/api/",
3838
default_input_namespace = input_namespace,
3939
default_output_namespace = output_namespace,

Diff for: R/fair_init.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#'
1212
fair_init <- function(name,
1313
identifier,
14-
endpoint = "http://localhost:8000/api/") {
14+
endpoint = "http://127.0.0.1:8000/api/") {
1515

1616
user_url <- get_url(table = "users",
1717
query = list(username = "admin"),

Diff for: R/fair_run.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' @export
88
#'
99
fair_run <- function(path = "config.yaml",
10-
endpoint = "http://localhost:8000/api/",
10+
endpoint = "http://127.0.0.1:8000/api/",
1111
skip = FALSE) {
1212

1313
# Save names in data store

Diff for: R/get_dataproduct.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
get_dataproduct <- function(data_product,
1111
version,
1212
namespace,
13-
endpoint = "http://localhost:8000/api/") {
13+
endpoint = "http://127.0.0.1:8000/api/") {
1414
# Get provenance URL
1515
namespace_entry <- get_entry("namespace",
1616
list(name = namespace),

Diff for: R/get_entity.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ get_entity <- function(url) {
1111

1212
# Sometimes an error is returned from the local registry:
1313
# "Error in curl::curl_fetch_memory(url, handle = handle) :
14-
# Failed to connect to localhost port 8000: Connection refused"
14+
# Failed to connect to 127.0.0.1:8000 port 8000: Connection refused"
1515
# Repeating the action works eventually...
1616
continue <- TRUE
1717
while (continue) {

Diff for: R/get_entry.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#' @export
1111
#' @family get functions
1212
#'
13-
get_entry <- function(table, query, endpoint = "http://localhost:8000/api/") {
13+
get_entry <- function(table, query, endpoint = "http://127.0.0.1:8000/api/") {
1414

1515
key <- get_token()
1616
h <- c(Authorization = paste("token", key))

Diff for: R/get_existing.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
get_existing <- function(table,
2020
limit_results = TRUE,
2121
detail = "all",
22-
endpoint = "http://localhost:8000/api/") {
22+
endpoint = "http://127.0.0.1:8000/api/") {
2323

2424
if (!check_table_exists(table))
2525
usethis::ui_stop(paste(

Diff for: R/get_fields.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#' @return Returns a \code{data.frame} of fields and their attributes set to
1111
#' "none"
1212
#'
13-
get_fields <- function(table, endpoint = "http://localhost:8000/api/") {
13+
get_fields <- function(table, endpoint = "http://127.0.0.1:8000/api/") {
1414

1515
# Add token to options request header
1616
key <- get_token()

Diff for: R/get_id.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#'
1515
get_id <- function(table,
1616
query = list(),
17-
endpoint = "http://localhost:8000/api/") {
17+
endpoint = "http://127.0.0.1:8000/api/") {
1818

1919
output <- get_entry(table, query, endpoint)
2020

Diff for: R/get_tables.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#' @return a character vector of tables
77
#' @keywords internal
88
#'
9-
get_tables <- function(endpoint = "http://localhost:8000/api/") {
9+
get_tables <- function(endpoint = "http://127.0.0.1:8000/api/") {
1010

1111
httr::GET(endpoint) %>%
1212
httr::content(as = "text", encoding = "UTF-8") %>%

Diff for: R/get_url.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#'
1515
get_url <- function(table,
1616
query = list(),
17-
endpoint = "http://localhost:8000/api/") {
17+
endpoint = "http://127.0.0.1:8000/api/") {
1818

1919
output <- get_entry(table = table,
2020
query = query,

Diff for: R/new_author.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#'
1616
new_author <- function(name,
1717
identifier,
18-
endpoint = "http://localhost:8000/api/") {
18+
endpoint = "http://127.0.0.1:8000/api/") {
1919

2020
data <- list()
2121

Diff for: R/new_code_repo_release.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ new_code_repo_release <- function(name,
1919
version,
2020
object_url,
2121
website,
22-
endpoint = "http://localhost:8000/api/") {
22+
endpoint = "http://127.0.0.1:8000/api/") {
2323

2424
data <- list(name = name,
2525
version = version,

Diff for: R/new_code_run.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ new_code_run <- function(run_date,
3131
submission_script_url,
3232
inputs_urls = list(),
3333
outputs_urls = list(),
34-
endpoint = "http://localhost:8000/api/") {
34+
endpoint = "http://127.0.0.1:8000/api/") {
3535

3636
data <- list(run_date = run_date,
3737
inputs = inputs_urls,

Diff for: R/new_data_product.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ new_data_product <- function(name,
1919
version,
2020
object_url,
2121
namespace_url,
22-
endpoint = "http://localhost:8000/api/") {
22+
endpoint = "http://127.0.0.1:8000/api/") {
2323

2424
post_data(table = "data_product",
2525
data = list(name = name,

Diff for: R/new_external_object.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ new_external_object <- function(doi_or_unique_name,
3030
description,
3131
data_product_url,
3232
original_store_url,
33-
endpoint = "http://localhost:8000/api/") {
33+
endpoint = "http://127.0.0.1:8000/api/") {
3434

3535
data <- list(doi_or_unique_name = doi_or_unique_name,
3636
release_date = release_date,

Diff for: R/new_file_type.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#'
1313
new_file_type <- function(name,
1414
extension,
15-
endpoint = "http://localhost:8000/api/") {
15+
endpoint = "http://127.0.0.1:8000/api/") {
1616

1717
post_data(table = "file_type",
1818
data = list(name = name,

Diff for: R/new_issue.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
new_issue <- function(severity,
1717
description,
1818
component_issues,
19-
endpoint = "http://localhost:8000/api/") {
19+
endpoint = "http://127.0.0.1:8000/api/") {
2020

2121
post_data(table = "issue",
2222
data = list(severity = severity,

Diff for: R/new_keyword.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
new_keyword <- function(object_url,
1717
keyphrase,
1818
identifier,
19-
endpoint = "http://localhost:8000/api/") {
19+
endpoint = "http://127.0.0.1:8000/api/") {
2020

2121
data <- list(object = object_url,
2222
keyphrase = keyphrase)

Diff for: R/new_licence.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#'
1414
new_licence <- function(object_url,
1515
licence_info,
16-
endpoint = "http://localhost:8000/api/") {
16+
endpoint = "http://127.0.0.1:8000/api/") {
1717

1818
post_data(table = "licence",
1919
data = list(object = object_url,

Diff for: R/new_namespace.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
new_namespace <- function(name,
1717
full_name,
1818
website,
19-
endpoint = "http://localhost:8000/api/") {
19+
endpoint = "http://127.0.0.1:8000/api/") {
2020

2121
data <- list(name = name)
2222

Diff for: R/new_object.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ new_object <- function(description,
2020
storage_location_url,
2121
authors_url,
2222
file_type_url,
23-
endpoint = "http://localhost:8000/api/") {
23+
endpoint = "http://127.0.0.1:8000/api/") {
2424

2525
data <- list()
2626

Diff for: R/new_object_component.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ new_object_component <- function(object_url,
3030
description,
3131
whole_object = FALSE,
3232
issues_urls,
33-
endpoint = "http://localhost:8000/api/") {
33+
endpoint = "http://127.0.0.1:8000/api/") {
3434

3535
data <- list(object = object_url,
3636
name = name,

Diff for: R/new_quality_controlled.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#' @family new functions
1212
#'
1313
new_quality_controlled <- function(object_url,
14-
endpoint = "http://localhost:8000/api/") {
14+
endpoint = "http://127.0.0.1:8000/api/") {
1515

1616
post_data(table = "quality_controlled",
1717
data = list(object = object_url),

Diff for: R/new_storage_location.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ new_storage_location <- function(path,
2121
hash,
2222
public,
2323
storage_root_url,
24-
endpoint = "http://localhost:8000/api/") {
24+
endpoint = "http://127.0.0.1:8000/api/") {
2525
data <- list(path = path,
2626
hash = hash,
2727
storage_root = storage_root_url)

Diff for: R/new_storage_root.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#'
1616
new_storage_root <- function(root,
1717
local,
18-
endpoint = "http://localhost:8000/api/") {
18+
endpoint = "http://127.0.0.1:8000/api/") {
1919

2020
data <- list(root = root)
2121

0 commit comments

Comments
 (0)