From 5ac356ce4acaf3a5692faecf3a911ba7c9db4291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20Stirling?= <49147718+stitam@users.noreply.github.com> Date: Thu, 26 Jan 2023 10:16:46 +0100 Subject: [PATCH] Final edits before releasing v0.5.3 --- .github/workflows/R-check.yml | 72 +++++++++++--------------------- DESCRIPTION | 7 ++-- NEWS.md | 27 ++++++++---- README.Rmd | 15 ++++--- README.md | 77 ++++++++++++++++------------------- codemeta.json | 71 ++++++++++++++------------------ cran-comments.md | 10 ++++- hoardr.Rproj | 17 ++++++++ 8 files changed, 150 insertions(+), 146 deletions(-) create mode 100644 hoardr.Rproj diff --git a/.github/workflows/R-check.yml b/.github/workflows/R-check.yml index ec25d03..0e9ba57 100644 --- a/.github/workflows/R-check.yml +++ b/.github/workflows/R-check.yml @@ -1,4 +1,11 @@ -on: [push, pull_request] +# Workflow derived from +# https://github.com/r-lib/actions/blob/v2-branch/examples/check-standard.yaml + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] name: R-check @@ -12,63 +19,32 @@ jobs: fail-fast: false matrix: config: + - {os: macos-latest, r: 'release'} - {os: windows-latest, r: 'release'} - - {os: macOS-latest, r: 'release'} - - {os: ubuntu-22.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"} - - {os: ubuntu-22.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - RSPM: ${{ matrix.config.rspm }} + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes steps: - uses: actions/checkout@v3 - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - uses: r-lib/actions/setup-pandoc@v2 - - 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} - - - name: Cache R packages - if: runner.os != 'Windows' - uses: actions/cache@v3 + - uses: r-lib/actions/setup-r@v2 with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- - - - name: Install system dependencies - if: runner.os == 'Linux' - run: | - while read -r cmd - do - eval sudo $cmd - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04"))') - - - name: Install dependencies - run: | - remotes::install_deps(dependencies = TRUE) - remotes::install_cran("rcmdcheck") - shell: Rscript {0} - - - name: Check - run: Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')" + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true - - name: Upload check results - if: failure() - uses: actions/upload-artifact@v3 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check + extra-packages: any::rcmdcheck + needs: check - - name: Test coverage - if: matrix.config.os == 'macOS-latest' && matrix.config.r == 'latest' - run: | - Rscript -e 'install.packages("covr")' -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")' + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true diff --git a/DESCRIPTION b/DESCRIPTION index 90ce6d4..759c3ce 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,14 +6,13 @@ Description: Suite of tools for managing cached files, targeting Provides utilities to manage cache directories, including targeting files by path or by key; cached directories can be compressed and uncompressed easily to save disk space. -Version: 0.5.2.94 +Version: 0.5.3 Authors@R: c(person("Scott", "Chamberlain", role = "aut", comment = c(ORCID="0000-0003-2542-2202")), person("Tamás", "Stirling", role = c("ctb", "cre"), email = "stirling.tamas@gmail.com")) License: MIT + file LICENSE -URL: https://github.com/ropensci/hoardr (devel) - https://docs.ropensci.org/hoardr (docs) +URL: https://docs.ropensci.org/hoardr/, https://github.com/ropensci/hoardr BugReports: https://github.com/ropensci/hoardr/issues VignetteBuilder: knitr Roxygen: list(markdown = TRUE) @@ -26,7 +25,7 @@ Suggests: testthat, knitr, rmarkdown -RoxygenNote: 7.0.2 +RoxygenNote: 7.2.3 X-schema.org-applicationCategory: Data X-schema.org-keywords: caching, data, files, xml, pdf X-schema.org-isPartOf: https://ropensci.org diff --git a/NEWS.md b/NEWS.md index 435c7fd..a2e493d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,9 +1,19 @@ +hoardr 0.5.3 +============ + +* New maintainer (#17). + + hoardr 0.5.2 ============ ### BUG FIXES -* Important fix: `HoardClient`, called by `hoardr()` function, was storing the cache path in an environment inside the R6 class. If multiple instances of `HoardClient` exist in the same R session, the cache path for any one then affects all others. Fixed by storing as a private variable int he R6 class instead of in an environment (#14) +* Important fix: `HoardClient`, called by `hoardr()` function, was storing the +cache path in an environment inside the R6 class. If multiple instances of +`HoardClient` exist in the same R session, the cache path for any one then +affects all others. Fixed by storing as a private variable int he R6 class +instead of in an environment (#14). hoardr 0.5.0 @@ -11,8 +21,11 @@ hoardr 0.5.0 ### NEW FEATURES -* Gains new method on the `HoardClient` object to check if one or more files exist, returning a data.frame (#10) -* `cache_path_set()` method on `HoardClient` gains new parameter `full_path` to make the base cache path directly with a full path rather than using the three other parameters (`path`, `type`, and `prefix`) (#12) +* Gains new method on the `HoardClient` object to check if one or more files +exist, returning a data.frame (#10). +* `cache_path_set()` method on `HoardClient` gains new parameter `full_path` to +make the base cache path directly with a full path rather than using the three +other parameters (`path`, `type`, and `prefix`) (#12). hoardr 0.2.0 @@ -20,16 +33,16 @@ hoardr 0.2.0 ### CHANGES -* Compliance with CRAN policies about writing to users disk (#6) +* Compliance with CRAN policies about writing to users disk (#6). ### MINOR IMPROVEMENTS -* Improved documentation (#7) +* Improved documentation (#7). ### BUG FIXES -* Change `key()` and `keys()` to use `file=TRUE` (#8) -* Fix R6 import warning (#5) +* Change `key()` and `keys()` to use `file=TRUE` (#8). +* Fix R6 import warning (#5). hoardr 0.1.0 diff --git a/README.Rmd b/README.Rmd index 33cd4d6..287e431 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,5 +1,9 @@ -hoardr -====== +--- +output: github_document +editor_options: + chunk_output_type: console +--- + ```{r echo=FALSE} knitr::opts_chunk$set( @@ -9,12 +13,13 @@ knitr::opts_chunk$set( comment = "#>" ) ``` +# hoardr -[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) -[![cran checks](https://cranchecks.info/badges/worst/hoardr)](https://cranchecks.info/pkgs/hoardr) +[![status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) +[![cran checks](https://badges.cranchecks.info/worst/hoardr.svg)](https://badges.cranchecks.info/worst/hoardr.svg) [![R-check](https://github.com/ropensci/hoardr/workflows/R-check/badge.svg)](https://github.com/ropensci/hoardr/actions?query=workflow%3AR-check) [![codecov.io](https://codecov.io/github/ropensci/hoardr/coverage.svg?branch=master)](https://codecov.io/github/ropensci/hoardr?branch=master) -[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/hoardr)](https://github.com/metacran/cranlogs.app) +[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/hoardr)](https://cran.r-project.org/package=hoardr) [![cran version](https://www.r-pkg.org/badges/version/hoardr)](https://cran.r-project.org/package=hoardr) diff --git a/README.md b/README.md index 75a7754..8686847 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,41 @@ -hoardr -====== + +# hoardr -[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) -[![cran checks](https://cranchecks.info/badges/worst/hoardr)](https://cranchecks.info/pkgs/hoardr) +[![status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) +[![cran +checks](https://badges.cranchecks.info/worst/hoardr.svg)](https://badges.cranchecks.info/worst/hoardr.svg) [![R-check](https://github.com/ropensci/hoardr/workflows/R-check/badge.svg)](https://github.com/ropensci/hoardr/actions?query=workflow%3AR-check) [![codecov.io](https://codecov.io/github/ropensci/hoardr/coverage.svg?branch=master)](https://codecov.io/github/ropensci/hoardr?branch=master) -[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/hoardr)](https://github.com/metacran/cranlogs.app) -[![cran version](https://www.r-pkg.org/badges/version/hoardr)](https://cran.r-project.org/package=hoardr) - +[![rstudio mirror +downloads](https://cranlogs.r-pkg.org/badges/hoardr)](https://cran.r-project.org/package=hoardr) +[![cran +version](https://www.r-pkg.org/badges/version/hoardr)](https://cran.r-project.org/package=hoardr) `hoard` - manage cached files -Exposes a single `R6` object so that when the package is imported in another -package for managing cached files, you don't need to pollute the NAMESPACE -with a bunch of functions. (you can always just `hoardr::fxn`, but -with a single object there are other benefits as well [maintaining state, e.g.]). +Exposes a single `R6` object so that when the package is imported in +another package for managing cached files, you don’t need to pollute the +NAMESPACE with a bunch of functions. (you can always just `hoardr::fxn`, +but with a single object there are other benefits as well \[maintaining +state, e.g.\]). ## install stable - -```r +``` r install.packages("hoardr") ``` dev version - -```r +``` r remotes::install_github("ropensci/hoardr") ``` - -```r +``` r library(hoardr) ``` @@ -43,8 +43,7 @@ library(hoardr) initialize client - -```r +``` r (x <- hoardr::hoard()) #> #> path: @@ -53,41 +52,36 @@ initialize client set cache path - -```r +``` r x$cache_path_set("foobar", type = 'tempdir') -#> [1] "/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpWAAkp3/R/foobar" +#> [1] "/tmp/RtmpQCahl1/R/foobar" ``` -make the directory if doesn't exist +make the directory if doesn’t exist - -```r +``` r x$mkdir() ``` put a file in the cache - -```r +``` r cat("hello world", file = file.path(x$cache_path_get(), "foo.txt")) ``` list the files - -```r +``` r x$list() -#> [1] "/var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpWAAkp3/R/foobar/foo.txt" +#> [1] "/tmp/RtmpQCahl1/R/foobar/foo.txt" ``` details - -```r +``` r x$details() #> -#> directory: /var/folders/fc/n7g_vrvn0sx_st0p8lxb3ts40000gn/T//RtmpWAAkp3/R/foobar +#> directory: /tmp/RtmpQCahl1/R/foobar #> #> file: /foo.txt #> size: 0 mb @@ -95,8 +89,7 @@ x$details() delete by file name - -```r +``` r x$delete("foo.txt") x$list() #> character(0) @@ -108,11 +101,13 @@ see [issue 1](https://github.com/ropensci/hoardr/issues/1) ## Meta -* Please [report any issues or bugs](https://github.com/ropensci/hoardr/issues). -* License: MIT -* Get citation information for `hoardr` in R doing `citation(package = 'hoardr')` -* Please note that this project is released with a [Contributor Code of Conduct][coc]. By participating in this project you agree to abide by its terms. +- Please [report any issues or + bugs](https://github.com/ropensci/hoardr/issues). +- License: MIT +- Get citation information for `hoardr` in R doing + `citation(package = 'hoardr')` +- Please note that this project is released with a [Contributor Code of + Conduct](https://github.com/ropensci/hoardr/blob/master/CODE_OF_CONDUCT.md). + By participating in this project you agree to abide by its terms. [![rofooter](https://ropensci.org/public_images/github_footer.png)](https://ropensci.org) - -[coc]: https://github.com/ropensci/hoardr/blob/master/CODE_OF_CONDUCT.md diff --git a/codemeta.json b/codemeta.json index 7f9c453..877a0dd 100644 --- a/codemeta.json +++ b/codemeta.json @@ -1,27 +1,24 @@ { - "@context": [ - "http://purl.org/codemeta/2.0", - "http://schema.org" - ], + "@context": "https://doi.org/10.5063/schema/codemeta-2.0", "@type": "SoftwareSourceCode", "identifier": "hoardr", - "description": "Suite of tools for managing cached files, targeting\n use in other R packages. Uses 'rappdirs' for cross-platform paths.\n Provides utilities to manage cache directories, including targeting\n files by path or by key; cached directories can be compressed and\n uncompressed easily to save disk space.", + "description": "Suite of tools for managing cached files, targeting use in other R packages. Uses 'rappdirs' for cross-platform paths. Provides utilities to manage cache directories, including targeting files by path or by key; cached directories can be compressed and uncompressed easily to save disk space.", "name": "hoardr: Manage Cached Files", + "relatedLink": "https://docs.ropensci.org/hoardr/", "codeRepository": "https://github.com/ropensci/hoardr", "issueTracker": "https://github.com/ropensci/hoardr/issues", "license": "https://spdx.org/licenses/MIT", - "version": "0.5.2", + "version": "0.5.3", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", - "version": "3.5.1", "url": "https://r-project.org" }, - "runtimePlatform": "R version 3.5.1 Patched (2018-11-18 r75627)", + "runtimePlatform": "R version 4.2.2 (2022-10-31)", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", - "name": "Central R Archive Network (CRAN)", + "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, "author": [ @@ -29,31 +26,26 @@ "@type": "Person", "givenName": "Scott", "familyName": "Chamberlain", - "email": "myrmecocystus@gmail.com" + "@id": "https://orcid.org/0000-0003-2542-2202" + } + ], + "contributor": [ + { + "@type": "Person", + "givenName": "Tamás", + "familyName": "Stirling", + "email": "stirling.tamas@gmail.com" } ], "maintainer": [ { "@type": "Person", - "givenName": "Scott", - "familyName": "Chamberlain", - "email": "myrmecocystus@gmail.com" + "givenName": "Tamás", + "familyName": "Stirling", + "email": "stirling.tamas@gmail.com" } ], "softwareSuggestions": [ - { - "@type": "SoftwareApplication", - "identifier": "roxygen2", - "name": "roxygen2", - "version": ">= 6.0.1", - "provider": { - "@id": "https://cran.r-project.org", - "@type": "Organization", - "name": "Comprehensive R Archive Network (CRAN)", - "url": "https://cran.r-project.org" - }, - "sameAs": "https://CRAN.R-project.org/package=roxygen2" - }, { "@type": "SoftwareApplication", "identifier": "testthat", @@ -91,12 +83,11 @@ "sameAs": "https://CRAN.R-project.org/package=rmarkdown" } ], - "softwareRequirements": [ - { + "softwareRequirements": { + "1": { "@type": "SoftwareApplication", "identifier": "R6", "name": "R6", - "version": ">= 2.2.0", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", @@ -105,11 +96,10 @@ }, "sameAs": "https://CRAN.R-project.org/package=R6" }, - { + "2": { "@type": "SoftwareApplication", "identifier": "rappdirs", "name": "rappdirs", - "version": ">= 0.3.1", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", @@ -118,7 +108,7 @@ }, "sameAs": "https://CRAN.R-project.org/package=rappdirs" }, - { + "3": { "@type": "SoftwareApplication", "identifier": "digest", "name": "digest", @@ -129,14 +119,15 @@ "url": "https://cran.r-project.org" }, "sameAs": "https://CRAN.R-project.org/package=digest" - } - ], - "contIntegration": "https://travis-ci.org/ropensci/hoardr", - "developmentStatus": "active", + }, + "SystemRequirements": null + }, + "applicationCategory": "Data", + "isPartOf": "https://ropensci.org", + "keywords": ["caching", "data", "files", "xml", "pdf", "r", "rstats", "r-package"], + "fileSize": "31.604KB", "releaseNotes": "https://github.com/ropensci/hoardr/blob/master/NEWS.md", "readme": "https://github.com/ropensci/hoardr/blob/master/README.md", - "fileSize": "8.991KB", - "keywords": ["caching", "data", "files", "xml", "pdf", "r", "rstats", "r-package"], - "applicationCategory": "Data", - "isPartOf": "https://ropensci.org" + "contIntegration": ["https://github.com/ropensci/hoardr/actions?query=workflow%3AR-check", "https://codecov.io/github/ropensci/hoardr?branch=master"], + "developmentStatus": "https://www.repostatus.org/#active" } diff --git a/cran-comments.md b/cran-comments.md index 3e1134d..d048e4f 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,3 +1,10 @@ +# hoardr 0.5.3 + +This patch release was submitted to CRAN because the maintainer of the project +has changed. + +# hoardr 0.5.2 + ## Test environments * local OS X install, R 3.5.1 patched @@ -16,7 +23,8 @@ No problems were found related to this package. --- -This submission includes a fix so that many objects in the same R session don't share variables anymore. +This submission includes a fix so that many objects in the same R session don't +share variables anymore. Thanks! Scott Chamberlain diff --git a/hoardr.Rproj b/hoardr.Rproj new file mode 100644 index 0000000..21a4da0 --- /dev/null +++ b/hoardr.Rproj @@ -0,0 +1,17 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source