cffr 1.4.0
CRAN release: 2026-05-04
-
cff_validate(): migrated to the ajv validation engine viajsonvalidate::json_validate(). Error messages are now more informative. - In
definitions.personanddefinitions.entity, thewebsitefield uses ROR as a fallback. -
doi: DOIs ininst/CITATIONurlfields are detected, including those matching the pattern.*dx.doi.org/. -
cff_read()correctly handles a singlelanguagesvalue (#105).
cffr 1.3.0
CRAN release: 2026-03-13
- Minimum R version required now is 4.1.0.
- Migrate vignettes to Quarto.
cffr 1.2.1
CRAN release: 2026-01-12
-
cff_gha_update()action now runs inubuntu-latestby default to save GitHub Actions quota (#90, thanks to @Pakillo). - Improve comments detection and parsing in
as_cff_person()function family. - Update mapping of CRAN packages to SPDX codes.
cffr 1.2.0
CRAN release: 2025-01-25
- New argument
r_citationincff_write(). When it is set toTRUE, an R citation file (inst/CITATION) is generated or updated with the information from the generatedCITATION.cfffile. No backup copy is created, for more control usecff_write_citation()(#79). -
repository-codenow also recognizes Codeberg as a valid repository (#88). -
repository-coderecognizes repositories regardless of casing. It is still advised to use lowercase as a good practice for R developers.
cffr 1.1.0
CRAN release: 2024-07-23
-
cffr now automatically adds DOIs to packages on CRAN (e.g. https://doi.org/10.32614/CRAN.package.cffr):
- If the package has a
CITATIONfile providing a DOI, theCITATIONDOI is used as the mainCITATION.cffdoiand the CRAN DOI is added as anidentifier. - Otherwise, the CRAN DOI is used as
doi. - When extracting dependencies (e.g.
cff_create(dependencies = TRUE)) and the package dependency is on CRAN, the CRAN DOI is used for the dependency in thereferenceskey.
- If the package has a
- Extract
commitfromRemoteSha. - Update
cran_to_spdxdataset.
cffr 1.0.1
CRAN release: 2024-04-09
- Update
cff_write()to add a newencodingargument to make it work with different encodings, seeiconv(). - Fix NOTEs due to empty lines in docs.
cffr 1.0.0
CRAN release: 2024-03-12
This is a major release with some notable changes. The main change affects non-core functions, hence the natural workflow (cff_create() → cff_write() → cff_validate()) shouldn’t be affected.
Major changes
Classes and methods
Now cffr implements a new class system for definitions.reference, definitions.person and definitions.entity objects:
- A list of
definitions.referenceobjects (e.g.references) has classcff_ref_lst, cff, and individual elements (e.g.preferred-citationor each member ofreferences) have classcff_ref, cff. - A list of
definitions.personordefinitions.entityobjects (e.g.authors,contact) has classcff_pers_lst, cff, and individual elements (e.g.publisheror each member ofauthors) have classcff_pers, cff.
This change allows writing specific S3 Methods and extends the capabilities of the package.
- New
as_cff()S3 generic method (replacingas.cff()): This method coerces R objects tocffclass format. Current methods provided are:-
as_cff.Bibtex(). -
as_cff.bibentry(), replacingcff_parse_citation(). -
as_cff.person(), similar toas_cff_person()but only forpersonobjects. We recommend usingas_cff_person()since it can coerce also strings representing authors in BibTeX markup ("{von Neumen}, James"), which cannot be captured properly via methods.
-
- New
as_bibentry()method for a variety of classes (character,list,NULLand classes defined by cffr). - New
as_cff_person()method. - The following base and utils methods now support the
cffclass:-
as.data.frame.cff(). -
as.person(), although only fordefinitions.personordefinitions.entity(e.g.authors,contacts,editors,publisher,etc.). -
head.cff(),tail.cff(). -
toBibtex.cff().
-
API
The API has been completely reviewed to provide more clarity on function naming and to facilitate internal maintenance. This change only affects non-core functions. Now each function does fewer things but does them better. The old API has been deprecated and it warns when used, providing advice on the replacement function.
Deprecation
-
cff_to_bibtex()andcff_extract_to_bibtex(): replaced byas_bibentry()S3 generic. -
cff_parse_person()andcff_parse_person_bibtex(): replaced byas_cff_person()S3 generic. -
cff_parse_citation(): replaced byas_cff()S3 generic. -
cff_from_bibtex(): replaced bycff_read_bib()(for*.bibfiles) andcff_read_bib_text()(for character strings). -
write_bib()andwrite_citation(): replaced bycff_write_bib()andcff_write_citation()respectively. - Argument
pathincff()is also deprecated, usecff_read()instead.
New capabilities
- Now reading from external files is performed exclusively by
cff_read()(that is designed to fit all supported file types on a single entry point) and the new specific readers (that are used under the hood bycff_read()), namely: - New
cff_modify()function for updating and modifyingcffobjects easily.
Other changes
- Minimum R version required now is 4.0.0.
- Update of BibTeX crosswalk (see
vignette("bibtex-cff", package = "cffr")) and consequently changes in the mapping performed byas_bibtex()cff_parse_citation():- @inbook and @book gains a new value on CFF when series is provided: collection-type: book-series.
- Can handle BibLaTeX @inbook, that differs significantly from BibTeX @inbook.
cffr 0.5.0
CRAN release: 2023-05-05
Lifecycle
- Function
cff_to_bibtex()andcff_extract_to_bibtex()have been merged, the latter (cff_extract_to_bibtex()) is now soft-deprecated.
New features
- New function
write_citation()that can generate a inst/CITATION file from acffobject (#51).
Enhancements
Additional authors of a R package can be now included based on the role on the
DESCRIPTIONfile, via the argumentauthors_roles(#49).New message interface based on cli capabilities.
-
Now the (invisible) result of
cff_validate()includes the summary of errors (if any) as anattributes()named"error", asjsonvalidate::json_validate()does whenverbose = TRUE:Be verbose? If
TRUE, then an attribute"errors"will list validation failures as a data.frame Improvements in the extraction of
`date-release`.
cffr 0.4.1
CRAN release: 2023-01-30
- Replace crayon dependency for cli (#46).
- Improvements on the performance of
cff_validate().
cffr 0.4.0
CRAN release: 2022-11-17
- Fix typo (#40) by @dpprdan
- Add new function
cff_from_bibtex(). - Consistent behavior on dependency urls when RSPM is the default repo (i.e. on GitHub Actions or RStudio Cloud).
cffr 0.3.0
CRAN release: 2022-09-23
-
preferred-citationis only produced when aCITATIONR file has been provided with the package (#37). - Improve email handling on authors.
- Add
cff_read()function. This functionality was already implemented oncff()but new function added in order to provide clarity.
cffr 0.2.2
CRAN release: 2022-04-08
- cffr now uses a local copy of the schema.json for validating. (#33).
cffr 0.2.1
CRAN release: 2022-01-16
- GitHub Action now runs only on the
masterormainbranch. - Better handling of references.
cffr 0.2.0
CRAN release: 2022-01-04
- Now cffr also extracts information of the package dependencies and adds the main citation of the dependencies to the
referencesfield, usingcitation(auto = TRUE).- New
dependenciesargument oncff_create()andcff_write().
- New
- Other improvements on
cff_parse_citation():-
cff_parse_citation()extracts more information of authors, based on the fields provided on theDESCRIPTIONfile. -
cff_parse_citation()does a better job extracting information frombibentry()/BibTeX and mapping it topreferred-citation/referencesfields of CFF.
-
- Add new functions for working with git pre-commit hooks
:
- New BibTeX functions:
- Add a new dependency:
lifecycle.
cffr 0.1.1
CRAN release: 2021-11-11
- Accepted by JOSS.
- Include
pagesoncff_parse_citation(). - New
gh_keywordsargument oncff_create()/cff_write(). IfTRUE, it includes GitHub repo topics as keywords.
cffr 0.0.2
- cffr is now part of rOpenSci.
- Update on docs and README.
- Add fuzzy match on
keysargument. - New dataset:
cran_to_spdx. - Add DOI https://doi.org/10.5281/zenodo.5509766
- Citation of installed packages extracted using
citation(). - Auto-generating
preferred-citationkey fromDESCRIPTION. - Rename
cff_schema_definitions_reference()tocff_schema_definitions_refs(). -
repositorykey is supported. - Added vignette:
vignette("r-cff", package = "cffr"). - Add support to Bioconductor packages.
- New function:
cff_gha_update().
