-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
When reading description files with ‘Author’ and ‘Maintainer’ fields (but without ‘<Authors@R>’) and with roles specified in brackets, the maintainer/author is not returned as an author by get_author(s)().
Example from WRE (again without ‘<Authors@R>’):
library(desc)
d <- desc(text =
"Package: pkgname
Version: 0.5-1
Date: 2015-01-01
Title: My First Collection of Functions
Author: Joe Developer [aut, cre],
Pat Developer [aut],
A. User [ctb]
Maintainer: Joe Developer <[email protected]>
Depends: R (>= 3.1.0), nlme
Suggests: MASS
Description: A (one paragraph) description of what
the package does and why it may be useful.
License: GPL (>= 2)
URL: https://www.r-project.org, http://www.another.url
BugReports: https://pkgname.bugtracker.url"
)
d$coerce_authors_at_r()‘Joe Developer [aut, cre]’ is returned as a maintainer
d$get_author("cre")
#> [1] "Joe Developer <[email protected]> [cre]"But not as an author
d$get_author("aut")
#> [1] "Pat Developer [aut]" "A. User [aut]"get_authors() also returns him as a maintainer only, i.e. the aut tag is missing
str(d$get_authors())
#> List of 3
#> $ :Class 'person' hidden list of 1
#> ..$ :List of 5
#> .. ..$ given : chr "Joe"
#> .. ..$ family : chr "Developer"
#> .. ..$ role : chr "cre"
#> .. ..$ email : chr "[email protected]"
#> .. ..$ comment: NULL
#> $ :Class 'person' hidden list of 1
#> ..$ :List of 5
#> .. ..$ given : chr "Pat"
#> .. ..$ family : chr "Developer"
#> .. ..$ role : chr "aut"
#> .. ..$ email : NULL
#> .. ..$ comment: NULL
#> $ :Class 'person' hidden list of 1
#> ..$ :List of 5
#> .. ..$ given : chr "A."
#> .. ..$ family : chr "User"
#> .. ..$ role : chr "aut"
#> .. ..$ email : NULL
#> .. ..$ comment: NULL
#> - attr(*, "class")= chr "person"Session info
sessioninfo::session_info()
#> - Session info ---------------------------------------------------------------
#> setting value
#> version R version 4.0.5 (2021-03-31)
#> os Windows 10 x64
#> system x86_64, mingw32
#> ui RTerm
#> language EN
#> collate German_Germany.1252
#> ctype German_Germany.1252
#> tz Europe/Berlin
#> date 2021-10-05
#>
#> - Packages -------------------------------------------------------------------
#> package * version date lib source
#> cli 3.0.1 2021-07-17 [1] standard (@3.0.1)
#> crayon 1.4.1 2021-02-08 [1] CRAN (R 4.0.4)
#> desc * 1.4.0 2021-09-28 [1] standard (@1.4.0)
#> digest 0.6.28 2021-09-23 [1] standard (@0.6.28)
#> evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.4)
#> fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.0.4)
#> fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.4)
#> glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.4)
#> highr 0.9 2021-04-16 [1] standard (@0.9)
#> htmltools 0.5.2 2021-08-25 [1] standard (@0.5.2)
#> knitr 1.36 2021-09-29 [1] standard (@1.36)
#> magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.0.4)
#> R6 2.5.1 2021-08-19 [1] standard (@2.5.1)
#> reprex 2.0.1 2021-08-05 [1] standard (@2.0.1)
#> rlang 0.4.11 2021-04-30 [1] standard (@0.4.11)
#> rmarkdown 2.11 2021-09-14 [1] standard (@2.11)
#> rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.0.4)
#> rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.0.4)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.4)
#> stringi 1.7.5 2021-10-04 [1] standard (@1.7.5)
#> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.0.4)
#> withr 2.4.2 2021-04-18 [1] standard (@2.4.2)
#> xfun 0.26 2021-09-14 [1] standard (@0.26)
#> yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.3)
#>
#> [1] D:/Users/Daniel/Documents/R/win-library/4.0
#> [2] C:/Program Files/R/R-4.0.5/libraryMetadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior