mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-11-01 18:47:48 +00:00
chore: make sure commits authors are in th AUTHORS list
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com> Change-Id: I721957b59746738426f2356056c553d9876bcf22
This commit is contained in:
@@ -7,23 +7,26 @@ To learn how to contribute, please see CONTRIBUTING.md
|
|||||||
|
|
||||||
- Alessio Ferrari (Politecnico di Torino) <alessio.ferrari@polito.it>
|
- Alessio Ferrari (Politecnico di Torino) <alessio.ferrari@polito.it>
|
||||||
- Anders Lindgren (Telia Company) <Anders.X.Lindgren@teliacompany.com>
|
- Anders Lindgren (Telia Company) <Anders.X.Lindgren@teliacompany.com>
|
||||||
- Andrea D'Amico (Politecnico di Torino) <andrea.damico@polito.it>
|
- Andrea D'Amico (NEC) <adamico@nec-labs.com>
|
||||||
- Brian Taylor (Facebook) <briantaylor@fb.com>
|
- Brian Taylor (Facebook) <briantaylor@fb.com>
|
||||||
- David Boertjes (Ciena) <dboertje@ciena.com>
|
- David Boertjes (Ciena) <dboertje@ciena.com>
|
||||||
- Diego Landa (Facebook) <dlanda@fb.com>
|
- Diego Landa (Facebook) <dlanda@fb.com>
|
||||||
- Emmanuelle Delfour (Orange) <WEDE7391@orange.com>
|
- Emmanuelle Delfour (Orange) <WEDE7391@orange.com>
|
||||||
- Esther Le Rouzic (Orange) <esther.lerouzic@orange.com>
|
- Esther Le Rouzic (Orange) <esther.lerouzic@orange.com>
|
||||||
|
- Florian Frank (Orange) <florian1.frank@orange.com>
|
||||||
- Gabriele Galimberti (Cisco) <ggalimbe@cisco.com>
|
- Gabriele Galimberti (Cisco) <ggalimbe@cisco.com>
|
||||||
- Gert Grammel (Juniper Networks) <ggrammel@juniper.net>
|
- Gert Grammel (Juniper Networks) <ggrammel@juniper.net>
|
||||||
- Giacomo Borraccini (Politecnico di Torino) <giacomo.borraccini@polito.it>
|
- Giacomo Borraccini (NEC Laboratories America) <gborraccini@nec-labs.com>
|
||||||
- Gilad Goldfarb (Facebook) <giladg@fb.com>
|
- Gilad Goldfarb (Facebook) <giladg@fb.com>
|
||||||
- James Powell (Telecom Infra Project) <james.powell@telecominfraproject.com>
|
- James Powell (Telecom Infra Project) <james.powell@telecominfraproject.com>
|
||||||
- Jan Kundrát (Telecom Infra Project) <jkt@jankundrat.com>
|
- Jan Kundrát (Telecom Infra Project) <jkt@jankundrat.com>
|
||||||
- Jeanluc Augé (Orange) <jeanluc.auge@orange.com>
|
- Jeanluc Augé (Orange) <jeanluc.auge@orange.com>
|
||||||
|
- Jenny L'Escop (Orange) <jenny.lescop@orange.com>
|
||||||
- Jonas Mårtensson (RISE) <jonas.martensson@ri.se>
|
- Jonas Mårtensson (RISE) <jonas.martensson@ri.se>
|
||||||
- Mattia Cantono (Politecnico di Torino) <mattia.cantono@polito.it>
|
- Mattia Cantono (Politecnico di Torino) <mattia.cantono@polito.it>
|
||||||
- Miguel Garrich (University Catalunya) <miquel.garrich@upct.es>
|
- Miguel Garrich (University Catalunya) <miquel.garrich@upct.es>
|
||||||
- Raj Nagarajan (Lumentum) <raj.nagarajan@lumentum.com>
|
- Raj Nagarajan (Lumentum) <raj.nagarajan@lumentum.com>
|
||||||
|
- Renato Ambrosone (Politecnico di Torino) <renato.ambrosone@polito.it>
|
||||||
- Roberts Miculens (Lattelecom) <roberts.miculens@lattelecom.lv>
|
- Roberts Miculens (Lattelecom) <roberts.miculens@lattelecom.lv>
|
||||||
- Sami Alavi (NUST) <sami.mansooralavi1999@gmail.com>
|
- Sami Alavi (NUST) <sami.mansooralavi1999@gmail.com>
|
||||||
- Shengxiang Zhu (University of Arizona) <szhu@email.arizona.edu>
|
- Shengxiang Zhu (University of Arizona) <szhu@email.arizona.edu>
|
||||||
|
|||||||
52
tests/test_opensource_compliancy.py
Normal file
52
tests/test_opensource_compliancy.py
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# !/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
# testing commits compliancy
|
||||||
|
# Copyright (C) 2025 Telecom Infra Project and GNPy contributors
|
||||||
|
# see AUTHORS.rst for a list of contributors
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SRC_DIR = Path(__file__).parent.parent
|
||||||
|
|
||||||
|
|
||||||
|
def get_author_emails_from_file():
|
||||||
|
# Read AUTHOR.rst content
|
||||||
|
with open(SRC_DIR / 'AUTHORS.rst', 'r', encoding='utf-8') as f:
|
||||||
|
author_rst = f.read()
|
||||||
|
|
||||||
|
# Extract all author emails from AUTHOR.rst
|
||||||
|
return set(re.findall(r'<([^>]+)>', author_rst))
|
||||||
|
|
||||||
|
|
||||||
|
def get_commit_author_emails(since_days=None):
|
||||||
|
# Get list of commit authors, optionally limited to recent commits
|
||||||
|
cmd = ['git', 'log', '--pretty=format:%aE']
|
||||||
|
|
||||||
|
if since_days:
|
||||||
|
cmd.append(f'--since={since_days} days ago')
|
||||||
|
|
||||||
|
result = subprocess.run(
|
||||||
|
cmd,
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
stderr=subprocess.PIPE,
|
||||||
|
text=True
|
||||||
|
)
|
||||||
|
|
||||||
|
# Return unique emails from git log
|
||||||
|
return set(result.stdout.splitlines())
|
||||||
|
|
||||||
|
|
||||||
|
def test_commit_authors_in_author_rst():
|
||||||
|
author_emails = get_author_emails_from_file()
|
||||||
|
commit_emails = get_commit_author_emails(since_days=365)
|
||||||
|
allowed_missing = {'andrea.damico@polito.it'
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check that each commit author email is listed in AUTHOR.rst
|
||||||
|
missing_emails = commit_emails - author_emails - allowed_missing
|
||||||
|
|
||||||
|
assert not missing_emails, f"The following commit author emails are missing in AUTHOR.rst: {missing_emails}"
|
||||||
Reference in New Issue
Block a user