Releases: ropensci/cffr
cffr 1.2.0
- New parameter
r_citationincff_write(). When it is set toTRUEa
R citation file (inst/CITATION) would be generated/updated with the
information of the generatedCITATION.cfffile. No backup copy would be
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 lower caps as a good practice for R developers.
What's Changed
- Bump dieghernan/cran-status-check from 1 to 2 by @dependabot in #85
- Add option for auto creation of inst/CITATION by @dieghernan in #84
Full Changelog: v1.1.1...v1.2.0
cffr 1.1.1
- Adapt extraction of orcid to R > 4.4.1.
What's Changed
- Adapt to changes in person (R 4.5.0) by @dieghernan in #80
Full Changelog: v1.1.0...v1.1.1
cffr 1.1.0
- Now cffr adds automatically 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
would be used as the mainCITATION.cffdoiand 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 thereferenceskey.
- If the package has a
- Extract
commitfromRemoteSha. - Update
cran_to_spdxdataset.
What's Changed
- Extract commit info by @dieghernan in #72
- Fix action for testing cffr in ~2500 packages by @dieghernan in #73
- Recognize CRAN DOI by @dieghernan in #75
Full Changelog: v1.0.1...v1.1.0
cffr 1.0.1
- Update
cff_write()to add a newencodingargument to make it work with
different encodings, seeiconv(). - Fix NOTEs due to empty lines in docs.
Full Changelog: v1.0.1...v1.0.1
cffr 1.0.0
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.
Major changes
Classes and methods
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, cffand individual elements (e.gpreferred-citationor each
member ofreferences) has classcff_ref, cff. - List of
definitions.personordefinitions.entity(e.g.authors,contact) has classcff_pers_lst, cffand individual elements (e.gpublisheror 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 tocffclass format. Current methods provided are:as_cff.Bibtex().as_cff.bibentry(), replacing cff_parse_citation().as_cff.person(), similar toas_cff_person()but only forpersonobjects. 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,
NULLand classes defined by cffr). - New
as_cff_person()method. - The following base and utils methods supports now
cffclass:as.data.frame.cff().as.person(), although only fordefinitions.personor
definitions.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 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.
Deprecation
cff_to_bibtex()andcff_extract_to_bibtex(): replaced byas_bibentry()
S3 generic.cff_parse_person()andcff_parse_person_bibtex(): replaced by
as_cff_person()S3 generic.cff_parse_citation(): replaced byas_cff()S3 generic.cff_from_bibtex(): replaced bycff_read_bib()(for*.bibfiles) and
cff_read_bib_text()(for character strings).write_bib()andwrite_citation(): replaced bycff_write_bib()and
cff_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:cff_read_cff_citation(),cff_read_description(),cff_read_citation()cff_read_bib().
- 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():
What's Changed
- Update lint.yaml by @dieghernan in #57
- Bump actions/checkout from 3 to 4 by @dependabot in #59
- Bump github/codeql-action from 2 to 3 by @dependabot in #60
- Bump actions/upload-artifact from 3 to 4 by @dependabot in #61
- Overhaul of cff-bibtex conversion system by @dieghernan in #63
- New API by @dieghernan in #65
- Refactor internal code by @dieghernan in #67
- Doc review by @dieghernan in #68
New Contributors
- @dependabot made their first contribution in #59
Full Changelog: v0.5.0...v1.0.0
cffr 0.5.0
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 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", as
jsonvalidate::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`.
What's Changed
- Allow to add more authors by role by @dieghernan in #50
- Improve testing by @dieghernan in #52
- Improve documentation by @dieghernan in #53
- Improve tests and messages by @dieghernan in #54
- Add write_citation function by @dieghernan in #55
Full Changelog: v0.4.1...v0.5.0
cffr 0.4.1
- Replace crayon dependency for cli (#46).
- Improvements on the performance of
cff_validate().
What's Changed
- Update badge by @dieghernan in #45
- Migrate to cli from crayon by @dieghernan in #47
Full Changelog: v0.4.0...v0.4.1
cffr 0.4.0
- 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).
What's Changed
- typo by @dpprdan in #40
- Add cff_from_bibtex() by @dieghernan in #41
New Contributors
Full Changelog: v0.3.0...v0.4.0
cffr 0.3.0
preferred-citationis only produced when a CITATION (R) file has been
provided with the package (#37).- Improve email handling on authors.
- Add
cff_read()function. This functionality was already implemented on
cff()but new function added in order to provide clarity.
What's Changed
- Improve preferred-citation handling by @dieghernan in #38
Full Changelog: v0.2.3...v0.3.0
cffr 0.2.3
- Update docs to HTML5
Full Changelog: v0.2.2...v0.2.3