diff --git a/content/teams.md b/content/teams.md index 2e8ddeb..0fdc896 100644 --- a/content/teams.md +++ b/content/teams.md @@ -15,6 +15,8 @@ Contributions of any kind are welcome! {{< include-html "static/teams/maintainers.html" >}} +{{< include-html "static/teams/emeritus-maintainers.html" >}} + {{< include-html "static/teams/maintainer-trainees.html" >}} {{< include-html "static/teams/contributors.html" >}} diff --git a/scripts/generate_teams.py b/scripts/generate_teams.py index f0f610e..ce0b5f5 100644 --- a/scripts/generate_teams.py +++ b/scripts/generate_teams.py @@ -7,19 +7,24 @@ import requests import string -# Current maintainers and maintainer trainees, hard-coded in alphabetical order +# A list of emeritus maintainers, current maintainers, and maintainer trainees +# hard-coded in alphabetical order + PYBAMM_MAINTAINERS = [ "brosaplanella", "martinjrobins", "priyanshuone6", "rtimms", "Saransh-cpp", - "Scottmar93", "tinosulzer", - "tlestang", "TomTranter", ] +PYBAMM_EMERITUS_MAINTAINERS = [ + "Scottmar93", + "tlestang", +] + PYBAMM_MAINTAINER_TRAINEES = [ "Afgr1087", "DrSOKane", @@ -46,6 +51,7 @@ def get_contributors(): for contributor in PYBAMM_CONTRIBUTORS # Exclude maintainers and maintainer trainees if contributor["login"] not in PYBAMM_MAINTAINERS + and contributor["login"] not in PYBAMM_EMERITUS_MAINTAINERS and contributor["login"] not in PYBAMM_MAINTAINER_TRAINEES # Exclude the pre-commit-ci and allcontributors bots and contributor["login"] != "pre-commit-ci[bot]" @@ -66,8 +72,23 @@ def get_maintainers(): } for maintainer in PYBAMM_CONTRIBUTORS if maintainer["login"] in PYBAMM_MAINTAINERS + if maintainer["login"] not in PYBAMM_EMERITUS_MAINTAINERS ] +def get_emeritus_maintainers(): + """ + Get the "login", "html_url", and "avatar_url" fields for each emeritus maintainer + from the list of emeritus maintainers. + """ + return [ + { + "login": emeritus_maintainer["login"], + "html_url": emeritus_maintainer["html_url"], + "avatar_url": emeritus_maintainer["avatar_url"], + } + for emeritus_maintainer in PYBAMM_CONTRIBUTORS + if emeritus_maintainer["login"] in PYBAMM_EMERITUS_MAINTAINERS + ] def get_maintainer_trainees(): """ @@ -92,7 +113,7 @@ def get_maintainer_trainees(): ] # The team name can be either of the following: -# maintainers, maintainer trainees, or contributors +# emeritus maintainers, maintainers, maintainer trainees, or contributors team_template = string.Template( """
@@ -129,7 +150,7 @@ def get_maintainer_trainees(): with open("static/teams/maintainers.html", "w") as file: file.write( team_template.substitute( - team_name="Maintainers (current and emeritus)", + team_name="Maintainers", members="\n".join( [ member_template.substitute( @@ -143,6 +164,25 @@ def get_maintainer_trainees(): ) ) +# Generate the HTML in static/teams/emeritus-maintainers.html, overwriting as necessary +print("Generating emeritus maintainers...") +with open("static/teams/emeritus-maintainers.html", "w") as file: + file.write( + team_template.substitute( + team_name="Emeritus Maintainers", + members="\n".join( + [ + member_template.substitute( + url=emeritus_maintainer["html_url"], + avatarUrl=emeritus_maintainer["avatar_url"], + name=emeritus_maintainer["login"], + ) + for emeritus_maintainer in get_emeritus_maintainers() + ] + ), + ) + ) + # Generate the HTML in static/teams/maintainer-trainees.html, overwriting as necessary print("Generating maintainer trainees...") with open("static/teams/maintainer-trainees.html", "w") as file: diff --git a/static/teams/emeritus-maintainers.html b/static/teams/emeritus-maintainers.html new file mode 100644 index 0000000..86283e8 --- /dev/null +++ b/static/teams/emeritus-maintainers.html @@ -0,0 +1,36 @@ + +
+

+ Emeritus Maintainers +

+ +
diff --git a/static/teams/maintainers.html b/static/teams/maintainers.html index fba9bf0..9eb6a01 100644 --- a/static/teams/maintainers.html +++ b/static/teams/maintainers.html @@ -1,7 +1,7 @@
-

- Maintainers (current and emeritus) +

+ Maintainers

@@ -47,20 +47,6 @@

- - -