-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authors@R disappears with desc_normalize() #80
Comments
Surprise surprise, I think it might have something to do with names with accents in them. I get the same behaviour if I run |
This looks similar as r-lib/devtools#1948 |
Interesting! I'm trying to see where and why the field is simply dropped. 😿 |
From someone not on Windows download.file("https://raw.githubusercontent.com/ropensci/codemetar/master/DESCRIPTION",
"thedescription")
readLines("thedescription")
#> [1] "Package: codemetar"
#> [2] "Type: Package"
#> [3] "Title: Generate 'CodeMeta' Metadata for R Packages"
#> [4] "Version: 0.1.6"
#> [5] "Authors@R: "
#> [6] " c(person(given = \"Carl\","
#> [7] " family = \"Boettiger\","
#> [8] " role = c(\"aut\", \"cre\", \"cph\"),"
#> [9] " email = \"[email protected]\","
#> [10] " comment = c(ORCID = \"0000-0002-1642-628X\")),"
#> [11] " person(given = \"Anna\","
#> [12] " family = \"Krystalli\","
#> [13] " role = c(\"rev\", \"ctb\"),"
#> [14] " comment = c(ORCID = \"0000-0002-2378-4915\")),"
#> [15] " person(given = \"Toph\","
#> [16] " family = \"Allen\","
#> [17] " role = \"rev\","
#> [18] " comment = c(ORCID = \"0000-0003-4580-091X\")),"
#> [19] " person(given = \"Maëlle\","
#> [20] " family = \"Salmon\","
#> [21] " role = c(\"ctb\", \"aut\"),"
#> [22] " comment = c(ORCID = \"0000-0002-2815-0399\")),"
#> [23] " person(given = \"rOpenSci\","
#> [24] " role = \"fnd\","
#> [25] " comment = \"https://ropensci.org/\"),"
#> [26] " person(given = \"Katrin\","
#> [27] " family = \"Leinweber\","
#> [28] " role = \"ctb\","
#> [29] " comment = c(ORCID = \"0000-0001-5135-5758\")),"
#> [30] " person(given = \"Noam\","
#> [31] " family = \"Ross\","
#> [32] " role = \"ctb\","
#> [33] " comment = c(ORCID = \"0000-0002-2136-0000\")),"
#> [34] " person(given = \"Arfon\","
#> [35] " family = \"Smith\","
#> [36] " role = \"ctb\"),"
#> [37] " person(given = \"Jeroen\","
#> [38] " family = \"Ooms\","
#> [39] " role = \"ctb\","
#> [40] " comment = c(ORCID = \"0000-0002-4035-0289\")),"
#> [41] " person(given = \"Sebastian\","
#> [42] " family = \"Meyer\","
#> [43] " role = \"ctb\","
#> [44] " comment = c(ORCID = \"0000-0002-1791-9449\")),"
#> [45] " person(given = \"Michael\","
#> [46] " family = \"Rustler\","
#> [47] " role = \"ctb\","
#> [48] " comment = c(ORCID = \"0000-0003-0647-7726\")),"
#> [49] " person(given = \"Hauke\","
#> [50] " family = \"Sonnenberg\","
#> [51] " role = \"ctb\","
#> [52] " comment = c(ORCID = \"0000-0001-9134-2871\"))"
#> [53] " )"
#> [54] "Description: The 'Codemeta' Project defines a 'JSON-LD' format for describing"
#> [55] " software metadata, as detailed at <https://codemeta.github.io>. This package"
#> [56] " provides utilities to generate, parse, and modify 'codemeta.json' files "
#> [57] " automatically for R packages, as well as tools and examples for working with"
#> [58] " 'codemeta.json' 'JSON-LD' more generally."
#> [59] "License: GPL-3"
#> [60] "URL: https://github.com/ropensci/codemetar, https://ropensci.github.io/codemetar"
#> [61] "BugReports: https://github.com/ropensci/codemetar/issues"
#> [62] "Encoding: UTF-8"
#> [63] "LazyData: true"
#> [64] "RoxygenNote: 6.1.0.9000"
#> [65] "Depends: R (>= 3.0.0)"
#> [66] "Imports: "
#> [67] " jsonlite (>= 1.3),"
#> [68] " jsonld,"
#> [69] " git2r,"
#> [70] " pkgbuild,"
#> [71] " memoise,"
#> [72] " methods,"
#> [73] " stats,"
#> [74] " stringi,"
#> [75] " readr,"
#> [76] " desc,"
#> [77] " usethis,"
#> [78] " whisker,"
#> [79] " tibble,"
#> [80] " crul,"
#> [81] " gh,"
#> [82] " stringr,"
#> [83] " sessioninfo,"
#> [84] " purrr,"
#> [85] " curl,"
#> [86] " commonmark,"
#> [87] " xml2,"
#> [88] " magrittr,"
#> [89] " glue"
#> [90] "Suggests: "
#> [91] " testthat,"
#> [92] " jsonvalidate,"
#> [93] " covr,"
#> [94] " knitr,"
#> [95] " rmarkdown,"
#> [96] " dplyr (>= 0.7.0),"
#> [97] " printr"
#> [98] "VignetteBuilder: knitr"
#> [99] "X-schema.org-keywords: metadata, codemeta, ropensci, citation, credit, linked-data"
#> [100] "X-schema.org-isPartOf: https://ropensci.org"
desc::desc_normalize(file = "thedescription")
#> Type: Package
#> Package: codemetar
#> Title: Generate 'CodeMeta' Metadata for R Packages
#> Version: 0.1.6
#> Authors@R (parsed):
#> * Carl Boettiger <[email protected]> [aut, cre, cph] (<https://orcid.org/0000-0002-1642-628X>)
#> * Anna Krystalli [rev, ctb] (<https://orcid.org/0000-0002-2378-4915>)
#> * Toph Allen [rev] (<https://orcid.org/0000-0003-4580-091X>)
#> * Maëlle Salmon [ctb, aut] (<https://orcid.org/0000-0002-2815-0399>)
#> * rOpenSci [fnd] (https://ropensci.org/)
#> * Katrin Leinweber [ctb] (<https://orcid.org/0000-0001-5135-5758>)
#> * Noam Ross [ctb] (<https://orcid.org/0000-0002-2136-0000>)
#> * Arfon Smith [ctb]
#> * Jeroen Ooms [ctb] (<https://orcid.org/0000-0002-4035-0289>)
#> * Sebastian Meyer [ctb] (<https://orcid.org/0000-0002-1791-9449>)
#> * Michael Rustler [ctb] (<https://orcid.org/0000-0003-0647-7726>)
#> * Hauke Sonnenberg [ctb] (<https://orcid.org/0000-0001-9134-2871>)
#> Description: The 'Codemeta' Project defines a 'JSON-LD' format for
#> describing software metadata, as detailed at
#> <https://codemeta.github.io>. This package provides utilities to
#> generate, parse, and modify 'codemeta.json' files automatically for R
#> packages, as well as tools and examples for working with
#> 'codemeta.json' 'JSON-LD' more generally.
#> License: GPL-3
#> URL: https://github.com/ropensci/codemetar,
#> https://ropensci.github.io/codemetar
#> BugReports: https://github.com/ropensci/codemetar/issues
#> Depends:
#> R (>= 3.0.0)
#> Imports:
#> jsonlite (>= 1.3),
#> jsonld,
#> git2r,
#> pkgbuild,
#> memoise,
#> methods,
#> stats,
#> stringi,
#> readr,
#> desc,
#> usethis,
#> whisker,
#> tibble,
#> crul,
#> gh,
#> stringr,
#> sessioninfo,
#> purrr,
#> curl,
#> commonmark,
#> xml2,
#> magrittr,
#> glue
#> Suggests:
#> testthat,
#> jsonvalidate,
#> covr,
#> knitr,
#> rmarkdown,
#> dplyr (>= 0.7.0),
#> printr
#> VignetteBuilder:
#> knitr
#> Encoding: UTF-8
#> LazyData: true
#> RoxygenNote: 6.1.0.9000
#> X-schema.org-isPartOf: https://ropensci.org
#> X-schema.org-keywords: metadata, codemeta, ropensci, citation, credit,
#> linked-data
readLines("thedescription")
#> [1] "Type: Package"
#> [2] "Package: codemetar"
#> [3] "Title: Generate 'CodeMeta' Metadata for R Packages"
#> [4] "Version: 0.1.6"
#> [5] "Authors@R: "
#> [6] " c(person(given = \"Carl\","
#> [7] " family = \"Boettiger\","
#> [8] " role = c(\"aut\", \"cre\", \"cph\"),"
#> [9] " email = \"[email protected]\","
#> [10] " comment = c(ORCID = \"0000-0002-1642-628X\")),"
#> [11] " person(given = \"Anna\","
#> [12] " family = \"Krystalli\","
#> [13] " role = c(\"rev\", \"ctb\"),"
#> [14] " comment = c(ORCID = \"0000-0002-2378-4915\")),"
#> [15] " person(given = \"Toph\","
#> [16] " family = \"Allen\","
#> [17] " role = \"rev\","
#> [18] " comment = c(ORCID = \"0000-0003-4580-091X\")),"
#> [19] " person(given = \"Maëlle\","
#> [20] " family = \"Salmon\","
#> [21] " role = c(\"ctb\", \"aut\"),"
#> [22] " comment = c(ORCID = \"0000-0002-2815-0399\")),"
#> [23] " person(given = \"rOpenSci\","
#> [24] " role = \"fnd\","
#> [25] " comment = \"https://ropensci.org/\"),"
#> [26] " person(given = \"Katrin\","
#> [27] " family = \"Leinweber\","
#> [28] " role = \"ctb\","
#> [29] " comment = c(ORCID = \"0000-0001-5135-5758\")),"
#> [30] " person(given = \"Noam\","
#> [31] " family = \"Ross\","
#> [32] " role = \"ctb\","
#> [33] " comment = c(ORCID = \"0000-0002-2136-0000\")),"
#> [34] " person(given = \"Arfon\","
#> [35] " family = \"Smith\","
#> [36] " role = \"ctb\"),"
#> [37] " person(given = \"Jeroen\","
#> [38] " family = \"Ooms\","
#> [39] " role = \"ctb\","
#> [40] " comment = c(ORCID = \"0000-0002-4035-0289\")),"
#> [41] " person(given = \"Sebastian\","
#> [42] " family = \"Meyer\","
#> [43] " role = \"ctb\","
#> [44] " comment = c(ORCID = \"0000-0002-1791-9449\")),"
#> [45] " person(given = \"Michael\","
#> [46] " family = \"Rustler\","
#> [47] " role = \"ctb\","
#> [48] " comment = c(ORCID = \"0000-0003-0647-7726\")),"
#> [49] " person(given = \"Hauke\","
#> [50] " family = \"Sonnenberg\","
#> [51] " role = \"ctb\","
#> [52] " comment = c(ORCID = \"0000-0001-9134-2871\")))"
#> [53] "Description: The 'Codemeta' Project defines a 'JSON-LD' format for"
#> [54] " describing software metadata, as detailed at"
#> [55] " <https://codemeta.github.io>. This package provides utilities to"
#> [56] " generate, parse, and modify 'codemeta.json' files automatically for R"
#> [57] " packages, as well as tools and examples for working with"
#> [58] " 'codemeta.json' 'JSON-LD' more generally."
#> [59] "License: GPL-3"
#> [60] "URL: https://github.com/ropensci/codemetar,"
#> [61] " https://ropensci.github.io/codemetar"
#> [62] "BugReports: https://github.com/ropensci/codemetar/issues"
#> [63] "Depends: "
#> [64] " R (>= 3.0.0)"
#> [65] "Imports: "
#> [66] " jsonlite (>= 1.3),"
#> [67] " jsonld,"
#> [68] " git2r,"
#> [69] " pkgbuild,"
#> [70] " memoise,"
#> [71] " methods,"
#> [72] " stats,"
#> [73] " stringi,"
#> [74] " readr,"
#> [75] " desc,"
#> [76] " usethis,"
#> [77] " whisker,"
#> [78] " tibble,"
#> [79] " crul,"
#> [80] " gh,"
#> [81] " stringr,"
#> [82] " sessioninfo,"
#> [83] " purrr,"
#> [84] " curl,"
#> [85] " commonmark,"
#> [86] " xml2,"
#> [87] " magrittr,"
#> [88] " glue"
#> [89] "Suggests: "
#> [90] " testthat,"
#> [91] " jsonvalidate,"
#> [92] " covr,"
#> [93] " knitr,"
#> [94] " rmarkdown,"
#> [95] " dplyr (>= 0.7.0),"
#> [96] " printr"
#> [97] "VignetteBuilder: "
#> [98] " knitr"
#> [99] "Encoding: UTF-8"
#> [100] "LazyData: true"
#> [101] "RoxygenNote: 6.1.0.9000"
#> [102] "X-schema.org-isPartOf: https://ropensci.org"
#> [103] "X-schema.org-keywords: metadata, codemeta, ropensci, citation, credit,"
#> [104] " linked-data" Created on 2018-12-18 by the reprex package (v0.2.1) Session infodevtools::session_info()
#> ─ Session info ──────────────────────────────────────────────────────────
#> setting value
#> version R version 3.5.1 Patched (2018-11-18 r75627)
#> os macOS Mojave 10.14.2
#> system x86_64, darwin15.6.0
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz US/Pacific
#> date 2018-12-18
#>
#> ─ Packages ──────────────────────────────────────────────────────────────
#> package * version date lib source
#> assertthat 0.2.0 2017-04-11 [1] CRAN (R 3.5.0)
#> backports 1.1.3 2018-12-14 [1] CRAN (R 3.5.1)
#> callr 3.1.0 2018-12-10 [1] CRAN (R 3.5.1)
#> cli 1.0.1 2018-09-25 [1] CRAN (R 3.5.1)
#> crayon 1.3.4 2017-09-16 [1] CRAN (R 3.5.0)
#> desc 1.2.0 2018-05-01 [1] CRAN (R 3.5.0)
#> devtools 2.0.1 2018-10-26 [1] CRAN (R 3.5.1)
#> digest 0.6.18 2018-10-10 [1] CRAN (R 3.5.1)
#> evaluate 0.12 2018-10-09 [1] CRAN (R 3.5.0)
#> fs 1.2.6 2018-08-23 [1] CRAN (R 3.5.1)
#> glue 1.3.0 2018-07-17 [1] CRAN (R 3.5.1)
#> highr 0.7 2018-06-09 [1] CRAN (R 3.5.0)
#> htmltools 0.3.6 2017-04-28 [1] CRAN (R 3.5.0)
#> knitr 1.21 2018-12-10 [1] CRAN (R 3.5.1)
#> magrittr 1.5 2014-11-22 [1] CRAN (R 3.5.0)
#> memoise 1.1.0 2017-04-21 [1] CRAN (R 3.5.0)
#> pkgbuild 1.0.2 2018-10-16 [1] CRAN (R 3.5.1)
#> pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.5.1)
#> prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.5.0)
#> processx 3.2.1 2018-12-05 [1] CRAN (R 3.5.1)
#> ps 1.2.1 2018-11-06 [1] CRAN (R 3.5.1)
#> R6 2.3.0 2018-10-04 [1] CRAN (R 3.5.1)
#> Rcpp 1.0.0 2018-11-07 [1] CRAN (R 3.5.1)
#> remotes 2.0.2 2018-10-30 [1] CRAN (R 3.5.1)
#> rlang 0.3.0.1 2018-10-25 [1] CRAN (R 3.5.1)
#> rmarkdown 1.11 2018-12-08 [1] CRAN (R 3.5.0)
#> rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.5.0)
#> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.5.1)
#> stringi 1.2.4 2018-07-20 [1] CRAN (R 3.5.0)
#> stringr 1.3.1 2018-05-10 [1] CRAN (R 3.5.0)
#> testthat 2.0.1 2018-10-13 [1] CRAN (R 3.5.0)
#> usethis 1.4.0 2018-08-14 [1] CRAN (R 3.5.0)
#> withr 2.1.2 2018-03-15 [1] CRAN (R 3.5.0)
#> xfun 0.4 2018-10-23 [1] CRAN (R 3.5.1)
#> yaml 2.2.0 2018-07-25 [1] CRAN (R 3.5.1)
#>
#> [1] /Library/Frameworks/R.framework/Versions/3.5/Resources/library |
I've also tried it locally with the CRAN version and got the problem as well. So it's on Windows, with accented names, I think. 🔥 |
This is where the field gets dropped Line 778 in 42b9578
authors <- c(person(given = "Gábor",
family = "Csárdi",
role = c("aut", "cre"),
email = "[email protected]"),
person(given = "Kirill",
family = "Müller",
role = "aut"),
person(given = "Jim",
family = "Hester",
role = "aut",
email = "[email protected]"),
person(given = "Maëlle",
family = "Salmon",
role = "ctb",
comment = c(ORCID = "0000-0002-2815-0399")))
encoding <- c(Encoding = "UTF-8")
iconv(authors, from = "UTF-8", to = encoding)
#> [1] NA
#> [2] NA
#> [3] "Jim Hester <[email protected]> [aut]"
#> [4] NA Created on 2018-12-18 by the reprex package (v0.2.1) |
authors <- c(person(given = "Gábor",
family = "Csárdi",
role = c("aut", "cre"),
email = "[email protected]"),
person(given = "Kirill",
family = "Müller",
role = "aut"),
person(given = "Jim",
family = "Hester",
role = "aut",
email = "[email protected]"),
person(given = "Maëlle",
family = "Salmon",
role = "ctb",
comment = c(ORCID = "0000-0002-2815-0399")))
encoding <- c(Encoding = "UTF-8")
iconv(authors, from = "UTF-8", to = encoding)
#> [1] NA
#> [2] NA
#> [3] "Jim Hester <[email protected]> [aut]"
#> [4] NA
iconv(authors, from = "latin1", to = encoding)
#> [1] "Gábor Csárdi <[email protected]> [aut, cre]"
#> [2] "Kirill Müller [aut]"
#> [3] "Jim Hester <[email protected]> [aut]"
#> [4] "Maëlle Salmon [ctb] (<https://orcid.org/0000-0002-2815-0399>)" Created on 2018-12-18 by the reprex package (v0.2.1) |
if needed another reprex here Regards |
Careful: the é in van Dunné may cause use_tidy_description() to drop Authors@R (r-lib/desc#80). Authors@R: person(given = "Frans", family = "van Dunné", role = c("aut", "cre"), email = "[email protected]")
Careful: the é in van Dunné may cause use_tidy_description() to drop Authors@R (r-lib/desc#80). Authors@R: person(given = "Frans", family = "van Dunné", role = c("aut", "cre"), email = "[email protected]")
Could we use the system encoding as the "from" parameter ? authors <- c(person(given = "Gábor",
family = "Csárdi",
role = c("aut", "cre"),
email = "[email protected]"),
person(given = "Kirill",
family = "Müller",
role = "aut"),
person(given = "Jim",
family = "Hester",
role = "aut",
email = "[email protected]"),
person(given = "Maëlle",
family = "Salmon",
role = "ctb",
comment = c(ORCID = "0000-0002-2815-0399")))
encoding <- c(Encoding = "UTF-8")
# Get locale from system
locale <- Sys.getlocale("LC_CTYPE")
os_encoding <- gsub(pattern = "^.*[.]", "", locale)
iconv(authors, from = os_encoding, to = encoding)
#> [1] "Gábor Csárdi <[email protected]> [aut, cre]"
#> [2] "Kirill Müller [aut]"
#> [3] "Jim Hester <[email protected]> [aut]"
#> [4] "Maëlle Salmon [ctb] (<https://orcid.org/0000-0002-2815-0399>)" |
Created on 2018-12-18 by the reprex package (v0.2.1)
Session info
Note that it does not happen with the example file below, so I'm not sure
desc
is the actual culprit.Created on 2018-12-18 by the reprex package (v0.2.1)
Session info
The text was updated successfully, but these errors were encountered: