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

Updating the Description file Date field? #1327

Closed
bgreenwell opened this issue Sep 3, 2016 · 9 comments
Closed

Updating the Description file Date field? #1327

bgreenwell opened this issue Sep 3, 2016 · 9 comments

Comments

@bgreenwell
Copy link

Is it possible to add an option when building/checking a package to automatically update the Date field in the description file? An outdated Date fields seems to be a common mistake in the submission of packages to CRAN (I know I forget to do so often); adding this option would probably go a long way in reducing that error.

@gaborcsardi
Copy link
Member

The Date field is not needed, you can just remove it completely. CRAN will add their own Date/Publication field to the package they put in the repository.

@bgreenwell bgreenwell changed the title pdating the Description file Date field? Updating the Description file Date field? Sep 6, 2016
@bgreenwell
Copy link
Author

I was not aware of that, thanks for the tip!

@melindahiggins2000
Copy link

I agree. It would be nice for the Date to be automatically loaded into the DESCRIPTION file by default. That way (for example) citation("tidyr") won't throw the warning message that

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

The current citation for the tidyr package lists the date as NA

Hadley Wickham (NA). tidyr: Easily Tidy Data with
  `spread()` and `gather()` Functions. R package
  version 0.6.0.9000. https://github.com/hadley/tidyr

This will most likely generate nagging comments from journal reviewers when citing R packages in manuscripts/publications.

@jimhester
Copy link
Member

jimhester commented Sep 28, 2016

@melindahiggins2000 That behavior will only happen when installing the package with install_github(), if downloaded from CRAN the package will have a Date/Publication field that is used.

citation("tidyr")
#> 
#> To cite package 'tidyr' in publications use:
#> 
#>   Hadley Wickham (2016). tidyr: Easily Tidy Data with `spread()`
#>   and `gather()` Functions. R package version 0.6.0.
#>   https://CRAN.R-project.org/package=tidyr
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {tidyr: Easily Tidy Data with `spread()` and `gather()` Functions},
#>     author = {Hadley Wickham},
#>     year = {2016},
#>     note = {R package version 0.6.0},
#>     url = {https://CRAN.R-project.org/package=tidyr},
#>   }

we could add this same field to the package description when we install it from GitHub, which would fix the behavior you describe.

@melindahiggins2000
Copy link

Ahh good point - I see now the difference in the CRAN vs development Github versions. I just think in general it is good practice to track the date of the current version in use and when cited. Thank you for the clarification.

@dracodoc
Copy link

dracodoc commented Mar 6, 2018

@jimhester If I'm understanding correctly, this is not implemented yet

we could add this same field to the package description when we install it from GitHub

I think that can actually be very helpful, not just for citation usage.

  • This will not conflict with CRAN version since CRAN just ignore it.
  • This is still very useful because a lot of packages now deliver through install_github now, and lots of users just use the github version instead of CRAN version.
  • This kind of timestamp should be managed automatically, and the best place for this date is the package building process.
  • For github hosted packages, version is often not enough. A build date is more accurate and useful.

@jvcasillas
Copy link

Adding to what has been mentioned above, I believe it would be useful for the date field to be updated automatically (specifically, for use with citation) because it is often the case that one needs to cite a package that is only on github, i.e., not on cran.

@katrinleinweber
Copy link
Contributor

Why build date, rather than timestamp of the commit from which it was built? I'd compared that with the publication date of an article vs. the timestamp of the publisher-generated PDF that I download.

Also: can the version be mapped back to a git commit in each case? When using the GitHub-Zenodo integration and being stringent about release tagging, it always can be, can't it?

@lock
Copy link

lock bot commented Apr 3, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Apr 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants