Skip to content

Take co-authoring contributions into consideration #3746

@seisman

Description

@seisman

Continue discussions in #3730 (comment).

Currently, we use the git shortlog -sne command to count author contributions. Below is a trimmed output on 2025/01/05:

  1054  Dongdong Tian <[email protected]>
   278  Yvonne Fröhlich <[email protected]>
   266  dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
   261  Wei Ji <[email protected]>
   256  Leonardo Uieda <[email protected]>
   192  Will Schlitzer <[email protected]>
   130  Michael Grund <[email protected]>
    68  Meghan Jones <[email protected]>
    33  Yao Jiayuan <[email protected]>
    30  Meghan Jones <[email protected]>
    16  Michael Grund <[email protected]>
    15  Liam Toney <[email protected]>

The GitHub contributors page (https://github.com/GenericMappingTools/pygmt/graphs/contributors) shows totally different numbers of commits, likely because GitHub also considers co-authorship. I feel these numbers (including the number of additions and deletions) make more sense.

To consider co-authorship, we can use the following command:

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

The output is:

  1396  Dongdong Tian <[email protected]>
   603  Wei Ji <[email protected]>
   398  Yvonne Fröhlich <[email protected]>
   266  dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
   258  Leonardo Uieda <[email protected]>
   256  Michael Grund <[email protected]>
   237  Will Schlitzer <[email protected]>
   129  Meghan Jones <[email protected]>
    53  Yao Jiayuan <[email protected]>
    45  Meghan Jones <[email protected]>
    22  Michael Grund <[email protected]>
    16  actions-bot <[email protected]>
    15  Liam Toney <[email protected]>
    14  Max Jones <[email protected]>
     8  Meghan Jones <[email protected]>
     7  Max Jones <[email protected]>
     7  Wei Ji <[email protected]>
     7  yohaimagen <[email protected]>
     5  Tong <[email protected]>
     4  TIAN Dongdong <[email protected]>
     4  Yvonne Fröhlich <[email protected]>
     3  Andre L. Belem <[email protected]>
     3  Dongdong Tian <[email protected]>

After merging the commits from the same author but with different git commit author names or emails, the numbers are the same as those of GitHub.

Currently, we count the contributions (using git shortlog -sne) in the following places (xref: https://github.com/GenericMappingTools/pygmt/blob/main/AUTHORSHIP.md):

  • Changelog for each release
  • Authorship on Zenodo archives of releases
  • Scientific publications (papers)

I think in all these cases, the co-authorship contributions should be considered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceBoring but important stuff for the core devs

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions