Initialisation du repository de Beta

This commit is contained in:
Mathis 2026-02-06 22:23:20 +01:00
commit 14985f6dbb
9469 changed files with 1903273 additions and 0 deletions

View file

@ -0,0 +1,182 @@
""" Generate the AUTHORS.rst file from git commit history.
This module reads git commit logs and produces a formatted list of contributors
grouped by their contribution count, mapping email aliases and GitHub usernames.
"""
from dataclasses import dataclass
import math
import subprocess # noqa: S404
def main() -> None:
""" Generate and print the AUTHORS.rst content. """
contributors = get_git_contributors()
print_contributors(contributors)
# ------------------------------------------------------------------------------
EMAIL_ALIASES: dict[str, str | None] = {
# Maintainers.
"git@mikeboers.com": "github@mikeboers.com",
"mboers@keypics.com": "github@mikeboers.com",
"mikeb@loftysky.com": "github@mikeboers.com",
"mikeb@markmedia.co": "github@mikeboers.com",
"westernx@mikeboers.com": "github@mikeboers.com",
# Junk.
"mark@mark-VirtualBox.(none)": None,
# Aliases.
"a.davoudi@aut.ac.ir": "davoudialireza@gmail.com",
"tcaswell@bnl.gov": "tcaswell@gmail.com",
"xxr3376@gmail.com": "xxr@megvii.com",
"dallan@pha.jhu.edu": "daniel.b.allan@gmail.com",
"61652821+laggykiller@users.noreply.github.com": "chaudominic2@gmail.com",
}
CANONICAL_NAMES: dict[str, str] = {
"caspervdw@gmail.com": "Casper van der Wel",
"daniel.b.allan@gmail.com": "Dan Allan",
"mgoacolou@cls.fr": "Manuel Goacolou",
"mindmark@gmail.com": "Mark Reid",
"moritzkassner@gmail.com": "Moritz Kassner",
"vidartf@gmail.com": "Vidar Tonaas Fauske",
"xxr@megvii.com": "Xinran Xu",
}
GITHUB_USERNAMES: dict[str, str] = {
"billy.shambrook@gmail.com": "billyshambrook",
"daniel.b.allan@gmail.com": "danielballan",
"davoudialireza@gmail.com": "adavoudi",
"github@mikeboers.com": "mikeboers",
"jeremy.laine@m4x.org": "jlaine",
"kalle.litterfeldt@gmail.com": "litterfeldt",
"mindmark@gmail.com": "markreidvfx",
"moritzkassner@gmail.com": "mkassner",
"rush@logic.cz": "radek-senfeld",
"self@brendanlong.com": "brendanlong",
"tcaswell@gmail.com": "tacaswell",
"ulrik.mikaelsson@magine.com": "rawler",
"vidartf@gmail.com": "vidartf",
"willpatera@gmail.com": "willpatera",
"xxr@megvii.com": "xxr3376",
"chaudominic2@gmail.com": "laggykiller",
"wyattblue@auto-editor.com": "WyattBlue",
"Curtis@GreenKey.net": "dotysan",
}
@dataclass
class Contributor:
""" Represents a contributor with their email, names, and GitHub username. """
email: str
names: set[str]
github: str | None = None
commit_count: int = 0
@property
def display_name(self) -> str:
""" Return the formatted display name for the contributor.
Returns:
Comma-separated sorted list of contributor names.
"""
return ", ".join(sorted(self.names))
def format_line(self, bullet: str) -> str:
""" Format the contributor line for RST output.
Args:
bullet: The bullet character to use (- or *).
Returns:
Formatted RST line with contributor info.
"""
if self.github:
return (
f"{bullet} {self.display_name} <{self.email}>; "
f"`@{self.github} <https://github.com/{self.github}>`_"
)
return f"{bullet} {self.display_name} <{self.email}>"
def get_git_contributors() -> dict[str, Contributor]:
""" Parse git log and return contributors grouped by canonical email.
Returns:
Dictionary mapping canonical emails to Contributor objects.
"""
contributors: dict[str, Contributor] = {}
git_log = subprocess.check_output(
["git", "log", "--format=%aN,%aE"], # noqa: S607
text=True,
).splitlines()
for line in git_log:
name, email = line.strip().rsplit(",", 1)
canonical_email = EMAIL_ALIASES.get(email, email)
if not canonical_email:
continue
if canonical_email not in contributors:
contributors[canonical_email] = Contributor(
email=canonical_email,
names=set(),
github=GITHUB_USERNAMES.get(canonical_email),
)
contributor = contributors[canonical_email]
contributor.names.add(name)
contributor.commit_count += 1
for email, canonical_name in CANONICAL_NAMES.items():
if email in contributors:
contributors[email].names = {canonical_name}
return contributors
def print_contributors(contributors: dict[str, Contributor]) -> None:
"""Print contributors grouped by logarithmic order of commits.
Args:
contributors: Dictionary of contributors to print.
"""
print("""\
Contributors
============
All contributors (by number of commits):
""".replace(" ", ""))
sorted_contributors = sorted(
contributors.values(),
key=lambda c: (-c.commit_count, c.email),
)
last_order: int | None = None
block_index = 0
for contributor in sorted_contributors:
# This is the natural log, because of course it should be. ;)
order = int(math.log(contributor.commit_count))
if last_order and last_order != order:
block_index += 1
print()
last_order = order
# The '-' vs '*' is so that Sphinx treats them as different lists, and
# introduces a gap between them.
bullet = "-*"[block_index % 2]
print(contributor.format_line(bullet))
if __name__ == "__main__":
main()

View file

@ -0,0 +1,119 @@
Contributors
============
All contributors (by number of commits):
- Mike Boers <github@mikeboers.com>; `@mikeboers <https://github.com/mikeboers>`_
* WyattBlue <wyattblue@auto-editor.com>; `@WyattBlue <https://github.com/WyattBlue>`_
* Jeremy Lainé <jeremy.laine@m4x.org>; `@jlaine <https://github.com/jlaine>`_
- Mark Reid <mindmark@gmail.com>; `@markreidvfx <https://github.com/markreidvfx>`_
* Vidar Tonaas Fauske <vidartf@gmail.com>; `@vidartf <https://github.com/vidartf>`_
* laggykiller <chaudominic2@gmail.com>; `@laggykiller <https://github.com/laggykiller>`_
* Billy Shambrook <billy.shambrook@gmail.com>; `@billyshambrook <https://github.com/billyshambrook>`_
* Casper van der Wel <caspervdw@gmail.com>
* Philip de Nier <philipn@rd.bbc.co.uk>
* Tadas Dailyda <tadas@dailyda.com>
* Dave Johansen <davejohansen@gmail.com>
* JoeUgly <41972063+JoeUgly@users.noreply.github.com>
* Justin Wong <46082645+uvjustin@users.noreply.github.com>
* Mark Harfouche <mark.harfouche@gmail.com>
- Santtu Keskinen <santtu.keskinen@gmail.com>
- Alba Mendez <me@alba.sh>
- Curtis Doty <Curtis@GreenKey.net>; `@dotysan <https://github.com/dotysan>`_
- Xinran Xu <xxr@megvii.com>; `@xxr3376 <https://github.com/xxr3376>`_
- z-khan <zohaibkh_27@yahoo.com>
- Marc Mueller <30130371+cdce8p@users.noreply.github.com>
- Dan Allan <daniel.b.allan@gmail.com>; `@danielballan <https://github.com/danielballan>`_
- Moonsik Park <moonsik.park@estsoft.com>
- velsinki <40809145+velsinki@users.noreply.github.com>
- Christoph Rackwitz <christoph.rackwitz@gmail.com>
- David Plowman <david.plowman@raspberrypi.com>
- Alireza Davoudi <davoudialireza@gmail.com>; `@adavoudi <https://github.com/adavoudi>`_
- Jonathan Drolet <jonathan.drolet@riedel.net>
- Lukas Geiger <lukas.geiger94@gmail.com>
- Matthew Lai <m@matthewlai.ca>
- Moritz Kassner <moritzkassner@gmail.com>; `@mkassner <https://github.com/mkassner>`_
- Thomas A Caswell <tcaswell@gmail.com>; `@tacaswell <https://github.com/tacaswell>`_
- Ulrik Mikaelsson <ulrik.mikaelsson@magine.com>; `@rawler <https://github.com/rawler>`_
- Wel C. van der <wel@Physics.LeidenUniv.nl>
- Will Patera <willpatera@gmail.com>; `@willpatera <https://github.com/willpatera>`_
* zzjjbb <31069326+zzjjbb@users.noreply.github.com>
* Joe Schiff <41972063+JoeSchiff@users.noreply.github.com>
* Nils DEYBACH <68770774+ndeybach@users.noreply.github.com>
* Dexer <73297572+DexerBR@users.noreply.github.com>
* DE-AI <81620697+DE-AI@users.noreply.github.com>
* rutsh <Eugene.Krokhalev@gmail.com>
* Felix Vollmer <FelixVollmer@gmail.com>
* Santiago Castro <bryant1410@gmail.com>
* Christian Clauss <cclauss@me.com>
* Ihor Liubymov <ihor.liubymov@ring.com>
* Johannes Erdfelt <johannes@erdfelt.com>
* Karl Litterfeldt <kalle.litterfeldt@gmail.com>; `@litterfeldt <https://github.com/litterfeldt>`_
* Kim Minjong <make.dirty.code@gmail.com>
* Martin Larralde <martin.larralde@ens-cachan.fr>
* Simon-Martin Schröder <martin.schroeder@nerdluecht.de>
* Matteo Destro <matteo.est@gmail.com>
* Mattias Wadman <mattias.wadman@gmail.com>
* mephi42 <mephi42@gmail.com>
* Miles Kaufmann <mkfmnn@gmail.com>
* Nathan Goldbaum <nathan.goldbaum@gmail.com>
* Pablo Prietz <pablo@prietz.org>
* Andrew Wason <rectalogic@rectalogic.com>
* Radek Senfeld <rush@logic.cz>; `@radek-senfeld <https://github.com/radek-senfeld>`_
* robinechuca <serveurpython.oz@gmail.com>
* Benjamin Chrétien <2742231+bchretien@users.noreply.github.com>
* davidplowman <38045873+davidplowman@users.noreply.github.com>
* Hanz <40712686+HanzCEO@users.noreply.github.com>
* Kesh Ikuma <79113787+tikuma-lsuhsc@users.noreply.github.com>
* Artturin <Artturin@artturin.com>
* Ian Lee <IanLee1521@gmail.com>
* Ryan Huang <NPN@users.noreply.github.com>
* Arthur Barros <arthbarros@gmail.com>
* benedikt-grl <benedikt@getreallabs.com>
* Carlos Ruiz <carlos.r.domin@gmail.com>
* Carlos Ruiz <carlos.ruiz.dominguez@west.cmu.edu>
* Maxime Desroches <desroches.maxime@gmail.com>
* egao1980 <egao1980@gmail.com>
* Eric Kalosa-Kenyon <ekalosak@gmail.com>
* elxy <elxy@outlook.com>
* Gemfield <gemfield@civilnet.cn>
* henri-gasc <henri.gasc@eurecom.fr>
* Jonathan Martin <homerunisgood@hotmail.com>
* Johan Jeppsson Karlin <johjep@gmail.com>
* Kian-Meng Ang <kianmeng@cpan.org>
* Philipp Klaus <klaus@physik.uni-frankfurt.de>
* Marcell Pardavi <marcell.pardavi@gmail.com>
* Matteo Destro <matteo@cerrion.com>
* Max Ehrlich <max.ehr@gmail.com>
* Manuel Goacolou <mgoacolou@cls.fr>
* Julian Schweizer <neuneck@gmail.com>
* Nikhil Idiculla <nikhilidiculla@gmail.com>
* Ömer Sezgin Uğurlu <omer@ugurlu.org>
* Orivej Desh <orivej@gmx.fr>
* Philipp Krähenbühl <philkr@users.noreply.github.com>
* Mattia Procopio <promat85@gmail.com>
* ramoncaldeira <ramoncaldeira_328@hotmail.com>
* Roland van Laar <roland@rolandvanlaar.nl>
* Santiago Castro <sacastro@umich.edu>
* Kengo Sawatsu <seattleserv0@gmail.com>
* FirefoxMetzger <sebastian@wallkoetter.net>
* hyenal <sebastien.ehrhardt@gmail.com>
* Brendan Long <self@brendanlong.com>; `@brendanlong <https://github.com/brendanlong>`_
* Семён Марьясин <simeon@maryasin.name>
* Stephen.Y <stepheny@users.noreply.github.com>
* Tom Flanagan <theknio@gmail.com>
* Tim O'Shea <tim.oshea753@gmail.com>
* Tim Ahpee <timah@blackmagicdesign.com>
* Jonas Tingeborn <tinjon@gmail.com>
* Pino Toscano <toscano.pino@tiscali.it>
* Ulrik Mikaelsson <ulrikm@spotify.com>
* Vasiliy Kotov <vasiliy.kotov@itechart-group.com>
* Koichi Akabe <vbkaisetsu@gmail.com>
* David Joy <videan42@gmail.com>
* Sviatoslav Sydorenko (Святослав Сидоренко) <webknjaz@redhat.com>
* Jiabei Zhu <zjb@bu.edu>

View file

@ -0,0 +1,23 @@
Copyright retained by original committers. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the project nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.