Skip to content
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

Update credits for 5.2.0 #9593

Merged
merged 6 commits into from
Apr 5, 2020
Merged

Update credits for 5.2.0 #9593

merged 6 commits into from
Apr 5, 2020

Conversation

rubenwardy
Copy link
Member

@rubenwardy rubenwardy commented Apr 4, 2020

The generation of the credits was automated using a script found in a comment below

Point system

An author gets:

  • 8 points for a code-changing commit above 1200 changes.
  • 4 points for a code-changing commit above 700 changes.
  • 2 points for a code-changing commit above 100 changes.
  • 1 point for any other code-changing commit.

A code-changing commit is one that changes at least one file with one of the following extensions: .cpp, .h, .lua, .cmake, .gradle, Makefile

Criteria for Active Contributors

Active contributors must have at least 3 points since 5.1.0.

This means that to appear in the credits as an "Active Contributor", since 5.1.0 you need to have either:

  • Made a commit with more than 700 changes
  • OR made 2 commits with more than 100 changes
  • OR made at least 3 commits

Criteria for Previous Contributors

Previous contributors must have at least 21 points all-time, and not be in the active contributors section.

This means that to appear in the credits as a "Previous Contributor", you need to have either:

  • 2 commit of 3000 lines, and 1 other commit.
  • OR 6 commits of 700 lines.
  • OR 11 commits of 100 lines.
  • OR made at least 21 commits.

@rubenwardy
Copy link
Member Author

I'm unsure what the requirements to be in "previous contributors" should be, and how to automate this

builtin/mainmenu/tab_credits.lua Outdated Show resolved Hide resolved
builtin/mainmenu/tab_credits.lua Outdated Show resolved Hide resolved
builtin/mainmenu/tab_credits.lua Outdated Show resolved Hide resolved
@rubenwardy rubenwardy added this to the 5.2.0 milestone Apr 4, 2020
@sfan5 sfan5 added Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements Blocker The issue needs to be addressed before the next release. labels Apr 4, 2020
@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Apr 4, 2020

I would be careful when droping people for “only” having contributed “fixes”.
Bugfixes can still require a lot of high-skill work when it's a complex, high-profile, non-trivial bug.
Not all bugfixes are created equal.
Look at what kind of bugfixes these people contributed.

Just my 5 cents.

@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Apr 4, 2020

BTW: I'm still an active translator for Minetest, it's just that Weblate did not update so far (translation files on Weblate need updating, as always). :P

@rubenwardy
Copy link
Member Author

rubenwardy commented Apr 4, 2020

I've modified the script I used to make it apply for all commits in the repository.

For previous contributors, I got to score 33, which is equal to 33 commits of less than 100 lines, 4 commits of 100 lines, 2 commits of 1000 lines, 1.1 commits of 3000 lines. This is for all-time of Minetest.

Here's a list of the contributors that have dropped off of active and previous contributors. (I've almost definitely made a mistake here)

"Diego Martínez (kaeza) <kaeza@users.sf.net>",
"neoascetic [OS X Fixes]",
"Guiseppe Bilotta (Oblomov) <guiseppe.bilotta@gmail.com> [Fixes]",
"matttpt <matttpt@gmail.com> [Fixes]",
"bigfoot547 [CSM]",
"DTA7 [Fixes, mute key]",
"Thomas-S [Disconnected, Formspecs]",
"noob3167 [Fixes]",
"adelcoding1 [Formspecs]",
"Esteban (EXio4) [Cleanups]",
"Vaughan Lapsley (vlapsley) [Carpathian mapgen]",
"CoderForTheBetter [Add set_rotation]",
"Gaël-de-Sailly [Mapgen, pitch fly]",
"zeuner [Docs, Fixes]",
"ThomasMonroe314 (tre) [Fixes]",
"Rob Blanckaert (basicer) [Fixes]",
"Jozef Behran (osjc) [Fixes]",
"Pedro Gimeno (pgimeno) [Fixes]",
"lisacvuk [Fixes]",
"Ezhh/Shara",

@rubenwardy rubenwardy marked this pull request as ready for review April 4, 2020 19:59
@rubenwardy
Copy link
Member Author

rubenwardy commented Apr 4, 2020

#!/bin/bash

OUT=$PWD
rm $OUT/results.txt

TMP=$PWD/tmp
mkdir -p $TMP
mkdir -p $TMP/emails
rm $TMP/*

merge() {
	echo Merging $1 into $2
	cat "$TMP/$1.dat" >> "$TMP/$2.dat"
	rm "$TMP/$1.dat"
}

cd ~/dev/minetest

entries=`git log --pretty=format:"%h	%an	%ae"` # "4e4fb4db2adcd0b3abd02cd6390b350b1129cc64..HEAD"`

echo "Gathering commit data..."

IFS=$'\n'
for line in $entries
do
	hash=$(echo "$line" | cut -f1)
	author=$(echo "$line" | cut -f2 | tr -dc '[:alnum:]\n\r' | tr '[:upper:]' '[:lower:]')
	email=$(echo "$line" | cut -f3)
	email_safe=$(echo "$email" | sed 's/@/.at./g' | tr -dc '[:alnum:].' | tr '[:upper:]' '[:lower:]')

	if [ -f "$TMP/emails/$email_safe.email" ]; then
		author=$(cat $TMP/emails/$email_safe.email | sed 's/^ *//;s/ *$//')
	fi
	echo $author > $TMP/emails/$email_safe.email

	commit=$(git show $hash --numstat --pretty=format:"")

	if echo $commit | grep -iq "\.cpp\|\.h\|\.lua\|\.cmake\|\.gradle\|Makefile"; then
		commit=$(echo "$commit" | sed 's/[^0-9\t ]*//g' | sed 's/[\t ]/\n/g' )
		lines=$(echo "$commit" | awk '{s+=$1} END {print s}')
		# echo $lines
		if (( $lines > 1200 )); then
			echo "8" >> "$TMP/$author.dat"
		elif (( $lines > 700 )); then
			echo "4" >> "$TMP/$author.dat"
		elif (( $lines > 100 )); then
			echo "2" >> "$TMP/$author.dat"
		else
			echo "1" >> "$TMP/$author.dat"
		fi
	fi
done || exit $?

merge you hybriddog
merge locblot loicblot
merge dnieljuhsz juhdanad
merge vitaliy numberzero
merge andrewward rubenwardy
merge paulouellette pauloue
merge jeanpatrickguerrero kilbith
merge vanessadannenberg vanessae
merge anands clobberxd
merge aukekok sofar
merge nathanalcourant ekdohibs
rm $TMP/translations.dat
rm $TMP/updatescript.dat

echo "Summing..."

cd $TMP
for filename in *.dat; do
	sum=$(awk '{s+=$1} END {print s}' "$filename")
	echo "$sum	$filename" >> $OUT/results.txt
done || exit $?

echo "Sorting..."

sort -gr $OUT/results.txt > $OUT/results_sorted.txt

@sfan5
Copy link
Member

sfan5 commented Apr 4, 2020

it's just that Weblate did not update so far (translation files on Weblate need updating, as always)

I updated those yesterday night.
In the German translation there were just two changed strings that were marked as fuzzy.

@rubenwardy
Copy link
Member Author

I would like to add a separate section for translators, to avoid lots of [Translations]. I'm not sure how to get a list, it's also past string freeze

@rubenwardy rubenwardy changed the title [WIP] Update credits for 5.2.0 Update credits for 5.2.0 Apr 4, 2020
@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Apr 4, 2020

Ah, so it looks like German was already moved back to 100% very fast, probably by sfan5. :D
I always assume that as long German is at 100%, Weblate was not updated already. :D But actually, the real indicator on Weblate to see whether the source strings are up-to-date is the red exclamation mark next to the resource. When it's there, it's outdated, when it's not there, it's up-to-date. It's not there anymore. Good.

Anyway, I'm still active translator because I occassionally fix typos when I run across them (rare). Otherwise, the German translation is finished and tried and tested, there's not much work to do anymore. :D I'm just saying it because I noticed my translator status was snatched away from me. xD

Although, it's not that of a big deal to me. But I wanted to give you a heads-up.

@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Apr 4, 2020

Hmmm, thinking about this: I think the process of dropping people from the credits entirely just because they contributed years ago isn't fair. It's also just factually wrong. If their contribution is still in the game, it still counts IMO. Dropping them would only be justified if their contribution was removed for some reason.

Maybe move those contributors that didn't make the cut into a separate text file and mention that file in the in-game credits. The section “previous contributors” is also misleading because it's not complete.

But that's a problem I noticed way too late, I guess. I'm assuming you have dropped past contributors from the credits in older releases as well? That would mean it could take a lot of work to piece together the full, TRUE credits. I'm predicting the true credits would be absolutely huge. :D

Just my 2 cents. It's not that I really care about this stuff to be honest, but since you are concerned about fairness, I wanted to share my thoughts about this.

@rubenwardy
Copy link
Member Author

rubenwardy commented Apr 4, 2020

How I've done it now is that time doesn't matter at all as to whether you appear in previous contributors - you just need to meet a threshold based on the heuristic documented in the first post

@rubenwardy
Copy link
Member Author

The much bigger problem is not crediting translators and documenters. Translations are excluded from the heuristic because they typically generate large numbers of commits. It makes sense to collect the names of translators separately to the names of other contributors for that reason, depending on how many there are they could all be credited

The heuristic should be changed to include md as a code file, that probably makes sense

@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Apr 4, 2020

Good point!

Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

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

Looks good.

@sfan5
Copy link
Member

sfan5 commented Apr 5, 2020

Crediting translators properly is something we'll look into for 5.3.0.

@sfan5 sfan5 merged commit 09b8f5d into minetest:master Apr 5, 2020
aldum pushed a commit to banyamesterseg/minetest that referenced this pull request Apr 16, 2020
@sfan5 sfan5 mentioned this pull request Feb 18, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker The issue needs to be addressed before the next release. Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements One approval ✅ ◻️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants