Skip to content

Commit

Permalink
Start preparing release
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Jul 23, 2024
1 parent ff48b8a commit e7331cd
Show file tree
Hide file tree
Showing 17 changed files with 480 additions and 316 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/rhub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
# You can update this file to a newer version using the rhub2 package:
#
# rhub::rhub_setup()
#
# It is unlikely that you need to modify this file manually.

name: R-hub
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"

on:
workflow_dispatch:
inputs:
config:
description: 'A comma separated list of R-hub platforms to use.'
type: string
default: 'linux,windows,macos'
name:
description: 'Run name. You can leave this empty now.'
type: string
id:
description: 'Unique ID. You can leave this empty now.'
type: string

jobs:

setup:
runs-on: ubuntu-latest
outputs:
containers: ${{ steps.rhub-setup.outputs.containers }}
platforms: ${{ steps.rhub-setup.outputs.platforms }}

steps:
# NO NEED TO CHECKOUT HERE
- uses: r-hub/actions/setup@v1
with:
config: ${{ github.event.inputs.config }}
id: rhub-setup

linux-containers:
needs: setup
if: ${{ needs.setup.outputs.containers != '[]' }}
runs-on: ubuntu-latest
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.containers) }}
container:
image: ${{ matrix.config.container }}

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/run-check@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}

other-platforms:
needs: setup
if: ${{ needs.setup.outputs.platforms != '[]' }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.platforms) }}

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/setup-r@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/run-check@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
5 changes: 4 additions & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ message: 'To cite package "cffr" in publications use:'
type: software
license: GPL-3.0-or-later
title: 'cffr: Generate Citation File Format (''cff'') Metadata for R Packages'
version: 1.0.1.9000
version: 1.1.0
doi: 10.21105/joss.03900
identifiers:
- type: doi
Expand Down Expand Up @@ -143,6 +143,9 @@ references:
email: [email protected]
orcid: https://orcid.org/0000-0002-4035-0289
year: '2024'
identifiers:
- type: url
value: https://arxiv.org/abs/1403.2805
doi: 10.32614/CRAN.package.jsonlite
version: '>= 1.7.2'
- type: software
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: cffr
Title: Generate Citation File Format ('cff') Metadata for R Packages
Version: 1.0.1.9000
Version: 1.1.0
Authors@R: c(
person("Diego", "Hernangómez", , "[email protected]", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-8457-4658")),
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cffr (development version)
# cffr 1.1.0

- Now **cffr** adds automatically dois to packages on **CRAN** (e.g.
<https://doi.org/10.32614/CRAN.package.cffr>):
Expand All @@ -10,6 +10,7 @@
the package dependency is on **CRAN**, the **CRAN** doi would be used
for the dependency in the `references` key.
- Extract `commit` from `RemoteSha`.
- Update `cran_to_spdx` dataset.

# cffr 1.0.1

Expand Down
4 changes: 2 additions & 2 deletions R/cff.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ cff <- function(path, ...) {
if (!missing(path)) {
src <- detect_x_source(path)
if (src == "cff_citation") {
lifecycle::deprecate_soft("1.0.0", "cff(path)", "cff_read_cff_citation()")
lifecycle::deprecate_warn("1.0.0", "cff(path)", "cff_read_cff_citation()")
return(cff_read_cff_citation(path))
} else {
lifecycle::deprecate_soft("1.0.0", "cff(path)",
lifecycle::deprecate_warn("1.0.0", "cff(path)",
details = "Argument ignored."
)
}
Expand Down
18 changes: 9 additions & 9 deletions R/deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
cff_extract_to_bibtex <- function(x,
what = c("preferred", "references", "all")) {
if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
"0.5.0", "cff_extract_to_bibtex()",
details = "Function renamed, use `as_bibentry()` instead."
)
Expand All @@ -37,7 +37,7 @@ cff_extract_to_bibtex <- function(x,
cff_to_bibtex <- function(x,
what = c("preferred", "references", "all")) {
if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
"1.0.0", "cff_extract_to_bibtex()",
details = "Function renamed, use `as_bibentry()` instead."
)
Expand Down Expand Up @@ -103,7 +103,7 @@ cff_to_bibtex <- function(x,
cff_from_bibtex <- function(x, encoding = "UTF-8", ...) {
if (length(x) == 1 && file_exist_abort(x)) {
if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
"1.0.0", "cff_from_bibtex()", "cff_read_bib()"
)
}
Expand All @@ -113,7 +113,7 @@ cff_from_bibtex <- function(x, encoding = "UTF-8", ...) {
}

if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
"1.0.0", "cff_from_bibtex()", "cff_read_bib_text()"
)
}
Expand Down Expand Up @@ -162,7 +162,7 @@ write_bib <- function(x,
verbose = TRUE,
ascii = FALSE) {
if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
"1.0.0", "write_bib()", "cff_write_bib()"
)
}
Expand All @@ -178,7 +178,7 @@ write_citation <- function(x,
verbose = TRUE,
...) {
if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
"1.0.0", "write_citation()", "cff_write_citation()"
)
}
Expand Down Expand Up @@ -245,7 +245,7 @@ write_citation <- function(x,
#' as_cff_person("Herbert von Karajan")
cff_parse_person <- function(person) {
if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
"1.0.0", "cff_parse_person()", "as_cff_person()"
)
}
Expand All @@ -257,7 +257,7 @@ cff_parse_person <- function(person) {
#'
cff_parse_person_bibtex <- function(person) {
if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
"1.0.0", "cff_parse_person_bibtex()", "as_cff_person()"
)
}
Expand Down Expand Up @@ -292,7 +292,7 @@ cff_parse_person_bibtex <- function(person) {
#'
cff_parse_citation <- function(bib) {
if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_soft(
lifecycle::deprecate_warn(
"1.0.0", "cff_parse_citation()", "as_cff.bibentry()"
)
}
Expand Down
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ knitr::opts_chunk$set(
[![CRAN-results](https://badges.cranchecks.info/worst/cffr.svg)](https://cran.r-project.org/web/checks/check_results_cffr.html)
[![Downloads](https://cranlogs.r-pkg.org/badges/grand-total/cffr?color=blue)](https://cran.r-project.org/package=cffr)
[![R-CMD-check](https://github.com/ropensci/cffr/actions/workflows/check-full.yaml/badge.svg)](https://github.com/ropensci/cffr/actions/workflows/check-full.yaml)
[![R-hub](https://github.com/ropensci/cffr/actions/workflows/rhub.yaml/badge.svg)](https://github.com/ropensci/cffr/actions/workflows/rhub.yaml)
[![codecov](https://codecov.io/gh/ropensci/cffr/branch/main/graph/badge.svg?token=YRO3XL8RWK)](https://app.codecov.io/gh/ropensci/cffr)
[![r-universe](https://ropensci.r-universe.dev/badges/cffr)](https://ropensci.r-universe.dev/cffr)
[![CITATION-cff](https://github.com/ropensci/cffr/actions/workflows/cff-validator.yml/badge.svg)](https://github.com/ropensci/cffr/actions/workflows/cff-validator.yml)
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[![CRAN-results](https://badges.cranchecks.info/worst/cffr.svg)](https://cran.r-project.org/web/checks/check_results_cffr.html)
[![Downloads](https://cranlogs.r-pkg.org/badges/grand-total/cffr?color=blue)](https://cran.r-project.org/package=cffr)
[![R-CMD-check](https://github.com/ropensci/cffr/actions/workflows/check-full.yaml/badge.svg)](https://github.com/ropensci/cffr/actions/workflows/check-full.yaml)
[![R-hub](https://github.com/ropensci/cffr/actions/workflows/rhub.yaml/badge.svg)](https://github.com/ropensci/cffr/actions/workflows/rhub.yaml)
[![codecov](https://codecov.io/gh/ropensci/cffr/branch/main/graph/badge.svg?token=YRO3XL8RWK)](https://app.codecov.io/gh/ropensci/cffr)
[![r-universe](https://ropensci.r-universe.dev/badges/cffr)](https://ropensci.r-universe.dev/cffr)
[![CITATION-cff](https://github.com/ropensci/cffr/actions/workflows/cff-validator.yml/badge.svg)](https://github.com/ropensci/cffr/actions/workflows/cff-validator.yml)
Expand Down Expand Up @@ -72,7 +73,7 @@ file and the `CITATION` file (if present) of your package. Note that
**cffr** works best if your package pass
`R CMD check/devtools::check()`.

As per 2024-07-19 there are at least 288 repos on GitHub using **cffr**.
As per 2024-07-23 there are at least 290 repos on GitHub using **cffr**.
[Check them out
here](https://github.com/search?q=cffr%20path%3A**%2FCITATION.cff&type=code).

Expand Down Expand Up @@ -393,6 +394,9 @@ test <- cff_create("rmarkdown")
email: [email protected]
orcid: https://orcid.org/0000-0002-4035-0289
year: '2024'
identifiers:
- type: url
value: https://arxiv.org/abs/1403.2805
doi: 10.32614/CRAN.package.jsonlite
- type: software
title: knitr
Expand Down Expand Up @@ -933,8 +937,7 @@ for more info.

## References

<div id="refs" class="references csl-bib-body hanging-indent"
entry-spacing="0">
<div id="refs" class="references csl-bib-body hanging-indent">

<div id="ref-codemeta" class="csl-entry">

Expand Down
6 changes: 3 additions & 3 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"codeRepository": "https://github.com/ropensci/cffr",
"issueTracker": "https://github.com/ropensci/cffr/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "1.0.1.9000",
"version": "1.1.0",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.4.1 (2024-06-14 ucrt)",
"runtimePlatform": "R version 4.4.1 (2024-06-14)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -200,7 +200,7 @@
},
"isPartOf": "https://ropensci.org",
"keywords": ["attribution", "citation", "credit", "citation-files", "cff", "metadata", "r", "r-package", "citation-file-format", "rstats", "ropensci", "cran"],
"fileSize": "1629.12KB",
"fileSize": "1604.564KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down
Loading

0 comments on commit e7331cd

Please sign in to comment.