- Adapt extraction of orcid to R > 4.4.1.
- Now cffr adds automatically dois to packages on CRAN (e.g.
https://doi.org/10.32614/CRAN.package.cffr):
- If the package has a
CITATION
file providing a doi, theCITATION
doi would be used as the mainCITATION.cff
doi
and the CRAN doi would be added as anidentifier
. - Otherwise, CRAN doi would be used as
doi
. - When extracting dependencies (e.g
cff_create(dependencies = TRUE)
and the package dependency is on CRAN, the CRAN doi would be used for the dependency in thereferences
key.
- If the package has a
- Extract
commit
fromRemoteSha
. - Update
cran_to_spdx
dataset.
- Update
cff_write()
to add a newencoding
argument to make it work with different encodings, seeiconv()
. - Fix NOTEs due to empty lines in docs.
This is a major release with some notable changes. The change mainly affects
to non-core functions, hence the natural workflow (cff_create()
→
cff_write()
→ cff_validate()
) shouldn't be affected.
Now cffr implements a new class system for
definitions.reference
,
definitions.person
and
definitions.entity
objects:
- List of
definitions.reference
(e.g,references)
has classcff_ref_lst, cff
and individual elements (e.gpreferred-citation
or each member ofreferences
) has classcff_ref, cff
. - List of
definitions.person
ordefinitions.entity
(e.g.authors
,contact
) has classcff_pers_lst, cff
and individual elements (e.gpublisher
or each member ofauthors
) has classcff_pers, cff
.
This change allow to write specific S3 Methods and extend the capabilities of the package.
- New
as_cff()
S3 generic method (replacingas.cff()
): This method coerces R objects tocff
class format. Current methods provided are:as_cff.Bibtex()
.as_cff.bibentry()
, replacingcff_parse_citation()
.as_cff.person()
, similar toas_cff_person()
but only forperson
objects. We recommend usingas_cff_person()
since it can coerce also string representing authors in BibTeX markup ("{von Neumen}, James"
), that can't be captured properly via methods.
- New
as_bibentry()
method for a variety of classes (character
,list
,NULL
and classes defined by cffr). - New
as_cff_person()
method. - The following base and utils methods supports now
cff
class:as.data.frame.cff()
.as.person()
, although only fordefinitions.person
ordefinitions.entity
(e.g.authors
,contacts
,editors
,publisher,
etc.).head.cff()
,tail.cff()
.toBibtex.cff()
.
The API has been completely reviewed to provide more clarity on functions naming and to facilitate internal maintenance. This change only affects to non-core functions. Now each function does less things but does it better. The old API has been deprecated and it would warn when used, providing advice on the replacement function.
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*.bib
files) andcff_read_bib_text()
(for character strings).write_bib()
andwrite_citation()
: replaced bycff_write_bib()
andcff_write_citation()
respectively.- Argument
path
incff()
is also deprecated, usecff_read()
instead.
- 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:cff_read_cff_citation()
,cff_read_description()
,cff_read_citation()
cff_read_bib()
.
- New
cff_modify()
function for updating and modifyingcff
objects easily.
- 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]{.underline} when series is provided: [collection-type: book-series.]{.underline}
- Can handle BibLaTeX @inbook, that differs significantly from BibTeX @inbook.
- Function
cff_to_bibtex()
andcff_extract_to_bibtex()
have been merged, the latter (cff_extract_to_bibtex()
) is now soft-deprecated.
- New function
write_citation()
that can generate a inst/CITATION file from acff
object (#51).
-
Additional authors of a R package can be now included based on the role on the
DESCRIPTION
file, via the parameterauthors_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`
.
- Replace crayon dependency for cli (#46).
- Improvements on the performance of
cff_validate()
.
- 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).
preferred-citation
is only produced when aCITATION
R 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.
- Fix HTML5 issue as per CRAN request
- cffr now uses a local copy of the schema.json for validating. (#33).
- GitHub Action now runs only on
master
ormain
branch. - Better handling of references
- Now cffr extracts also information of the package dependencies and adds
the main citation of the dependencies to the
references
field, usingcitation(auto = TRUE)
.- New
dependencies
parameter 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 theDESCRIPTION
file.cff_parse_citation()
does a better job extracting information frombibentry()
/BibTeX and mapping it topreferred-citation/references
fields of CFF.
- Add new functions for working with git pre-commit hooks
:
cff_git_hook_install()
cff_git_hook_remove()
- New BibTeX functions:
cff_extract_to_bibtex()
cff_to_bibtex()
cff_parse_person_bibtex()
write_bib()
- Add a new dependency:
lifecycle
.
- Accepted on JOSS
- Include
pages
oncff_parse_citation()
. - New
gh_keywords
parameter oncff_create()
/cff_write()
. IfTRUE
, it would include GitHub repo topics as keywords.
- First CRAN release
- cffr is part now of rOpenSci.
- Update on docs and README.
- Add fuzzy match on
keys
parameter. - New dataset:
cran_to_spdx
. - Add DOI https://doi.org/10.5281/zenodo.5509766
- Citation of installed packages extracted using
citation().
- Auto-generating
preferred-citation
key fromDESCRIPTION
. - Rename
cff_schema_definitions_reference()
tocff_schema_definitions_refs()
. repository
key is supported.- Added vignette:
vignette("crosswalk", package = "cffr")
. - Add support to Bioconductor packages.
- New function:
cff_gha_update()
.
- First stable release