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

Create CITATION.cff #2218

Merged
merged 4 commits into from
Feb 17, 2022
Merged

Create CITATION.cff #2218

merged 4 commits into from
Feb 17, 2022

Conversation

banesullivan
Copy link
Member

@banesullivan banesullivan commented Feb 15, 2022

This utilizes a nifty feature of GitHub where the citation will be automatically generated in the sidebar:

In a test repo, this looks like:

Screen Shot 2022-02-14 at 10 46 31 PM

reference: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-citation-files

Which renders as:

Sullivan, B., & Kaszynski, A. (2019). PyVista: 3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK). Journal of Open Source Software, 4(). https://doi.org/10.21105/joss.01450

@article{Sullivan_PyVista_3D_plotting_2019,
author = {Sullivan, Bane and Kaszynski, Alexander},
doi = {10.21105/joss.01450},
journal = {Journal of Open Source Software},
month = {5},
title = {{PyVista: 3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK)}},
url = {https://github.com/pyvista/pyvista},
volume = {4},
year = {2019}
}

These do not perfectly match the citations we have in CITATION.rst which were copied directly from JOSS. Perhaps a JOSS editor could help us make sure this is done right? cc @leouieda


Additionally, I updated my name in the citation from "C. Bane Sullivan" to "Bane Sullivan" for consistency and the fact that I want it to forever be a mystery what the C stands for... could be "Cowboy", could be "Coolasacucumber", could be "Charles".... you'll never know, and I plan on keeping it that way.

@github-actions github-actions bot added the documentation Anything related to the documentation/website label Feb 15, 2022
@banesullivan banesullivan marked this pull request as draft February 15, 2022 06:00
@codecov
Copy link

codecov bot commented Feb 15, 2022

Codecov Report

Merging #2218 (a3c7747) into main (135fedc) will decrease coverage by 0.06%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2218      +/-   ##
==========================================
- Coverage   93.37%   93.30%   -0.07%     
==========================================
  Files          75       75              
  Lines       15602    15602              
==========================================
- Hits        14568    14558      -10     
- Misses       1034     1044      +10     

@adeak
Copy link
Member

adeak commented Feb 15, 2022

Nifty!

If you're worried that the citation gets parsed in a weird way, why not just use the bibtex format? That's what Matplotlib did https://github.com/matplotlib/matplotlib/blob/main/CITATION.bib

I suspect the 4() comes from the missing issue number. The JOSS website displays ... Journal of Open Source Software, 4(37), 1450 where the end is {volume}({number}), {year}. So we can probably change number to issue in the .cff file to hack the right render. Even in the second github example the issue in the .cff file seems to be converted to number in the .bib file.

@banesullivan
Copy link
Member Author

Ah! I totally missed the part that a .bib file could be used instead 🤦🏻‍♂️ thanks for pointing that out @adeak!

Though I think I nailed this in my latest commit... the only thing that is different/left out is the publisher filed when generating the BibTex:

Sullivan, B., & Kaszynski, A. (2019). PyVista: 3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK). Journal of Open Source Software, 4(37), 1450. https://doi.org/10.21105/joss.01450

@article{Sullivan_PyVista_3D_plotting_2019,
author = {Sullivan, Bane and Kaszynski, Alexander},
doi = {10.21105/joss.01450},
journal = {Journal of Open Source Software},
month = {May},
number = {37},
pages = {1450},
title = {{PyVista: 3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK)}},
url = {https://github.com/pyvista/pyvista},
volume = {4},
year = {2019}
}

@banesullivan
Copy link
Member Author

Opened an issue about the publisher field: citation-file-format/ruby-cff#104

Copy link
Member

@adeak adeak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks

@banesullivan banesullivan enabled auto-merge (squash) February 17, 2022 21:55
@banesullivan banesullivan merged commit 266eed6 into main Feb 17, 2022
@banesullivan banesullivan deleted the doc/citation branch February 17, 2022 22:09
@leouieda
Copy link
Contributor

Hey @banesullivan I think this looks good to me. Should get this done for all my projects as well 🙂 Thanks for the inspiration! I'll definitely use this PR as a template.

Are you planning on keeping the Zenodo part up to date with every release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Anything related to the documentation/website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants