Skip to content

Commit

Permalink
add CITATION.cff (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpprdan authored Sep 26, 2022
1 parent 4ae4071 commit 5bad81c
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 3 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ datamanagement.R
^revdep$
^CRAN-RELEASE$
^data-raw$
^CITATION\.cff$
49 changes: 49 additions & 0 deletions .github/workflows/update-citation-cff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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: main
paths:
- DESCRIPTION
- inst/CITATION
workflow_dispatch:

name: Update CITATION.cff

jobs:
update-citation-cff:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- 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)
# Create your CITATION.cff file
cff_write(dependencies = FALSE)
shell: Rscript {0}

- name: Commit results
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@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"
45 changes: 45 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# -----------------------------------------------------------
# CITATION file created with {cffr} R package, v0.3.0
# See also: https://docs.ropensci.org/cffr/
# -----------------------------------------------------------

cff-version: 1.2.0
message: 'To cite package "opencage" in publications use:'
type: software
license: GPL-2.0-or-later
title: 'opencage: Geocode with the OpenCage API'
version: 0.2.2.9000
abstract: Geocode with the OpenCage API, either from place name to longitude and latitude
(forward geocoding) or from longitude and latitude to the name and address of a
location (reverse geocoding), see <https://opencagedata.com>.
authors:
- family-names: Possenriede
given-names: Daniel
email: possenriede+r@gmail.com
orcid: https://orcid.org/0000-0002-6738-9845
- family-names: Sadler
given-names: Jesse
orcid: https://orcid.org/0000-0001-6081-9681
- family-names: Salmon
given-names: Maëlle
orcid: https://orcid.org/0000-0002-2815-0399
repository: https://CRAN.R-project.org/package=opencage
repository-code: https://github.com/ropensci/opencage
url: https://docs.ropensci.org/opencage/
contact:
- family-names: Possenriede
given-names: Daniel
email: possenriede+r@gmail.com
orcid: https://orcid.org/0000-0002-6738-9845
keywords:
- geocode
- geocoder
- opencage
- opencage-api
- opencage-geocoder
- peer-reviewed
- placenames
- r
- r-package
- rspatial
- rstats
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Authors@R: c(
person("Noam", "Ross", role = "ctb"),
person("Jake", "Russ", role = "ctb"),
person("Julia", "Silge", role = "rev",
comment = "Julia Silge reviewed the package for rOpenSci, see <https://github.com/ropensci/onboarding/issues/36>.")
comment = "Julia Silge reviewed {opencage} (v. 0.1.0) for rOpenSci, see <https://github.com/ropensci/onboarding/issues/36>.")
)
Description: Geocode with the OpenCage API, either from place name to
longitude and latitude (forward geocoding) or from longitude and
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* GitHub actions workflows updated ([#142](https://github.com/ropensci/opencage/issues/142)).
* Use [{lintr} version 3.0](https://www.tidyverse.org/blog/2022/07/lintr-3-0-0/) and add "package development" linters ([#144](https://github.com/ropensci/opencage/pull/144)).
* `countrycodes` source and script were moved to `data-raw` ([#146](https://github.com/ropensci/opencage/pull/146)).
* Add CITATION.cff and a corresponding GitHub action ([#148](https://github.com/ropensci/opencage/pull/148)).

# opencage 0.2.2

Expand Down
3 changes: 1 addition & 2 deletions R/deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ opencage_format <- function(lst) {
if ("request" %in% names(lst)) {
results$query <- as.character(lst$request$query)
}
}
else {
} else {
results <- NULL
}

Expand Down

0 comments on commit 5bad81c

Please sign in to comment.