Skip to content

🤖 Add authors and contributors to Practice Exercises #964

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

Conversation

ErikSchierboom
Copy link
Member

@ErikSchierboom ErikSchierboom commented Mar 24, 2021

If you got tagged in this PR, it is because you are being credited for work you've done in the past on Exercism here, and we want to ensure you don't miss out on the recognition you deserve 🙂


With v3, we've introduced the idea of exercise authors and contributors. This information is stored in the exercises' .meta/config.json files (see the docs).

Concept Exercises, which are all new, already contain authors and contributors. Practice Exercises though are missing this information. In this PR, we attempt to populate the authors and contributors of Practice Exercises based on their commit history.

Maintainer TODO list

These are the things you, the maintainers, should do:

  • Check the authors and contributors, adding/removing users where the data is missing or incorrect
  • Double-check any renamed Practice Exercises
  • Check for Practice Exercises with missing authors, which are most likely due to the author not being on GitHub anymore
  • Add additional authors if you know that a Practice Exercise has actually been created by more than one author

For clarity, authors should be the people who originally created the exercise on this track. Contributors should be people who have substantially contributed to that exercise. PRs for typos or multiple-exercise PRs do not automatically mean someone should be considered a contributor to that exercise. Those non-exercise-specific contributions will get recognition through Exercism's reputation system in v3.

If you find something needs updating, just push a new commit to this PR.

Automatic Merging

We will automatically merge this PR before we launch v3, but will give the maximum time we can to maintainers to review it first.


The rest of this issue explains how this PR has been generated. You do not need to read it.

Algorithm

We start out by looking at the current Practice Exercises. For each Practice Exercise, we'll look at the commit history of its files to see which commits touched that Practice Exercise. How renames are handled is discussed in the "Renames" section later in this document.

Any commit that we can associate with a Practice Exercise is used to determine authorship/contributorship. Here is how we assign authorship/contributorship:

Authors

  1. Find the Git commit author of the oldest commit linked to that Practice Exercise.
  2. Find the GitHub username for the Git commit author of that commit
  3. Add the GitHub username of the Git commit author to the authors key in the .meta/config.json file

Contributors

  1. Find the Git commit authors and any co-authors of all but the oldest commit linked to that Practice Exercise. If there is only one commit, there won't be any contributors.
  2. Exclude the Git commit author and any co-authors of the oldest commit from the list of Git commit authors (an author is not also a contributor)
  3. Find the GitHub usernames for the Git commit authors and any co-authors of those commits
  4. Add the GitHub usernames of the Git commit authors and any co-authors to the contributor key in the .meta/config.json file

We're using the GitHub GraphQL API to find the username of a commit author and any co-authors. In some cases though, a username cannot be found for a commit (e.g. due to the user account no longer existing), in which case we'll skip the commit.

Renames

There are a small number of Practice Exercises that might have been renamed at some point. You can ask Git to "follow" a file over its renames using git log --follow <file>, which will also return commits made before renames. Unfortunately, Git does not store renames, it just stores the contents of the renamed files and tries to guess if a file was renamed by looking at its contents. This can (and will) lead to false positives, where Git will think a file has been renamed whereas it hasn't. As we don't want to have incorrect authors/contributors for exercises, we're ignoring renames. The only exception to this are known exercise renames:

  • bracket-push was renamed to matching-brackets
  • retree was renamed to satellite
  • resistor-colors was renamed to resistor-color-duo
  • kindergarden-garden was renamed to kindergarten-garden

If you know of a rename of a Practice Exercise, please check to see if its authors and contributors are correctly set.

Exclusions

There are some commits that we skip over, which thus don't influence the authors/contributors list:

  • Commits authored by dependabot[bot], dependabot-preview[bot] or github-actions[bot]
  • Bulk update PRs made by ErikSchierboom or kytrinx to update the track

Tracking

exercism/v3-launch#24


cc @abeger, @abo64, @alanvardy, @Alexhans, @alexkalderimis, @AndrewKvalheim, @andy5995, @artamonovkirill, @austinlyons, @Average-user, @b-mehta, @bartavelle, @beane, @bitfield, @bxt, @chastell, @chiroptical, @chivalry, @cjlarose, @cmcaine, @cmccandless, @CrowsVeldt, @danbst, @daniloisr, @dantho, @dbalmain, @dkinzer, @DmitrySamoylov, @Dysp, @ed359, @ee7, @eijynagai, @elyashiv, @eparovyshnaya, @ErikSchierboom, @etrepum, @felix91gr, @ffflorian, @gris, @guygastineau, @hamstap85, @hekrause, @hritchie, @iHiD, @insideoutclub, @Insti, @JavierGelatti, @jeeger, @jgilray, @jgr, @jitwit, @joshgoebel, @jrib, @jrp2014, @julianandrews, @jwg4, @karen-pal, @kevin-meyers, @khalilfazal, @Kobata, @kotp, @kytrinyx, @LarryRuane, @lpalma, @magthe, @mambocab, @marionebl, @MazeChaZer, @mjhoy, @mttakai, @N-Parsons, @navarrorc, @navossoc, @nicuveo, @omer-g, @ozan, @PatrickMcSweeny, @paulrex, @petemcfarlane, @petertseng, @pminten, @ppartarr, @qnikst, @rbasso, @robphoenix, @rpottsoh, @rsslldnphy, @samjonester, @Scientifica96, @sdublish, @sharno, @Sir4ur0n, @SiriusStarr, @sjakobi, @sjwarner-bp, @slava-sh, @soapie, @soniakeys, @sshine, @Stargator, @stesie, @stevejb71, @tejasbubane, @thalesmg, @TheBestJohn, @tiniuclx, @tofische, @towynlin, @tqa236, @tuxagon, @Twisol, @unmanbearpig, @workingjubilee, @yawpitch as you are referenced in this PR

@ErikSchierboom ErikSchierboom added the v3-migration 🤖 Preparing for Exercism v3 label Mar 24, 2021
@iHiD
Copy link
Member

iHiD commented Mar 24, 2021

I should be removed from the contributors on all these 🙂

@alanvardy
Copy link
Contributor

I should be removed from the contributors on all these

Please remove me as well 🙂

@cjlarose
Copy link
Contributor

My contributions all look correct. Thanks for the notice!

For each Practice Exercise, we've looked at the commit history of its files to see which commits touched that Practice Exercise.

Each commit that we could associate with a Practice Exercise was used to determine authorship/contributorship.

### Authors

1. Find the Git commit author of the oldest commit linked to that Practice Exercise
2. Find the GitHub username for the Git commit author of that commit
3. Add the GitHub username of the Git commit author to the `authors` key in the `.meta/config.json` file

### Contributors

1. Find the Git commit authors and any co-authors of all but the oldest commit linked to that Practice Exercise. If there is only one commit, there won't be any contributors.
1. Exclude the Git commit author and any co-authors of the oldest commit from the list of Git commit authors (an author is _not_ also a contributor)
2. Find the GitHub usernames for the Git commit authors and any co-authors of those commits
3. Add the GitHub usernames of the Git commit authors and any co-authors to the `contributor` key in the `.meta/config.json` file

We used the GitHub GraphQL API to find the username of a commit author or any co-authors. In some cases though, a username cannot be found for a commit (e.g. due to the user account no longer existing), in which case the commit was skipped.

## Renames

There are a small number of Practice Exercises that might have been renamed at some point. You can ask Git to "follow" a file over its renames using `git log --follow <file>`, which will also return commits made before renames. Unfortunately, Git does not store renames, it just stores the contents of the renamed files and tries to guess if a file was renamed by looking at its contents. This _can_ (and will) lead to false positives, where Git will think a file has been renamed whereas it hasn't. As we don't want to have incorrect authors/contributors for exercises, we're ignoring renames. The only exception to this are known exercise renames:

- `bracket-push` was renamed to `matching-brackets`
- `retree` was renamed to `satellite`
- `resistor-colors` was renamed to `resistor-color-duo`
- `kindergarden-garden` was renamed to `kindergarten-garden`

## Exclusions

There are some commits that we skipped over, and which thus didn't influence the authors/contributors list:

- Commits authored by `dependabot[bot]`, `dependabot-preview[bot]` or `github-actions[bot]`
- Bulk update PRs made by `ErikSchierboom` or `kytrinx` to update the track
@petertseng petertseng force-pushed the practice-exercise-authors-and-contributors branch from 563c61c to e3eb807 Compare June 10, 2021 21:56
Copy link
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

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

The view I will take, and the view based on which I approve this PR, is similar to the views under which fellow maintainers of a different track approved exercism/rust#1216.

My personal instinct is to be generous with attribution: if git says that someone has contributed to an exercise, I'm not interested in doing research to attempt to prove that their contribution was insubstantial. Over-attribution doesn't hurt us in any way.

Under this view, I think this PR is best accepted as-is.

@ErikSchierboom
Copy link
Member Author

This PR has been open for about 3 months. As having this PR merged is important to prepare this track for Exercism v3, we'll automatically merge this PR at the end of this week. If you need a little more time, convert this PR to a draft.

@iHiD iHiD merged commit ce79a22 into exercism:main Jul 2, 2021
@ErikSchierboom ErikSchierboom added the x:size/tiny Tiny amount of work label Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3-migration 🤖 Preparing for Exercism v3 x:size/tiny Tiny amount of work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants