Closed dpprdan closed 2 years ago
Seems like a bug in $coerce_authors_at_r()
to me.
It is, but it seems intentional?! Not entirely sure why, though (added in PR #46).
There is another issue that I only saw now: A. User
is returned as author, but should be returned as a contributor.
Not entirely sure why, though
I get it now, the idea is to get the maintainer info (e.g. email) from the maintainer field and then concatenate these two person lists (maintainer & author).
The main problem is that the current code works under the assumption that the Author field does not contain information about the roles (i.e. no [aut, cre]
, [ctb]
, etc.) and therefore overwrites these when they are present.
I could try to make a PR, but cannot get devtools::load_all(".")
to work:
> devtools::load_all(".")
i Loading desc
Error in create_ns_env(path) : Namespace for desc already exists.
Any idea what I am doing wrong?
desc does not work with load_all()
, it is a bug in pkgload.
So Authors
is a free-form field, e.g. https://cran.r-project.org/web/packages/igraph/DESCRIPTION. I am not sure if it is worth putting effort into parsing it, TBH.
Maybe we could advise the user better about this, though.
it is a bug in pkgload
Seems to be fixed in GitHub version
Authors is a free-form field
It will never be perfect of course, but maybe a tad better than now.
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’):
‘Joe Developer [aut, cre]’ is returned as a maintainer
But not as an author
get_authors()
also returns him as a maintainer only, i.e. theaut
tag is missingSession info
``` r 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/library ```