Skip to content

Commit

Permalink
Merge pull request #124 from IQSS/dev
Browse files Browse the repository at this point in the history
v0.3.13 is accepted by CRAN.
  • Loading branch information
kuriwaki authored Mar 23, 2023
2 parents efdcb33 + 9725280 commit 67f74e8
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 66 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/R-CMD-check-daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@master
- uses: r-lib/actions/setup-r-dependencies@v2
- uses: r-lib/actions/setup-pandoc@v2

- name: Query dependencies
run: |
Expand Down
23 changes: 5 additions & 18 deletions .github/workflows/R-CMD-check-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,14 @@ name: R-CMD-check-dev

jobs:
R-CMD-check-dev:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-pandoc@master

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
- uses: r-lib/actions/setup-pandoc@v2

- name: Cache R packages
if: runner.os != 'Windows'
Expand All @@ -47,13 +41,6 @@ jobs:
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}

- name: Check
run: |
options(crayon.enabled = TRUE)
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/R-CMD-check-thorough.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
- {os: windows-latest, r: 'devel'}
- {os: windows-latest, r: 'release'}
# - {os: windows-latest, r: '3.6'}
- {os: ubuntu-latest, r: 'devel'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'devel'}
- {os: ubuntu-20.04, r: 'release'}
# - {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
# - {os: ubuntu-18.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
# - {os: ubuntu-18.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
Expand All @@ -43,21 +43,16 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
id: install-r
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}

- uses: r-lib/actions/setup-pandoc@v1

- name: Install pak and query dependencies
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
shell: Rscript {0}
- uses: r-lib/actions/setup-r-dependencies@v2
- uses: r-lib/actions/setup-pandoc@v2

- name: Restore R package cache
uses: actions/cache@v2
Expand Down
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: dataverse
Version: 0.3.11
Version: 0.3.13
Title: Client for Dataverse 4+ Repositories
Authors@R:
c(person(given = "Shiro",
Expand Down Expand Up @@ -48,6 +48,7 @@ Suggests:
purrr,
rmarkdown,
testthat,
devtools,
tibble,
yaml
Description: Provides access to Dataverse APIs <https://dataverse.org/> (versions 4-5),
Expand All @@ -58,6 +59,6 @@ URL: https://iqss.github.io/dataverse-client-r/, https://dataverse.org/, https:/
BugReports: https://github.com/iqss/dataverse-client-r/issues
VignetteBuilder: knitr
Encoding: UTF-8
RoxygenNote: 7.1.2
RoxygenNote: 7.2.0
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# dataverse (development version)
# dataverse

# CHANGES in dataverse 0.3.12 and 0.3.13

* Update expired token (#123)

# CHANGES in dataverse 0.3.11

Expand Down
20 changes: 9 additions & 11 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
Description
-----------------------------------------------

This version fixes two bugs in data upload and improves documentation based on user feedback from the repository.

Thank you for taking the time to review the submission.
This version fixes an outdated token error reported on March 2023. No other changes were made.

Shiro Kuriwaki


Test environments
-----------------------------------------------

1. [win-builder](https://win-builder.r-project.org/mLWollyoFa6t), development version (`devtools::check_win_devel()`)
2. [R-hub](https://builder.r-hub.io/status/dataverse_0.3.11.tar.gz-e5f0dad4f4234733a623accfe12a4273).
1. [win-builder](https://win-builder.r-project.org/QhQR4q21BLc1), development version (`devtools::check_win_devel()`)
2. [R-hub](https://builder.r-hub.io/status/dataverse_0.3.13.tar.gz-a910246e058d4fdea677a3e29278dfbf).
3. [GitHub Actions](https://github.com/IQSS/dataverse-client-r/actions)
* os: macOS-latest , r: 'release'
* os: windows-latest , r: 'devel'
* os: windows-latest , r: 'release'
* os: ubuntu-latest , r: 'devel'
* os: ubuntu-latest , r: 'release'
4. Local macOS, R 4.1.2
* os: macOS-latest , r: 'release'
* os: windows-latest, r: 'devel'
* os: windows-latest, r: 'release'
* os: ubuntu-20.04 , r: 'devel'
* os: ubuntu-20.04 , r: 'release'
4. Local macOS, R 4.2.1


R CMD check results
Expand Down
29 changes: 13 additions & 16 deletions inst/CITATION
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
citHeader("To cite package 'dataverse' in publications use:")

year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date, perl = TRUE)
vers <- paste("R package version", meta$Version)
year <- sub(".*(2[[:digit:]]{3})-.*", "\\1", meta$Date, perl = TRUE)
vers <- paste("R package version", meta$Version)

citEntry(
entry="Manual",
title = "dataverse: R Client for Dataverse 4+ Repositories",
author = personList(
as.person(c("Shiro Kuriwaki",
"Will Beasley",
"Thomas J. Leeper"))),
year = year,
note = vers,
textVersion =
paste("Will Beasley, Shiro Kuriwaki, Thomas J. Leeper et al. (",
year,
"). dataverse: R Client for Dataverse 4+ Repositories. ",
vers, ".", sep=""))
bibentry(
bibtype = "Manual",
title = "dataverse: R Client for Dataverse 4+ Repositories",
author = c("Shiro Kuriwaki", "Will Beasley", "Thomas J. Leeper"),
year = year,
note = vers,
textVersion = paste("Shiro Kuriwaki, Will Beasley, Thomas J. Leeper et al. (",
year,
"). dataverse: R Client for Dataverse 4+ Repositories. ",
vers, ".",
sep = ""))
6 changes: 3 additions & 3 deletions inst/constants.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
server: "demo.dataverse.org"
api_token: "93d896da-0dd2-40f6-913e-8e8385f37b88" # readonly
api_token_expiration: "2023-01-01"
api_token_username: "dataverse-client-r-readonly"
api_token: "c0d39fb3-ac48-4db7-9781-390073440495"
api_token_expiration: "2024-03-22"
api_token_name: "shirokuriwaki"
3 changes: 2 additions & 1 deletion tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
library("testthat")
library("devtools")
library("dataverse")

if (!requireNamespace("yaml", quietly = TRUE)) {
Expand All @@ -19,7 +20,7 @@ if (!requireNamespace("yaml", quietly = TRUE)) {
# To better identify the source of problems, check if the token is expired.
# This check *should* be unnecessary on CRAN, since not CRAN tests should
# try to access any server.
if (Sys.getenv("NOT_CRAN") %in% c("", "true")) {
if (identical(Sys.getenv("NOT_CRAN"), "true")) {
if (as.Date(config$api_token_expiration) < Sys.Date()) {
stop(
"The API token expired on `",
Expand Down
1 change: 0 additions & 1 deletion tests/testthat/tests-dataverse_contents.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ test_that("dataverse for 'dataverse-client-r'", {
publisher = "Demo Dataverse",
publicationDate = "2020-12-29",
storageIdentifier = "file://10.70122/FK2/HXJVJU",
metadataLanguage = "undefined",
type = "dataset"
),
class = "dataverse_dataset"
Expand Down

0 comments on commit 67f74e8

Please sign in to comment.