EMODnet / EMODnetWCS

Access EMODnet Web Coverage Service data through R
https://emodnet.github.io/EMODnetWCS/
Other
6 stars 1 forks source link

No date being picked by CITATION #42

Open annakrystalli opened 2 years ago

annakrystalli commented 2 years ago

I'm trying recreate here:

https://github.com/EMODnet/EMODnetWCS/blob/691bb8658c0c4004e5b0f91326bbd0dc1e61ff23/inst/CITATION#L1-L12

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: https://github.com/EMODnet/EMODnetWCS/blob/691bb8658c0c4004e5b0f91326bbd0dc1e61ff23/DESCRIPTION#L1-L49

A datePublished field hasn't ended up in the codemate.json file either. https://github.com/EMODnet/EMODnetWCS/blob/691bb8658c0c4004e5b0f91326bbd0dc1e61ff23/codemeta.json#L305-L320

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 commented 2 years ago

Have you installed EMODnetWCS?

annakrystalli commented 2 years ago

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

maelle commented 2 years ago

I'll try

maelle commented 2 years ago
> pak::pak("EMODnet/EMODnetWCS")
✓ Updated metadata database: 3.32 MB in 7 files.                           
✓ Updating metadata database ... done                                      

→ Will 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 size
✓ Got EMODnetWCS 0.0.0.9010 (source) (214.73 kB)              
✓ Downloaded 1 package (214.73 kB)in 1.4s                     
ℹ Packaging EMODnetWCS 0.0.0.9010
✓ Packaged EMODnetWCS 0.0.0.9010 (634ms)                              
ℹ Building EMODnetWCS 0.0.0.9010                                      
✓ Built 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 package ‘EMODnetWCS’ in 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 package ‘EMODnetWCS’
annakrystalli commented 2 years ago

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

annakrystalli commented 2 years ago

Thank you!

maelle commented 2 years ago

Let me try cloning! I was lazy :stuck_out_tongue_winking_eye:

maelle commented 2 years ago

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 commented 2 years ago

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

maelle commented 2 years ago

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 commented 2 years ago

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