Skip to content
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

No date being picked by CITATION #42

Open
annakrystalli opened this issue Sep 16, 2022 · 11 comments
Open

No date being picked by CITATION #42

annakrystalli opened this issue Sep 16, 2022 · 11 comments
Labels
bug Something isn't working

Comments

@annakrystalli
Copy link
Collaborator

I'm trying recreate here:

year <- sub("-.*", "", meta$Date)
note <- paste0(sprintf("R package version %s", meta$Version), ". Integrated data products created under the European Marine Observation Data Network (EMODnet) Biology project (EASME/EMFF/2017/1.3.1.2/02/SI2.789013), funded by the European Union under Regulation (EU) No 508/2014 of the European Parliament and of the Council of 15 May 2014 on the European Maritime and Fisheries Fund")
bibentry(bibtype = "Manual",
title = "{EMODnetWCS}: Access EMODnet Web Coverage Service data through R",
author = c(
person("Anna", "Krystalli")
),
year = year,
note = note,
url = "https://github.com/EMODnet/EMODnetWCS")

the citation generating approach in EMODnetWFS by @maelle:

https://github.com/EMODnet/EMODnetWFS/blob/c1ac54a25d91537bb57a94438fa6e9a41528bd9e/inst/CITATION#L1-L13

However, it's not picking up a Date:

citation(package = "EMODnetWCS")
#> Warning in citation(package = "EMODnetWCS"): no date field in DESCRIPTION file
#> of package 'EMODnetWCS'
#> Warning in citation(package = "EMODnetWCS"): could not determine year for
#> 'EMODnetWCS' from package DESCRIPTION file
#> 
#> To cite package 'EMODnetWCS' in publications use:
#> 
#>   Anna Krystalli (NA). EMODnetWCS: Access EMODnet Web Coverage Service
#>   data through R. https://github.com/EMODnet/EMODnetWCS,
#>   https://emodnet.github.io/EMODnetWCS/.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {EMODnetWCS: Access EMODnet Web Coverage Service data through R},
#>     author = {Anna Krystalli},
#>     note = {https://github.com/EMODnet/EMODnetWCS,
#> https://emodnet.github.io/EMODnetWCS/},
#>   }

which makes sense in this case as it's not included in the EMODnetWCS DESCRIPTION file:

EMODnetWCS/DESCRIPTION

Lines 1 to 49 in 691bb86

Package: EMODnetWCS
Title: Access EMODnet Web Coverage Service data through R
Version: 0.0.0.9010
Authors@R: c(
person("Anna", "Krystalli", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0002-2378-4915")),
person("Salvador", "Fernández-Bejarano", , "[email protected]", role = "cre",
comment = c(ORCID = "0000-0003-0535-7677")),
person("European Marine Observation Data Network (EMODnet) Biology project", "European Commission's Directorate - General for Maritime Affairs and Fisheries (DG MARE)", , "[email protected]", role = "cph"),
person("VLIZ (VLAAMS INSTITUUT VOOR DE ZEE)", , , "[email protected]", role = "fnd")
)
Description: Access and interrogate EMODnet Web Coverage Service data
through R.
License: MIT + file LICENSE
Imports:
checkmate,
cli,
curl,
glue,
httr,
memoise,
purrr,
rlang,
sf,
tibble
Suggests:
covr,
fs,
httptest,
huxtable,
knitr,
rmarkdown,
terra,
testthat (>= 3.0.0),
webmockr,
withr
Config/testthat/edition: 3
Remotes:
eblondel/ows4R
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.0
URL: https://github.com/EMODnet/EMODnetWCS,
https://emodnet.github.io/EMODnetWCS/
BugReports: https://github.com/EMODnet/EMODnetWCS/issues
Depends:
R (>= 4.1), ows4R (>= 0.3-1)
LazyData: true
VignetteBuilder: knitr

A datePublished field hasn't ended up in the codemate.json file either.

EMODnetWCS/codemeta.json

Lines 305 to 320 in 691bb86

"citation": [
{
"@type": "SoftwareSourceCode",
"author": [
{
"@type": "Person",
"givenName": "Anna",
"familyName": "Krystalli"
}
],
"name": "{EMODnetWCS}: Access EMODnet Web Coverage Service data through R",
"url": "https://github.com/EMODnet/EMODnetWCS",
"description": "R package version 0.0.0.9010. Integrated data products created under the European Marine Observation Data Network (EMODnet) Biology project (EASME/EMFF/2017/1.3.1.2/02/SI2.789013), funded by the European Union under Regulation (EU) No 508/2014 of the European Parliament and of the Council of 15 May 2014 on the European Maritime and Fisheries Fund"
}
]
}

The odd thing is that is IS being picked up in EMODnetWFS

citation(package = "EMODnetWFS")
#> 
#> Krystalli A (2020). _EMODnetWFS: Access EMODnet Web Feature Service
#> data through R_. R package version 2.0.1.9001. Integrated data products
#> created under the European Marine Observation Data Network (EMODnet)
#> Biology project (EASME/EMFF/2017/1.3.1.2/02/SI2.789013), funded by the
#> by the European Union under Regulation (EU) No 508/2014 of the European
#> Parliament and of the Council of 15 May 2014 on the European Maritime
#> and Fisheries Fund, <URL: https://github.com/EMODnet/EMODnetWFS>.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {{EMODnetWFS}: Access EMODnet Web Feature Service data through R},
#>     author = {Anna Krystalli},
#>     year = {2020},
#>     note = {R package version 2.0.1.9001. Integrated data products created under the European Marine Observation Data Network (EMODnet) Biology project (EASME/EMFF/2017/1.3.1.2/02/SI2.789013), funded by the by the European Union under Regulation (EU) No 508/2014 of the European Parliament and of the Council of 15 May 2014 on the European Maritime and Fisheries Fund},
#>     url = {https://github.com/EMODnet/EMODnetWFS},
#>   }

Created on 2022-09-16 by the reprex package (v2.0.1)

even though there is no Date field in it's DESCRIPTION file: https://github.com/EMODnet/EMODnetWFS/blob/c1ac54a25d91537bb57a94438fa6e9a41528bd9e/DESCRIPTION#L1-L61

There is however a datePublished field in the EMODnetWFS codemeta.json!
https://github.com/EMODnet/EMODnetWFS/blob/c1ac54a25d91537bb57a94438fa6e9a41528bd9e/codemeta.json#L392-L413

I'm trying to figure out where meta$Date data is coming from in inst/CITATION script: https://github.com/EMODnet/EMODnetWFS/blob/c1ac54a25d91537bb57a94438fa6e9a41528bd9e/inst/CITATION#L1

and how a datePublished field ended up in the EMODnetWFS codemeta.json. Any ideas @maelle ?

@maelle
Copy link
Contributor

maelle commented Sep 16, 2022

Have you installed EMODnetWCS?

@annakrystalli
Copy link
Collaborator Author

yup. It's picking up the rest of the details. Just no date 🤔

@maelle
Copy link
Contributor

maelle commented Sep 16, 2022

I'll try

@maelle
Copy link
Contributor

maelle commented Sep 16, 2022

> pak::pak("EMODnet/EMODnetWCS")
✓ Updated metadata database: 3.32 MB in 7 files.Updating metadata database ... doneWill install 1 package.Will download 1 package with unknown size.
+ EMODnetWCS   0.0.0.9010 [bld][cmp][dl] (GitHub: 88c8afc)
ℹ Getting 1 pkg with unknown sizeGot EMODnetWCS 0.0.0.9010 (source) (214.73 kB)              
✓ Downloaded 1 package (214.73 kB)in 1.4sPackaging EMODnetWCS 0.0.0.9010Packaged EMODnetWCS 0.0.0.9010 (634ms)                              
ℹ Building EMODnetWCS 0.0.0.9010Built EMODnetWCS 0.0.0.9010 (15.6s)                                 
✓ Installed EMODnetWCS 0.0.0.9010 (github::EMODnet/EMODnetWCS@88c8afc) (25ms)
✓ 1 pkg + 58 deps: kept 55, added 1, dld 1 (NA B) [32.8s]               
> citation(package = "EMODnetWCS")

To cite packageEMODnetWCSin publications
use:

  Krystalli A (2022). _EMODnetWCS: Access
  EMODnet Web Coverage Service data through R_.
  https://github.com/EMODnet/EMODnetWCS,
  https://emodnet.github.io/EMODnetWCS/.

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {EMODnetWCS: Access EMODnet Web Coverage Service data through R},
    author = {Anna Krystalli},
    year = {2022},
    note = {https://github.com/EMODnet/EMODnetWCS,
https://emodnet.github.io/EMODnetWCS/},
  }



Warning message:
In citation(package = "EMODnetWCS") :
  no date field in DESCRIPTION file of packageEMODnetWCS

@annakrystalli
Copy link
Collaborator Author

Oh, I didn't realise I needed to install it from GitHub to work. I had installed it locally from source

@annakrystalli
Copy link
Collaborator Author

Thank you!

@maelle
Copy link
Contributor

maelle commented Sep 16, 2022

Let me try cloning! I was lazy 😜

@maelle
Copy link
Contributor

maelle commented Sep 16, 2022

I get the same as you with the local installation.

 citation(package = "EMODnetWCS")

To cite package ‘EMODnetWCS’ in publications use:

  Krystalli A (????). _EMODnetWCS: Access EMODnet Web
  Coverage Service data through R_.
  https://github.com/EMODnet/EMODnetWCS,
  https://emodnet.github.io/EMODnetWCS/.

A BibTeX entry for LaTeX users is

  @Manual{,
    title = {EMODnetWCS: Access EMODnet Web Coverage Service data through R},
    author = {Anna Krystalli},
    note = {https://github.com/EMODnet/EMODnetWCS,
https://emodnet.github.io/EMODnetWCS/},
  }



Warning messages:
1: In citation(package = "EMODnetWCS") :
  no date field in DESCRIPTION file of package ‘EMODnetWCS’
2: In citation(package = "EMODnetWCS") :
  could not determine year for ‘EMODnetWCS’ from package DESCRIPTION file

@annakrystalli
Copy link
Collaborator Author

Interesting! Where is that meta$Date coming from??

@maelle
Copy link
Contributor

maelle commented Sep 16, 2022

sorry for the delay!
it comes from the DESCRIPTION file that is in find.package("EMODnetWCS").

For instance for a package I installed from CRAN there is a date file.path(find.package("anytime"), "DESCRIPTION") |> file.edit()

@annakrystalli
Copy link
Collaborator Author

Solved manually for now by installing from GitHub using pak and then rendering README but needs a longer term approach.

I also tried adding a date into DESCRIPTION but, while that is being picked up by codemeta.json, it still doesn't work in citation() when package is installed locally through source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants