Skip to content

Commit

Permalink
Review tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Nov 28, 2024
1 parent 8ce3aba commit bd529b7
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 38 deletions.
3 changes: 0 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,6 @@ 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
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ file and the `CITATION` file (if present) of your package. Note that
**cffr** works best if your package pass
`R CMD check/devtools::check()`.

See [some projects already using
**cffr**](https://github.com/search?q=cffr%20path%3A**%2FCITATION.cff&type=code).
As per 2024-11-28 there are at least 420 repos on GitHub using **cffr**.
[Check them out
here](https://github.com/search?q=cffr%20path%3A**%2FCITATION.cff&type=code).

### Installation

Expand Down Expand Up @@ -393,9 +394,6 @@ 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
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.4.2 (2024-10-31)",
"runtimePlatform": "R version 4.4.2 (2024-10-31 ucrt)",
"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": "1604.25KB",
"fileSize": "1624.972KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down
Binary file modified data/cran_to_spdx.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion inst/schemaorg.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"runtimePlatform": "R version 4.4.2 (2024-10-31)",
"runtimePlatform": "R version 4.4.2 (2024-10-31 ucrt)",
"version": "1.1.1"
}
4 changes: 2 additions & 2 deletions man/cff_class.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 0 additions & 21 deletions tests/testthat/_snaps/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -1104,24 +1104,3 @@
url = {https://ggplot2.tidyverse.org},
}

---

Code
toBibtex(sev_auth)
Output
{The Big Bopper} and Sinatra, Frank and Martin, Dean and Davis, Jr., Sammy

---

Code
toBibtex(single)
Output
person, A

---

Code
toBibtex(single)
Output
{A and B co}

13 changes: 9 additions & 4 deletions tests/testthat/test-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -296,18 +296,23 @@ test_that("toBibtex", {

expect_length(sev_auth, 4)
expect_s3_class(sev_auth, "cff_pers_lst")
expect_snapshot(toBibtex(sev_auth))

expect_equal(
toBibtex(sev_auth),
paste(
"{The Big Bopper} and Sinatra, Frank and",
"Martin, Dean and Davis, Jr., Sammy"
)
)

# Single person
single <- as_cff_person(person("A", "person", email = "[email protected]"))[[1]]
expect_s3_class(single, "cff_pers")
expect_snapshot(toBibtex(single))
expect_equal(toBibtex(single), "person, A")

# Single entity
single <- as_cff_person(person("{A and B co}", email = "[email protected]"))[[1]]
expect_s3_class(single, "cff_pers")
expect_snapshot(toBibtex(single))
expect_equal(toBibtex(single), "{A and B co}")
})


Expand Down

0 comments on commit bd529b7

Please sign in to comment.