Repository navigation
Add check authors command (Zenodo and GitHub contributors) - #144
RichardLitt wants to merge 13 commits into
Conversation
…GitHub New responder (authors_check) and worker that compare the authors listed in the paper's metadata with the creators of the Zenodo archive and with the GitHub contributors of the repository (reviewers, editor and bots excluded). Names are matched leniently so that small differences (accents, case, initials, typos) are flagged for the editor instead of being missed. Usernames are always rendered in code spans so the reply doesn't mention anyone. Closes openjournals#143
Adds an optional 'with archive <DOI or URL>' to the command, so the Zenodo authors can be checked before the archive is set in the issue. Zenodo record URLs are accepted as well as DOIs.
When the archive isn't given in the command or set in the issue, use the most recent issue comment that mentions a Zenodo DOI or URL, skipping the bot's own comments, and link to that comment in the reply.
|
I manually reviewed all of the code. It's a POC and has low risk, I think. |
- Only fetch the paper's metadata from a blobless shallow clone, and parse it without writing anything from the repository to disk - Keep displayed text on one line and put text with @ or # in code spans, so a name with a line break can't mention anyone - List probable matches that weren't chosen, and only use username guesses when the profile name doesn't say otherwise - Reply with an error asking to set the archive in the issue when the most recent 'set ... as archive' command doesn't match the issue - Don't crash on file names that aren't UTF-8; skip symlinks; prefer the paper closest to the root; report unreadable metadata files - Handle GitHub rate limits and network errors without losing the report - Use the last Zenodo reference in a comment; ignore sandbox records - Don't let specs remove the repository's tmp folder; add tests with a real partial clone
- Show the Zenodo match as a warning, with both ORCIDs, when the paper and Zenodo have different ORCIDs for the same name - Allow YAML aliases in the paper's metadata, accept authors listed as plain names, and remove footnotes that contain brackets
…on failures - '@bot check authors with paper <path>' uses that file instead of looking for paper.md/paper.tex (paper.yml next to it for LaTeX papers) - Every failure to find or read the paper or the Zenodo archive now ends with the command to name it explicitly
Adds tests for each condition in the name matcher, the responder's options, the archive lookup, the paper lookup, the Zenodo and GitHub calls, the paper metadata parsing, the git helpers and the reply template. Also fixes the paper.yml path for a LaTeX paper at the root of the repository.
|
Some deviations and improvements since I first made that message and opened the PR. I didn't manually check all of the tests. The goal was to make this more robust and more responsive. Note: Using Opus 5.5 for this one. |
|
I would fine it useful to see an example of what this looks like (i.e., screenshots from a test) |
|
JOSS doesn't require archives to be on Zenodo, just in an archival repository that provides a DOI. Does this only work with Zenodo, or is this just a matter of text that says Zenodo but really means archival repository? |
|
I would like to change (And as in my previous comment, I'm not sure if we could replace |
|
This only works with Zenodo and GitHub, for now. It is a proof-of-concept more than anything else, and no one has to use it. I've changed it to only use the Zenodo DOI. Here are some printouts: Begin claudish: Example repliesEach reply ends with the same "How to read this" block. I've included it once at the end of this section rather than in every example. 1. tobler (#11384): **Authors check**
| Paper author | Zenodo archive | GitHub contributor |
|---|---|---|
| Elijah Knaap | ⚠️ Written differently: eli knaap | ⚠️ Possibly `@knaaptime` (eli knaap) |
| Sergio J. Rey | ⚠️ Written differently: Sergio Rey | ⚠️ Possibly `@sjsrey` (Sergio Rey) |
| Renan X. Cortes | ⚠️ Written differently: Renan Xavier Cortes | ⚠️ Possibly `@renanxcortes` (Renan Xavier Cortes) |
| Martin Fleischmann | ✅ Martin Fleischmann | ✅ `@martinfleis` (Martin Fleischmann) |
| James D. Gaboardi | ⚠️ Written differently: James Gaboardi | ⚠️ Possibly `@jGaboardi` (James Gaboardi) |
| Daniel Arribas-Bel | ⚠️ Written differently: Dani Arribas-Bel | ⚠️ Possibly `@darribas` (Dani Arribas-Bel) |
**Zenodo authors not listed in the paper:**
- Trevor James Smith
- Josiah Parry
- Richard Littauer
- Patty Frontiera
**GitHub contributors not matched to a paper author** (reviewers, editor and bots excluded):
- `@JosiahParry` (Josiah Parry): 3 commits
- `@pattyf` (Patty Frontiera): 1 commitNote from Richard: Those are the six authors, and I asked about Josiah and Patty in the thread, so this bot worked. 2. sbijax (#11195): **Authors check**
| Paper author | Zenodo archive | GitHub contributor |
|---|---|---|
| Simon Dirmeier | ✅ Dirmeier, Simon | ✅ `@dirmeier` (Simon Dirmeier) |
| Antonietta Mira | ✅ Mira, Antonietta | ❌ Not found |
| Carlo Albert | ✅ Albert, Carlo | ❌ Not found |
**GitHub contributors not matched to a paper author** (reviewers, editor and bots excluded):
- `@goelakash` (Akash Goel): 1 commit
- `@bruno-f-cruz` (Bruno Cruz): 1 commit
- `@lauradriscoll` (Laura Driscoll): 1 commit3. rcldf (#10811): **Authors check**
| Paper author | Zenodo archive | GitHub contributor |
|---|---|---|
| Simon J. Greenhill | ✅ Simon J Greenhill | ✅ `@SimonGreenhill` (Simon J Greenhill) |
**GitHub contributors not matched to a paper author** (reviewers, editor and bots excluded):
- `@HedvigS` (Hedvig Skirgård): 1 commit
- `@xrotwang` (Robert Forkel): 1 commitNote from Richard: I had also asked about those two committers and they didn't need to be on the paper, so this also worked. 4. deflake.rs (#8757), repository on Codeberg: **Authors check**
⚠️ **Warning:** The repository (`https://codeberg.org/benmagill/deflake.rs`) isn't on GitHub, so its contributors were not checked. Only GitHub repositories can be checked.
| Paper author | Zenodo archive | GitHub contributor |
|---|---|---|
| Benjamin Magill | ⚠️ Written differently: Magill, Ben | — |
| Phil McMinn | ✅ McMinn, Phil | — |5. deflake.rs with its JOSS DOI given as the archive: **Authors check**
⚠️ **Warning:** The archive (`10.21105/joss.08757`) isn't a Zenodo DOI, so its authors were not checked. Only Zenodo archives can be checked. If there is a Zenodo archive, name it: `@editorialbot check authors with archive <Zenodo DOI>`
⚠️ **Warning:** The repository (`https://codeberg.org/benmagill/deflake.rs`) isn't on GitHub, so its contributors were not checked. Only GitHub repositories can be checked.
| Paper author | Zenodo archive | GitHub contributor |
|---|---|---|
| Benjamin Magill | — | — |
| Phil McMinn | — | — |The block at the end of every reply: <details>
<summary>How to read this</summary>
- ✅ The name matches. For Zenodo, "Last, First" and "First Last" count as the same.
- ⚠️ Zenodo: the name is written differently (accents, capitalization, initials, typos), or the paper and Zenodo have different ORCIDs. GitHub: probably the same person, but the editor should confirm.
- ❌ No match found.
GitHub only lists people who made commits, so authors who contributed in other ways won't appear there. Contributors don't all need to be authors. These results are for the editor to review, not a pass/fail check.
</details>Errors (the bot replies with only this message, no table)Cases marked real came from running against real repositories. The others are rare failures, so I fed the real worker code a made-up input to get its exact text.
Warnings (shown above the table; the rest of the check still runs)
Notes (in italics below the table)
|
Elijah Knaap now matches eli knaap, and Daniel Arribas-Bel matches Dani Arribas-Bel: a name of 3+ letters matches a longer name starting with it, and each name can match any other name, in any order. Simon J. Greenhill and Simon J Greenhill are now an exact match.
…s that can't be checked - Compare archives by what they point to, so 'set https://doi.org/<DOI> as archive' no longer conflicts with the bare DOI editorialbot stores - If the archive is a zenodo.org URL, use the record's DOI and say so - Warn above the table when the archive's DOI isn't from Zenodo, or the repository isn't on GitHub, the only sources that can be checked - Ask for a <Zenodo DOI> in hints and examples, not a DOI or URL
|
Can we drop the idea of a Zenodo URL and require this to take/use a Zenodo DOI? |
|
Thanks for the examples. I think this looks good in general. |
|
@danielskatz I don't think we specify anywhere - should the Zenodo DOI be the version-specific one, or the general one for the whole record? |
It should be the version specific one - this is the version that is associated with the software that is being reviewed. |
|
Let's hold off on this until #145, which can verify the DOI. |
xuanxu
left a comment
There was a problem hiding this comment.
Hi @RichardLitt.
Our current strategy for this kind of checks that run in their own process in the background is to not use our server with limited RAM/resources but to use the GitHub infrastructure, running them as a GitHub action called by a GitHub workflow from the joss-papers repo that is triggered by editorialbot using a simple call with the github-action responder.
For example, this is how the check references command works:
-
In buffy, the command is declared in the production settings using a github action responder, passing any needed parameter and specifing the workflow that is called in the joss-papers repository
-
The references workflow is run at GitHub. It just uses the github action where all the code is: https://github.com/openjournals/gh-action-check-references
So, I think the best course of action here is to move most of the code from this PR and the Zenodo checks to a script in a GitHub action that we can later use from the papers workflows. I have just created this empty repository for it: https://github.com/openjournals/gh-action-archive-authors-check
|
@xuanxu Thanks for reviewing this! I know it is hard reviewing large PRs that have largely been written with AI. That sounds reasonable to me. I'll make a PR to that repo. |
Closes #143.
Adds a new
check authorscommand for editors:from branchandwith archivecan be combined, in either order.It reads the
authorslist from the paper's metadata (paper.md, orpaper.ymlfor LaTeX papers) and replies with a table showing, for each paper author:It also lists Zenodo authors and GitHub contributors (with commit counts) who weren't matched to any author. Reviewers, the editor and bots are excluded from the contributor list. The reply notes that contributors who didn't commit code won't appear, and that the check is a helper for editors rather than a pass/fail check.
Finding the archive
with archive), as a Zenodo DOI, doi.org link or zenodo.org record URL.archivevalue in the issue.If the most recent
@editorialbot set ... as archivecommand doesn't match the archive in the issue (e.g. the command was refused), the bot doesn't guess: it replies with an error linking to that comment and asks the editor to set the right archive in the issue.Notes
paper.md/paper.ymlis fetched. Nothing from the repository is written to disk.@or#, are rendered in code spans and kept on one line, so the reply never mentions anyone or references other issues.config/settings-production.yml(authors_check:withonly: editors), so it shows up in@editorialbot helpfor editors. Authors and reviewers can't see or run it; removeonly: editorsto open it to everyone.url_field,branch_field,archive_field(defaultarchive) andignored_users_fields(default[reviewers-list, editor]). Documented indocs/responders/authors_check.md.Testing
Specs cover the name matching, the responder, the worker (including a real partial clone with symlinks and non-UTF-8 file names), the archive lookup and the reply template, including names with line breaks and
@/#; the full suite passes. I also ran the worker against several recently accepted JOSS reviews (printing the reply instead of posting it). It found a Zenodo record listing 2 of a paper's 5 authors, and a Zenodo name written without the accents used in the paper.