Skip to content

Conversation

seisman
Copy link
Member

@seisman seisman commented Apr 10, 2025

See issue #3746 for context. Closes #3746.

This PR updates the AUTHORSHIP file and maintainers' guides to clarify that we consider co-authorship (e.g., PR reviews) when counting contributions. This is in line with what we're saying in AUTHORSHIP:

Our goal for this document is to establish guidelines for giving credit to
contributors for their work. To do so, we will attempt to define:

  • Fair and diverse ways of providing recognition for contributors' efforts.
  • Define contributions in a broad way: writing code and/or documentation, providing
    ideas, fostering the community, etc.

To consider co-authorship (PR reviews), we need to use the following command to count the contributions:

git shortlog -sne --group=author --group=trailer:co-authored-by

For comparison, the first 10 lines of git shortlog -sne's output are:

$ git shortlog -sne | head -n 10
  1131	Dongdong Tian <[email protected]>
   291	Yvonne Fröhlich <[email protected]>
   291	dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
   267	Wei Ji <[email protected]>
   256	Leonardo Uieda <[email protected]>
   192	Will Schlitzer <[email protected]>
   132	Michael Grund <[email protected]>
    68	Meghan Jones <[email protected]>
    33	Yao Jiayuan <[email protected]>
    30	Meghan Jones <[email protected]>

For git shortlog -sne --group=author --group=trailer:co-authored-by, the output is:

$ git shortlog -sne --group=author --group=trailer:co-authored-by | head -n 10
  1480	Dongdong Tian <[email protected]>
   616	Wei Ji <[email protected]>
   425	Yvonne Fröhlich <[email protected]>
   291	dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
   267	Michael Grund <[email protected]>
   258	Leonardo Uieda <[email protected]>
   237	Will Schlitzer <[email protected]>
   129	Meghan Jones <[email protected]>
    53	Yao Jiayuan <[email protected]>
    45	Meghan Jones <[email protected]>

These numbers are still different from the numbers on the GitHub contributors page (https://github.com/GenericMappingTools/pygmt/graphs/contributors), but see #3905.

@seisman seisman added the maintenance Boring but important stuff for the core devs label Apr 10, 2025
@seisman seisman added this to the 0.16.0 milestone Apr 10, 2025
of any author who hasn't made any commits will be decided by all authors. The order can
also be changed on a case-by-case basis.
major release that has an associated paper
(`git shortlog vX.Y.Z..HEAD -sne --group=author --group=trailer:co-authored-by`).
Copy link
Member Author

Choose a reason for hiding this comment

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

Please note that we inconsistently used git shortlog vX.0.0...HEAD -sne and git shortlog HEAD...v0.4.0 -sne in the old versions.

In the new version, I've changed them to git shortlog vX.Y.Z..HEAD (tag before HEAD vs HEAD before tag, .. vs ...). Their differences are summaried below (from ChatGPT):

Command Meaning Use Case
git shortlog v0.14.0..HEAD Commits in HEAD but not in v0.14.0 ✅ Changes since the tag
git shortlog HEAD..v0.14.0 Commits in v0.14.0 but not in HEAD 🔄 Unusual — usually empty if HEAD is ahead
git shortlog v0.14.0...HEAD Commits in v0.14.0 or HEAD, but not both (symmetric difference) 🔍 Compare diverged histories
git shortlog HEAD...v0.14.0 Same as above — order doesn’t matter 🔍 Same as above

The three-dot version doens't work well for patch releases like v0.14.1/v0.14.2.

Copy link
Member

@yvonnefroehlich yvonnefroehlich Apr 10, 2025

Choose a reason for hiding this comment

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

Uhh, did not realize so far, that there are two and three dot versions 😅.

@seisman seisman added the needs review This PR has higher priority and needs review. label Apr 10, 2025
@seisman seisman requested a review from a team April 14, 2025 02:39
@seisman
Copy link
Member Author

seisman commented Apr 14, 2025

With PR #3905 merged, the output is:

$ git shortlog -sne --group=author --group=trailer:co-authored-by | head -n 15
  1489	Dongdong Tian <[email protected]>
   627	Wei Ji Leong <[email protected]>
   427	Yvonne Fröhlich <[email protected]>
   293	Michael Grund <[email protected]>
   291	dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
   258	Leonardo Uieda <[email protected]>
   237	Will Schlitzer <[email protected]>
   203	Max Jones <[email protected]>
    55	Jiayuan Yao <[email protected]>
    17	actions-bot <[email protected]>
    15	Liam Toney <[email protected]>
     7	yohaimagen <[email protected]>
     5	Jing-Hui Tong <[email protected]>
     3	Andre L. Belem <[email protected]>
     3	Tyler Newton <[email protected]>

@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Apr 14, 2025
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

Also need to update this line

last release (e.g., use `git shortlog HEAD...v0.4.0 -sne`).
to use the two dot version.

@seisman
Copy link
Member Author

seisman commented Apr 15, 2025

Also need to update this line

last release (e.g., use `git shortlog HEAD...v0.4.0 -sne`).

to use the two dot version.

It's already done (https://github.com/GenericMappingTools/pygmt/pull/3904/files)

Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

Oh yes it is, thanks!

@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Apr 15, 2025
@seisman seisman merged commit 16f30cb into main Apr 15, 2025
7 of 10 checks passed
@seisman seisman deleted the author-shortlog branch April 15, 2025 05:02
@seisman seisman mentioned this pull request Jun 13, 2025
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Take co-authoring contributions into consideration
4 participants