From f8eb78b195368033c37ce62ad8d0f35aa4ec900f Mon Sep 17 00:00:00 2001 From: njtierney Date: Fri, 17 Jan 2025 10:48:07 +1100 Subject: [PATCH 1/3] update CITATION.cff and also add a GH action to keep the citation file up to date when DESCRIPTION or repo has a new release. --- .github/workflows/update-citation-cff.yaml | 58 +++++ CITATION.cff | 269 ++++++++++++++++++++- 2 files changed, 319 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/update-citation-cff.yaml diff --git a/.github/workflows/update-citation-cff.yaml b/.github/workflows/update-citation-cff.yaml new file mode 100644 index 0000000..4d2e1a1 --- /dev/null +++ b/.github/workflows/update-citation-cff.yaml @@ -0,0 +1,58 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# The action runs when: +# - A new release is published +# - The DESCRIPTION or inst/CITATION are modified +# - Can be run manually +# For customizing the triggers, visit https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows +on: + release: + types: [published] + push: + branches: [master, main] + paths: + - DESCRIPTION + - inst/CITATION + workflow_dispatch: + +name: Update CITATION.cff + +jobs: + update-citation-cff: + runs-on: macos-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + - uses: r-lib/actions/setup-r@v2 + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: | + any::cffr + any::V8 + + - name: Update CITATION.cff + run: | + + library(cffr) + + # Customize with your own code + # See https://docs.ropensci.org/cffr/articles/cffr.html + + # Write your own keys + mykeys <- list() + + # Create your CITATION.cff file + cff_write(keys = mykeys) + + shell: Rscript {0} + + - name: Commit results + run: | + git config --local user.name "github-actions[bot]" + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add CITATION.cff + git commit -m 'Update CITATION.cff' || echo "No changes to commit" + git push origin || echo "No changes to commit" + + + diff --git a/CITATION.cff b/CITATION.cff index 6a53b19..6b14bce 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,17 +1,18 @@ -# ----------------------------------------------------------- -# CITATION file created with {cffr} R package, v0.5.0 +# -------------------------------------------- +# CITATION file created with {cffr} R package # See also: https://docs.ropensci.org/cffr/ -# ----------------------------------------------------------- +# -------------------------------------------- cff-version: 1.2.0 message: 'To cite package "geotargets" in publications use:' type: software license: MIT -title: 'geotargets: Targets extensions for geospatial formats' -version: 0.0.0.9000 +title: 'geotargets: ''Targets'' Extensions for Geospatial Formats' +version: 0.2.0.9000 abstract: Provides extensions for various geospatial file formats, such as shapefiles - and rasters. See the vignettes for worked examples and demonstrations and explanations - of how to use the various package extensions. + and rasters. Currently provides support for the 'terra' geospatial formats. See + the vignettes for worked examples, demonstrations, and explanations of how to use + the various package extensions. authors: - family-names: Tierney given-names: Nicholas @@ -24,7 +25,7 @@ authors: given-names: Andrew orcid: https://orcid.org/0000-0002-4565-533X repository-code: https://github.com/njtierney/geotargets -url: https://njtierney.github.io/geotargets/ +url: http://geotargets.njtierney.com contact: - family-names: Tierney given-names: Nicholas @@ -43,3 +44,255 @@ keywords: - targets - vector - workflow +references: +- type: software + title: targets + abstract: 'targets: Dynamic Function-Oriented ''Make''-Like Declarative Pipelines' + notes: Imports + url: https://docs.ropensci.org/targets/ + repository: https://CRAN.R-project.org/package=targets + authors: + - family-names: Landau + given-names: William Michael + email: will.landau.oss@gmail.com + orcid: https://orcid.org/0000-0003-1878-3253 + year: '2025' + doi: 10.32614/CRAN.package.targets + version: '>= 1.8.0' +- type: software + title: rlang + abstract: 'rlang: Functions for Base Types and Core R and ''Tidyverse'' Features' + notes: Imports + url: https://rlang.r-lib.org + repository: https://CRAN.R-project.org/package=rlang + authors: + - family-names: Henry + given-names: Lionel + email: lionel@posit.co + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + year: '2025' + doi: 10.32614/CRAN.package.rlang + version: '>= 1.1.3' +- type: software + title: cli + abstract: 'cli: Helpers for Developing Command Line Interfaces' + notes: Imports + url: https://cli.r-lib.org + repository: https://CRAN.R-project.org/package=cli + authors: + - family-names: Csárdi + given-names: Gábor + email: csardi.gabor@gmail.com + year: '2025' + doi: 10.32614/CRAN.package.cli + version: '>= 3.6.2' +- type: software + title: terra + abstract: 'terra: Spatial Data Analysis' + notes: Imports + url: https://rspatial.org/ + repository: https://CRAN.R-project.org/package=terra + authors: + - family-names: Hijmans + given-names: Robert J. + email: r.hijmans@gmail.com + orcid: https://orcid.org/0000-0001-5872-2872 + year: '2025' + doi: 10.32614/CRAN.package.terra + version: '>= 1.7.71' +- type: software + title: withr + abstract: 'withr: Run Code ''With'' Temporarily Modified Global State' + notes: Imports + url: https://withr.r-lib.org + repository: https://CRAN.R-project.org/package=withr + authors: + - family-names: Hester + given-names: Jim + - family-names: Henry + given-names: Lionel + email: lionel@posit.co + - family-names: Müller + given-names: Kirill + email: krlmlr+r@mailbox.org + - family-names: Ushey + given-names: Kevin + email: kevinushey@gmail.com + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + - family-names: Chang + given-names: Winston + year: '2025' + doi: 10.32614/CRAN.package.withr + version: '>= 3.0.0' +- type: software + title: zip + abstract: 'zip: Cross-Platform ''zip'' Compression' + notes: Imports + url: https://r-lib.github.io/zip/ + repository: https://CRAN.R-project.org/package=zip + authors: + - family-names: Csárdi + given-names: Gábor + email: csardi.gabor@gmail.com + year: '2025' + doi: 10.32614/CRAN.package.zip +- type: software + title: lifecycle + abstract: 'lifecycle: Manage the Life Cycle of your Package Functions' + notes: Imports + url: https://lifecycle.r-lib.org/ + repository: https://CRAN.R-project.org/package=lifecycle + authors: + - family-names: Henry + given-names: Lionel + email: lionel@posit.co + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + orcid: https://orcid.org/0000-0003-4757-117X + year: '2025' + doi: 10.32614/CRAN.package.lifecycle +- type: software + title: crew + abstract: 'crew: A Distributed Worker Launcher Framework' + notes: Suggests + url: https://wlandau.github.io/crew/ + repository: https://CRAN.R-project.org/package=crew + authors: + - family-names: Landau + given-names: William Michael + email: will.landau.oss@gmail.com + orcid: https://orcid.org/0000-0003-1878-3253 + year: '2025' + doi: 10.32614/CRAN.package.crew + version: '>= 0.9.2' +- type: software + title: knitr + abstract: 'knitr: A General-Purpose Package for Dynamic Report Generation in R' + notes: Suggests + url: https://yihui.org/knitr/ + repository: https://CRAN.R-project.org/package=knitr + authors: + - family-names: Xie + given-names: Yihui + email: xie@yihui.name + orcid: https://orcid.org/0000-0003-0645-5666 + year: '2025' + doi: 10.32614/CRAN.package.knitr +- type: software + title: ncmeta + abstract: 'ncmeta: Straightforward ''NetCDF'' Metadata' + notes: Suggests + url: https://hypertidy.github.io/ncmeta/ + repository: https://CRAN.R-project.org/package=ncmeta + authors: + - family-names: Sumner + given-names: Michael + email: mdsumner@gmail.com + year: '2025' + doi: 10.32614/CRAN.package.ncmeta +- type: software + title: rmarkdown + abstract: 'rmarkdown: Dynamic Documents for R' + notes: Suggests + url: https://pkgs.rstudio.com/rmarkdown/ + repository: https://CRAN.R-project.org/package=rmarkdown + authors: + - family-names: Allaire + given-names: JJ + email: jj@posit.co + - family-names: Xie + given-names: Yihui + email: xie@yihui.name + orcid: https://orcid.org/0000-0003-0645-5666 + - family-names: Dervieux + given-names: Christophe + email: cderv@posit.co + orcid: https://orcid.org/0000-0003-4474-2498 + - family-names: McPherson + given-names: Jonathan + email: jonathan@posit.co + - family-names: Luraschi + given-names: Javier + - family-names: Ushey + given-names: Kevin + email: kevin@posit.co + - family-names: Atkins + given-names: Aron + email: aron@posit.co + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + - family-names: Cheng + given-names: Joe + email: joe@posit.co + - family-names: Chang + given-names: Winston + email: winston@posit.co + - family-names: Iannone + given-names: Richard + email: rich@posit.co + orcid: https://orcid.org/0000-0003-3925-190X + year: '2025' + doi: 10.32614/CRAN.package.rmarkdown +- type: software + title: sf + abstract: 'sf: Simple Features for R' + notes: Suggests + url: https://r-spatial.github.io/sf/ + repository: https://CRAN.R-project.org/package=sf + authors: + - family-names: Pebesma + given-names: Edzer + email: edzer.pebesma@uni-muenster.de + orcid: https://orcid.org/0000-0001-8049-7069 + year: '2025' + doi: 10.32614/CRAN.package.sf +- type: software + title: stars + abstract: 'stars: Spatiotemporal Arrays, Raster and Vector Data Cubes' + notes: Suggests + url: https://r-spatial.github.io/stars/ + repository: https://CRAN.R-project.org/package=stars + authors: + - family-names: Pebesma + given-names: Edzer + email: edzer.pebesma@uni-muenster.de + orcid: https://orcid.org/0000-0001-8049-7069 + year: '2025' + doi: 10.32614/CRAN.package.stars +- type: software + title: testthat + abstract: 'testthat: Unit Testing for R' + notes: Suggests + url: https://testthat.r-lib.org + repository: https://CRAN.R-project.org/package=testthat + authors: + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + year: '2025' + doi: 10.32614/CRAN.package.testthat + version: '>= 3.0.0' +- type: software + title: fs + abstract: 'fs: Cross-Platform File System Operations Based on ''libuv''' + notes: Suggests + url: https://fs.r-lib.org + repository: https://CRAN.R-project.org/package=fs + authors: + - family-names: Hester + given-names: Jim + - family-names: Wickham + given-names: Hadley + email: hadley@posit.co + - family-names: Csárdi + given-names: Gábor + email: csardi.gabor@gmail.com + year: '2025' + doi: 10.32614/CRAN.package.fs + From 510f8bcb68ed6d27c42a28dce83cc2401d353ffe Mon Sep 17 00:00:00 2001 From: njtierney Date: Fri, 17 Jan 2025 11:30:23 +1100 Subject: [PATCH 2/3] update the citation code to include year and also add inst/CITATION file --- CITATION.cff | 1 + DESCRIPTION | 1 + README.Rmd | 10 ++++++++++ README.md | 26 ++++++++++++++++++-------- inst/CITATION | 19 +++++++++++++++++++ 5 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 inst/CITATION diff --git a/CITATION.cff b/CITATION.cff index 6b14bce..5e73335 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -26,6 +26,7 @@ authors: orcid: https://orcid.org/0000-0002-4565-533X repository-code: https://github.com/njtierney/geotargets url: http://geotargets.njtierney.com +date-released: '2024-11-29' contact: - family-names: Tierney given-names: Nicholas diff --git a/DESCRIPTION b/DESCRIPTION index ff66df7..45de11c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -52,3 +52,4 @@ Config/testthat/edition: 3 URL: https://github.com/njtierney/geotargets, http://geotargets.njtierney.com BugReports: https://github.com/njtierney/geotargets/issues VignetteBuilder: knitr +date: diff --git a/README.Rmd b/README.Rmd index 5da7e42..68b2ffc 100644 --- a/README.Rmd +++ b/README.Rmd @@ -26,6 +26,16 @@ knitr::opts_chunk$set( `geotargets` extends [`targets`](https://github.com/ropensci/targets) to work with geospatial data formats, such as rasters and vectors (e.g., shapefiles). Currently we support raster and vector formats for the [`terra`](https://github.com/rspatial/terra) package +## How to cite geotargets + +One example citation of geotargets could be as follows: "R packages used in this analysis included (list R packages used), targets, and geotargets (Tierney, N., Scott, E., & Brown, A, 2024). Here is the full bibliographic reference for your references: + +> Tierney N, Scott E, Brown A + (2024). "geotargets: 'Targets' + Extensions for Geospatial + Formats." + . + ## Installation You can install the development version of geotargets like so: diff --git a/README.md b/README.md index d443187..c69d635 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,16 @@ work with geospatial data formats, such as rasters and vectors (e.g., shapefiles). Currently we support raster and vector formats for the [`terra`](https://github.com/rspatial/terra) package +## How to cite geotargets + +One example citation of geotargets could be as follows: “R packages used +in this analysis included (list R packages used), targets, and +geotargets (Tierney, N., Scott, E., & Brown, A, 2024). Here is the full +bibliographic reference for your references: + +> Tierney N, Scott E, Brown A (2024). “geotargets: ‘Targets’ Extensions +> for Geospatial Formats.” . + ## Installation You can install the development version of geotargets like so: @@ -107,8 +117,8 @@ tar_dir({ # tar_dir() runs code from a temporary directory. x }) #> ▶ dispatched target terra_rast_example -#> ● completed target terra_rast_example [0.074 seconds, 7.992 kilobytes] -#> ▶ ended pipeline [0.316 seconds] +#> ● completed target terra_rast_example [0.011 seconds, 7.992 kilobytes] +#> ▶ ended pipeline [0.085 seconds] #> class : SpatRaster #> dimensions : 90, 95, 1 (nrow, ncol, nlyr) #> resolution : 0.008333333, 0.008333333 (x, y) @@ -149,8 +159,8 @@ tar_dir({ # tar_dir() runs code from a temporary directory. x }) #> ▶ dispatched target terra_vect_example -#> ● completed target terra_vect_example [0.078 seconds, 117.646 kilobytes] -#> ▶ ended pipeline [0.259 seconds] +#> ● completed target terra_vect_example [0.018 seconds, 117.646 kilobytes] +#> ▶ ended pipeline [0.08 seconds] #> class : SpatVector #> geometry : polygons #> dimensions : 12, 6 (geometries, attributes) @@ -196,8 +206,8 @@ tar_dir({ # tar_dir() runs code from a temporary directory. x }) #> ▶ dispatched target raster_elevs -#> ● completed target raster_elevs [0.14 seconds, 36.423 kilobytes] -#> ▶ ended pipeline [0.33 seconds] +#> ● completed target raster_elevs [0.054 seconds, 36.423 kilobytes] +#> ▶ ended pipeline [0.111 seconds] #> class : SpatRasterCollection #> length : 2 #> nrow : 90, 115 @@ -228,8 +238,8 @@ tar_dir({ # tar_dir() runs code from a temporary directory. x }) #> ▶ dispatched target test_stars -#> ● completed target test_stars [0.053 seconds, 49.9 kilobytes] -#> ▶ ended pipeline [0.192 seconds] +#> ● completed target test_stars [0.021 seconds, 49.9 kilobytes] +#> ▶ ended pipeline [0.067 seconds] #> stars object with 2 dimensions and 1 attribute #> attribute(s): #> Min. 1st Qu. Median Mean 3rd Qu. Max. diff --git a/inst/CITATION b/inst/CITATION new file mode 100644 index 0000000..b4e0fa1 --- /dev/null +++ b/inst/CITATION @@ -0,0 +1,19 @@ + +bibentry(bibtype = "Misc", + key = "tierney_et_al_2024", + title = "geotargets: 'Targets' Extensions for Geospatial Formats", + author = c(person(given = "Nicholas", + family = "Tierney", + email = "nicholas.tierney@gmail.com", + comment = c(ORCID = "0000-0003-1460-8722")), + person(given = "Eric", + family = "Scott", + comment = c(ORCID = "0000-0002-7430-7879")), + person(given = "Andrew", + family = "Brown", + comment = c(ORCID = "0000-0002-4565-533X"))), + year = "2024", + url = "http://geotargets.njtierney.com", + abstract = "Provides extensions for various geospatial file formats, such as shapefiles and rasters. Currently provides support for the 'terra' geospatial formats. See the vignettes for worked examples, demonstrations, and explanations of how to use the various package extensions.", + keywords = "geospatial,pipeline,r,r-package,r-targetopia,raster,reproducibility,reproducible-research,rstats,targets,vector,workflow", + version = "0.2.0.9000") From eff8f34ad19e79d4927ad5b246cd0308666b3420 Mon Sep 17 00:00:00 2001 From: njtierney Date: Fri, 17 Jan 2025 11:36:08 +1100 Subject: [PATCH 3/3] update codemeta and update development status to "active" --- codemeta.json | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/codemeta.json b/codemeta.json index 904ac7d..b119d3e 100644 --- a/codemeta.json +++ b/codemeta.json @@ -4,7 +4,7 @@ "identifier": "geotargets", "description": "Provides extensions for various geospatial file formats, such as shapefiles and rasters. Currently provides support for the 'terra' geospatial formats. See the vignettes for worked examples, demonstrations, and explanations of how to use the various package extensions.", "name": "geotargets: 'Targets' Extensions for Geospatial Formats", - "relatedLink": "https://njtierney.github.io/geotargets/", + "relatedLink": "http://geotargets.njtierney.com", "codeRepository": "https://github.com/njtierney/geotargets", "issueTracker": "https://github.com/njtierney/geotargets/issues", "license": "https://spdx.org/licenses/MIT", @@ -237,10 +237,44 @@ }, "SystemRequirements": null }, - "fileSize": "283.856KB", + "fileSize": "282.244KB", + "citation": [ + { + "@type": "CreativeWork", + "datePublished": "2024", + "author": [ + { + "@type": "Person", + "givenName": "Nicholas", + "familyName": "Tierney", + "email": "nicholas.tierney@gmail.com", + "@id": "https://orcid.org/0000-0003-1460-8722" + }, + { + "@type": "Person", + "givenName": "Eric", + "familyName": "Scott", + "@id": "https://orcid.org/0000-0002-7430-7879" + }, + { + "@type": "Person", + "givenName": "Andrew", + "familyName": "Brown", + "@id": "https://orcid.org/0000-0002-4565-533X" + } + ], + "name": "geotargets: 'Targets' Extensions for Geospatial Formats", + "url": "http://geotargets.njtierney.com" + } + ], "releaseNotes": "https://github.com/njtierney/geotargets/blob/master/NEWS.md", "readme": "https://github.com/njtierney/geotargets/blob/master/README.md", - "contIntegration": ["https://github.com/njtierney/geotargets/actions/workflows/R-CMD-check.yaml", "https://app.codecov.io/gh/njtierney/geotargets?branch=master"], - "developmentStatus": "https://www.repostatus.org/#wip", + "contIntegration": ["https://github.com/njtierney/geotargets/actions/workflows/R-CMD-check.yaml", "https://app.codecov.io/gh/njtierney/geotargets?branch=master", "https://github.com/njtierney/geotargets/actions?query=workflow%3Apkgcheck"], + "developmentStatus": "https://www.repostatus.org/#active", + "review": { + "@type": "Review", + "url": "https://github.com/ropensci/software-review/issues/675", + "provider": "https://ropensci.org" + }, "keywords": ["geospatial", "pipeline", "r", "r-package", "r-targetopia", "raster", "reproducibility", "reproducible-research", "rstats", "targets", "vector", "workflow"] }