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

Automatically add contributors to CITATION.cff #199

Closed
Ly0n opened this issue Nov 16, 2023 · 12 comments
Closed

Automatically add contributors to CITATION.cff #199

Ly0n opened this issue Nov 16, 2023 · 12 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Ly0n
Copy link
Member

Ly0n commented Nov 16, 2023

I was wondering if we should/could automatically add contributors to CITATION.cff. After a quick search, I can't find a GitHub action or similar that does this. People might like such an action for various OS projects. @andrew @RichardLitt.

@andrew
Copy link
Member

andrew commented Nov 16, 2023

That sounds like a great idea 💡

@Ly0n
Copy link
Member Author

Ly0n commented Nov 16, 2023

There is generally little development on the automatic creation of the CITATION.cff. Most of the parts to do this can be found here: https://github.com/citation-file-format

@andrew
Copy link
Member

andrew commented Nov 16, 2023

It’s funny you mention that, I wrote a script to generate some CITATION.cff files last week: https://github.com/ecosyste-ms/home/blob/main/lib/tasks/citation.rake

@Ly0n
Copy link
Member Author

Ly0n commented Nov 24, 2023

@andrew I will now start working on this issue using ruby^^. My programming skills in this language are very limited, but I found this that should make it much easier: https://github.com/citation-file-format/ruby-cff

@Ly0n
Copy link
Member Author

Ly0n commented Nov 24, 2023

The ruby part was easy:

require 'cff'


CFF::File.open('CITATION.cff') do |cff|
  cff.version = CFF::VERSION
  cff.authors << CFF::Person.new(ARGV[0], ARGV[1])
end

@andrew
Copy link
Member

andrew commented Nov 25, 2023

One thing I was thinking we could do is search for each committers ORCID via email/name via the api: https://info.orcid.org/documentation/api-tutorials/api-tutorial-searching-the-orcid-registry/

@Ly0n
Copy link
Member Author

Ly0n commented Nov 26, 2023

@andrew Good idea. That should not be that hard.

I'm just thinking about what such a CI job would look like in general. I think it makes sense to have a weekly scheduelded CI job that does the following:

  1. Do weekly:
  2. Compare all the contributors with the people in the CITATION.cff. If no new human contributor has been found quit here.
  3. Add first and last name from GitHub profile or search ORCID for author first and last name by email address.
  4. Create a pull request with the new CITATION.cff. Mention the new user_name in the pull request to check if the entry is valid.

@Ly0n Ly0n added the help wanted Extra attention is needed label Dec 27, 2023
@andrew
Copy link
Member

andrew commented Jun 18, 2024

It might be tricky to handle a combination of an automatically generated CITATION.cff file and one that has custom changes based on user requests, perhaps the action could simply open an issue to add the contributor, with a suggested automatically generated addition?

@Ly0n
Copy link
Member Author

Ly0n commented Jun 18, 2024

It might be tricky to handle a combination of an automatically generated CITATION.cff file and one that has custom changes based on user requests, perhaps the action could simply open an issue to add the contributor, with a suggested automatically generated addition?

I think it makes sense to tackle this issue with a command line tool first. We can tackle the entire automation process as soon as we have experience with the manual steps. For most projects, it should be sufficient to run the tool once a year. This would also give people more control and the option to change the automated suggestions based on their needs. Once we have good experience with this, we can integrate the command line tool into a CI.

@Ly0n
Copy link
Member Author

Ly0n commented Jun 26, 2024

As discussed yesterday with @andrew, this tool is a better fit for ecosyste.ms, but I happy to help maintain and test this project in the future.

@andrew
Copy link
Member

andrew commented Jun 26, 2024

Added some thoughts on the steps over here: ecosyste-ms/roadmap#17 (comment)

@RichardLitt
Copy link
Contributor

Back online. Should we close this thread here and just keep it at the ecoyste.ms issue?

@Ly0n Ly0n closed this as completed Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants