Skip to content

🤖 Add authors and contributors to Practice Exercises #1055

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

EDIT BY @SleeplessByte: 👋🏽 this was merged. I did my best to make sure EVERYONE got their deserved credit. If you find that you didn't get it, please feel free to comment on this PR, or open a new issue and tag me directly. If you don't want that conversation to be public, feel free to grab my e-mail from my profile or reach me on slack.


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 @105ron, @AakashMallik, @abhnvgupta, @adamxtokyo, @alexashley, @amscotti, @andreasolund, @ankorGH, @apapirovski, @archanid, @arthurchipdean, @austinratcliff, @bdjnk, @BoDaly, @Boto1, @brendan-c, @brendanmckeown, @burennto, @chauchakching, @clockelliptic, @cmccandless, @cr0t, @d-vail, @DagmarTimmreck, @danielj-jordan, @daveyarwood, @designfrontier, @diego-caceres, @draalger, @drericrobinson, @ee7, @ErikSchierboom, @evelynstender, @felbit, @ffflorian, @Futuro212, @G-Rath, @gabriel376, @ganderzz, @gargrave, @gavinhenderson, @hayashi-ay, @hyuko21, @iagocavalcante, @iHiD, @IndelicateArgot, @ivanvotti, @javaeeeee, @jcshih, @JesseSingleton, @joeljuca, @joshgoebel, @jscheffner, @junedev, @komyg, @konni2020, @kytrinyx, @lantran, @laurmurclar, @LyleCharlesScott, @marocchino, @maruthimohan, @masters3d, @MattH-be, @matthewmorgan, @mgmatola, @mluisamc, @monte-hayward, @msomji, @nicholejeannine, @ntshcalleia, @OrthoDex, @ovidiu141, @PakkuDon, @paparomeo, @PatrickMcSweeny, @pawamoy, @petertseng, @PSalant726, @pyko, @ramadis, @ramitmittal, @rchavarria, @RobinCsl, @rpottsoh, @rsuttles58, @ryanplusplus, @saylerb, @Scientifica96, @seeksort, @serixscorpio, @skabbass1, @slaymance, @SleeplessByte, @smb26, @StevenACoffman, @tarunvelli, @tejasbubane, @tekerson, @thanhcng, @tikaro, @TomPradat, @trvrfrd, @Tyresius92, @Vankog, @WebCu, @whatcoda, @xarxziux, @yanick, @ZacharyRSmith, @zimmah as you are referenced in this PR

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
@ErikSchierboom ErikSchierboom added the v3-migration 🤖 Preparing for Exercism v3 label Mar 24, 2021
@tejasbubane

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@tejasbubane tejasbubane reopened this Mar 26, 2021
tejasbubane
tejasbubane previously approved these changes Mar 26, 2021
Copy link
Member

@SleeplessByte SleeplessByte left a comment

Choose a reason for hiding this comment

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

I see a lot of people listed who have not touched the exercise caused by the sync requirements. I will manually run over this ... when I have the time. Unless someone feels like doing it...

@SleeplessByte SleeplessByte dismissed tejasbubane’s stale review March 26, 2021 21:32

Dismissing so that we dont have an approval and this will NOT be auto merged by staff.

@SleeplessByte SleeplessByte added the do not merge 🚧 Don't merge until this label is removed label Mar 26, 2021
@SleeplessByte

This comment has been minimized.

@SleeplessByte SleeplessByte marked this pull request as draft March 26, 2021 21:46
@iHiD

This comment has been minimized.

@SleeplessByte

This comment has been minimized.

@SaschaMann

This comment has been minimized.

@SleeplessByte
Copy link
Member

cc @joeljuca, @joshgoebel, @jscheffner, @junedev, @komyg, @konni2020, @kytrinyx, @lantran, @laurmurclar, @LyleCharlesScott, @marocchino, @maruthimohan, @masters3d, @MattH-be, @matthewmorgan, @mgmatola, @mluisamc, @monte-hayward, @msomji, @nicholejeannine, @ntshcalleia, @OrthoDex, @ovidiu141, @PakkuDon, @paparomeo, @PatrickMcSweeny, @pawamoy, @petertseng, @PSalant726, @pyko, @ramadis, @ramitmittal, @rchavarria, @RobinCsl, @rpottsoh, @rsuttles58, @ryanplusplus, @saylerb, @Scientifica96, @seeksort, @serixscorpio, @skabbass1, @slaymance, @SleeplessByte, @smb26, @StevenACoffman, @tarunvelli, @tejasbubane, @tekerson, @thanhcng

See first post. You're only tagged because you have contributed to this track in the past (YAY, thank you!) and we want to make sure everyone gets credit where credit is due.

@SleeplessByte
Copy link
Member

cc @tikaro, @TomPradat, @trvrfrd, @Tyresius92, @Vankog, @WebCu, @whatcoda, @xarxziux, @yanick, @ZacharyRSmith, @zimmah.

See first post. You're only tagged because you have contributed to this track in the past (YAY, thank you!) and we want to make sure everyone gets credit where credit is due.

@ErikSchierboom

This comment has been minimized.

@SleeplessByte

This comment has been minimized.

@ErikSchierboom

This comment has been minimized.

@SleeplessByte

This comment has been minimized.

@SleeplessByte

This comment has been minimized.

@joeljuca
Copy link
Contributor

This work of rewarding contributors for their efforts is really awesome! It's been a while since I last contributed to something on Exercism, but it definitely makes me feel motivated to come back to it!

This community is awesome! ❤️

@ErikSchierboom
Copy link
Member Author

ErikSchierboom commented Mar 30, 2021

To try and not make cross-wide exercise commits result in someone contributing to all exercises, I've just pushed a commit that does the following:

  • Use the original algorithm to figure out which commits are linked to which exercises
  • Filter the list of commits to only those commits that either:
    • Update less than 10 exercises, or
    • Update less than the total number of exercises
  • Use the filtered commits to determine the contributors

The main benefit of this algorithm is that there is no special handling of files, so I don't have to create a blocklist for the files that are not allowed. As such, the above algorithm also detects exercise-wide changes to files like babel.config.js or .npmrc.

Running the above algorithm resulted in this commit, which does indeed remove quite some contributors. Could someone check if the results look to be valid?

@Tyresius92

This comment has been minimized.

@ErikSchierboom

This comment has been minimized.

@SleeplessByte

This comment has been minimized.

@ErikSchierboom

This comment has been minimized.

@ErikSchierboom

This comment has been minimized.

@SleeplessByte

This comment has been minimized.

@ErikSchierboom

This comment has been minimized.

@tejasbubane

This comment has been minimized.

@ErikSchierboom ErikSchierboom force-pushed the practice-exercise-authors-and-contributors branch from d56fb9a to 19cabe1 Compare March 31, 2021 06:51
- README.md
- package.json
- package-lock.json
- .eslintrc
- .npmrc
- babel.config.js
- LICENSE
@ErikSchierboom
Copy link
Member Author

@SleeplessByte I've replaced the commit I pushed yesterday with a new version that worked on the files suggested: a5fbfc1

This time, @Tyresius92 is still the author of dnd-character, so that was fixed.

@SleeplessByte

This comment has been minimized.

@matthewmorgan
Copy link
Contributor

Thanks for working so hard on this all. I have to confess I worked on this track for long enough that I don't recall exactly which exercises I implemented as which I didn't. There were several, for sure, and @rchavarria was at that point the other major contributor. ❤️ 😄

@SleeplessByte
Copy link
Member

SleeplessByte commented Mar 31, 2021

@matthewmorgan we're just going to give you two almost all the author credit ;)

@SleeplessByte

This comment has been minimized.

@SleeplessByte SleeplessByte marked this pull request as ready for review April 2, 2021 18:31
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@SleeplessByte SleeplessByte merged commit cd2fbd7 into exercism:main Apr 2, 2021
@Tyresius92
Copy link
Contributor

@Tyresius92 we (Erik) fixed it!

image

Thanks!

@SleeplessByte SleeplessByte removed the do not merge 🚧 Don't merge until this label is removed label Apr 7, 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.

8 participants