diff mbox series

[FFmpeg-devel] Add general_assembly_bootstrap.pl

Message ID 20200424102232.45851-1-josh@itanimul.li
State New
Headers show
Series [FFmpeg-devel] Add general_assembly_bootstrap.pl | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Josh Dekker April 24, 2020, 10:22 a.m. UTC
This script aims to extract contributors who are eligible for the
general assembly.

Signed-off-by: Josh de Kock <josh@itanimul.li>
---

 Better late than never, this patch will continue to put in place the
 voting systems for FFmpeg discussed at VDD 2019 and FOSDEM 2020.
 There is probably a better way to do this, but the aim is just to
 'bootstrap' and kickstart the process and commitees.

 tools/general_assembly_bootstrap.pl | 48 +++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100755 tools/general_assembly_bootstrap.pl

Comments

Nicolas George April 24, 2020, 10:29 a.m. UTC | #1
Josh de Kock (12020-04-24):
> This script aims to extract contributors who are eligible for the
> general assembly.
> 
> Signed-off-by: Josh de Kock <josh@itanimul.li>
> ---
> 
>  Better late than never, this patch will continue to put in place the
>  voting systems for FFmpeg discussed at VDD 2019 and FOSDEM 2020.
>  There is probably a better way to do this, but the aim is just to
>  'bootstrap' and kickstart the process and commitees.

Since it is only useful once, is there a point in having it in the tree?

Regards,
Josh Dekker April 24, 2020, 10:44 a.m. UTC | #2
On 24/04/2020 11:29, Nicolas George wrote:
> Josh de Kock (12020-04-24):
>> This script aims to extract contributors who are eligible for the
>> general assembly.
>>
>> Signed-off-by: Josh de Kock <josh@itanimul.li>
>> ---
>>
>>   Better late than never, this patch will continue to put in place the
>>   voting systems for FFmpeg discussed at VDD 2019 and FOSDEM 2020.
>>   There is probably a better way to do this, but the aim is just to
>>   'bootstrap' and kickstart the process and commitees.
> 
> Since it is only useful once, is there a point in having it in the tree?
> 
There is no particular need for it to stay in the tree. Regardless, I 
wanted to send it to the mailing list to avoid any complications vs if I 
had just sent the output of the script (so that it can be reviewed and 
tested by others).

My suggestion would be to actually commit it and then remove it later 
when we have another system properly setup so that it is in git history.
Josh Dekker April 29, 2020, 11:51 a.m. UTC | #3
On 24/04/2020 11:44, Josh de Kock wrote:
> On 24/04/2020 11:29, Nicolas George wrote:
>> Josh de Kock (12020-04-24):
>>> This script aims to extract contributors who are eligible for the
>>> general assembly.
>>>
>>> Signed-off-by: Josh de Kock <josh@itanimul.li>
>>> ---
>>>
>>>   Better late than never, this patch will continue to put in place the
>>>   voting systems for FFmpeg discussed at VDD 2019 and FOSDEM 2020.
>>>   There is probably a better way to do this, but the aim is just to
>>>   'bootstrap' and kickstart the process and commitees.
>>
>> Since it is only useful once, is there a point in having it in the tree?
>>
> There is no particular need for it to stay in the tree. Regardless, I 
> wanted to send it to the mailing list to avoid any complications vs if I 
> had just sent the output of the script (so that it can be reviewed and 
> tested by others).
> 
> My suggestion would be to actually commit it and then remove it later 
> when we have another system properly setup so that it is in git history.
> 

Ping for further comments. This will affect all developers.
Anton Khirnov April 29, 2020, 12:53 p.m. UTC | #4
Quoting Nicolas George (2020-04-24 12:29:23)
> Josh de Kock (12020-04-24):
> > This script aims to extract contributors who are eligible for the
> > general assembly.
> > 
> > Signed-off-by: Josh de Kock <josh@itanimul.li>
> > ---
> > 
> >  Better late than never, this patch will continue to put in place the
> >  voting systems for FFmpeg discussed at VDD 2019 and FOSDEM 2020.
> >  There is probably a better way to do this, but the aim is just to
> >  'bootstrap' and kickstart the process and commitees.
> 
> Since it is only useful once, is there a point in having it in the tree?

Why would it only be useful once? I thought we'd use the same procedure
for every vote.
Nicolas George April 29, 2020, 1 p.m. UTC | #5
Anton Khirnov (12020-04-29):
> > >  Better late than never, this patch will continue to put in place the
> > >  voting systems for FFmpeg discussed at VDD 2019 and FOSDEM 2020.
> > >  There is probably a better way to do this, but the aim is just to
> > >  'bootstrap' and kickstart the process and commitees.
        ^^^^^^^^^
> > Since it is only useful once, is there a point in having it in the tree?
> Why would it only be useful once? I thought we'd use the same procedure
> for every vote.

We did not yet agree on the procedure for all votes, AFAIK, we only
agreed on the procedure for the first vote. Having a procedure already
implemented and in the official Git source tree would be pretty
disloyal.

Regards,
Josh Dekker April 29, 2020, 1:06 p.m. UTC | #6
On 29/04/2020 14:00, Nicolas George wrote:
> Anton Khirnov (12020-04-29):
>>>>   Better late than never, this patch will continue to put in place the
>>>>   voting systems for FFmpeg discussed at VDD 2019 and FOSDEM 2020.
>>>>   There is probably a better way to do this, but the aim is just to
>>>>   'bootstrap' and kickstart the process and commitees.
>          ^^^^^^^^^
>>> Since it is only useful once, is there a point in having it in the tree?
>> Why would it only be useful once? I thought we'd use the same procedure
>> for every vote.
> 
> We did not yet agree on the procedure for all votes, AFAIK, we only
> agreed on the procedure for the first vote. Having a procedure already
> implemented and in the official Git source tree would be pretty
> disloyal.
> 

To add to this:

We could decide to use this every time, but that would have to be done 
by a vote. But we can't vote on that with nothing, so hence we have this 
to begin somewhere.

The community and technical committees will be decided by the 
bootstrapped general assembly, along with formalising the voting 
procedures and processes. Going forward from there it should be a pretty 
simple case of just continuing the methods which were chosen.
Nicolas George April 29, 2020, 1:10 p.m. UTC | #7
Josh de Kock (12020-04-29):
> To add to this:
> 
> We could decide to use this every time, but that would have to be done by a
> vote. But we can't vote on that with nothing, so hence we have this to begin
> somewhere.
> 
> The community and technical committees will be decided by the bootstrapped
> general assembly, along with formalising the voting procedures and
> processes. Going forward from there it should be a pretty simple case of
> just continuing the methods which were chosen.

Indeed. If using the commit count is one of the option on the ballot,
then we must have access to the exact implementation to vote: your code
must be present on the ballot, or as an annex to the ballot. The
mailing-list archives are a reasonable place.

But not in the official tree, not before the vote.

But for the record, I think that using this code for the bootstrap is a
good idea, but using an automatic commit count for future evolutions is
a bad idea.

Regards,
diff mbox series

Patch

diff --git a/tools/general_assembly_bootstrap.pl b/tools/general_assembly_bootstrap.pl
new file mode 100755
index 0000000000..320fe76992
--- /dev/null
+++ b/tools/general_assembly_bootstrap.pl
@@ -0,0 +1,48 @@ 
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+use Encode qw(decode);
+use List::MoreUtils qw(uniq);
+# cpan List::MoreUtils
+use JSON::MaybeXS;
+# cpan JSON::MaybeXS
+
+use Data::Dumper;
+
+sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
+
+my @shortlog = split /\n/, decode('UTF-8', `git shortlog -sne --since="last 36 months"`, Encode::FB_CROAK);
+
+my %assembly = ();
+
+foreach my $line (@shortlog) {
+    my ($count, $name, $email) = $line =~ m/^ *(\d+) *(.*?) <(.*?)>/;
+
+    if ($count < 20) {
+        next;
+    }
+
+    # make sure name is trimmed
+    $name = trim $name;
+
+    # assume people with 50 commits have at least 20 source commits
+    if ($count < 50) {
+        my $true = 0;
+        my @commits = split /(^|\n)commit [a-z0-9]{40}(\n|$)/, decode('UTF-8', `git log --name-only --use-mailmap --author="$email" --since="last 36 months"`, Encode::FB_CROAK);
+        foreach my $commit (@commits) {
+            if ($commit =~ /\n[\w\/]+\.(c|h|S|asm)/) {
+                $true++;
+            }
+        }
+
+        if ($true < 20) {
+            next;
+        }
+    }
+
+    $assembly{$name} = $email;
+}
+
+print encode_json(\%assembly);