Skip to content

[DOC,MNT] Add supporting devs to webpage and consolidate maintenance workflows #2797

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions .github/utilities/generate_developer_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
generate_authors_table.py
"""

import os
import sys
import time
from os import path
Expand All @@ -19,7 +20,7 @@
import requests

LOGO_URL = "https://avatars2.githubusercontent.com/u/78909809"
REPO_FOLDER = Path(path.abspath(__file__)).parent.parent
REPO_FOLDER = Path(path.abspath(__file__)).parent.parent.parent


def get(url, auth):
Expand Down Expand Up @@ -53,12 +54,14 @@ def get_contributors(auth):
iw_slug = "aeon-infrastructure-workgroup"
rmw = []
rmw_slug = "aeon-release-management-workgroup"
sd = []
sd_slug = "aeon-supporting-developers"

entry_point = "https://api.github.com/orgs/aeon-toolkit/"

for team_slug, lst in zip(
(cocw_slug, cw_slug, cd_slug, fw_slug, iw_slug, rmw_slug),
(cocw, cw, cd, fw, iw, rmw),
(cocw_slug, cw_slug, cd_slug, fw_slug, iw_slug, rmw_slug, sd_slug),
(cocw, cw, cd, fw, iw, rmw, sd),
):
for page in range(5): # 5 pages, 30 per page
reply = get(f"{entry_point}teams/{team_slug}/members?page={page}", auth)
Expand All @@ -71,6 +74,7 @@ def get_contributors(auth):
fw = {c["login"] for c in fw}
iw = {c["login"] for c in iw}
rmw = {c["login"] for c in rmw}
sd = {c["login"] for c in sd}

# get profiles from GitHub
cocw = [get_profile(login, auth) for login in cocw]
Expand All @@ -79,6 +83,7 @@ def get_contributors(auth):
fw = [get_profile(login, auth) for login in fw]
iw = [get_profile(login, auth) for login in iw]
rmw = [get_profile(login, auth) for login in rmw]
sd = [get_profile(login, auth) for login in sd]

# sort by last name
cocw = sorted(cocw, key=key)
Expand All @@ -87,6 +92,7 @@ def get_contributors(auth):
fw = sorted(fw, key=key)
iw = sorted(iw, key=key)
rmw = sorted(rmw, key=key)
sd = sorted(sd, key=key)

return (
cocw,
Expand All @@ -95,6 +101,7 @@ def get_contributors(auth):
fw,
iw,
rmw,
sd,
)


Expand Down Expand Up @@ -140,9 +147,11 @@ def generate_table(contributors):


if __name__ == "__main__":
print("access token:", file=sys.stderr) # noqa: T201
token = input()
auth = ("user", token)
auth = os.getenv("GITHUB_TOKEN")
if auth is None:
print("access token:", file=sys.stderr) # noqa: T201
token = input()
auth = ("user", token)

(
cocw,
Expand All @@ -151,6 +160,7 @@ def generate_table(contributors):
fw,
iw,
rmw,
sd,
) = get_contributors(auth)

with open(
Expand Down Expand Up @@ -190,3 +200,10 @@ def generate_table(contributors):
encoding="utf-8",
) as rst_file:
rst_file.write(generate_table(rmw))

with open(
REPO_FOLDER / "docs" / "about" / "supporting_developers.md",
"w+",
encoding="utf-8",
) as rst_file:
rst_file.write(generate_table(sd))
35 changes: 0 additions & 35 deletions .github/workflows/periodic_github_maintenace.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/precommit_autoupdate.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/scorecard.yml

This file was deleted.

133 changes: 133 additions & 0 deletions .github/workflows/weekly_github_maintenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Weekly GitHub Maintenance

on:
schedule:
# every Monday at 12:30 AM UTC
- cron: "30 0 * * 1"
workflow_dispatch:

jobs:
pre-commit-auto-update:
runs-on: ubuntu-24.04

steps:
- name: Checkout main
uses: actions/checkout@v4

- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- uses: browniebroke/[email protected]

- if: always()
name: Create app token
uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.PR_APP_ID }}
private-key: ${{ secrets.PR_APP_KEY }}

- if: always()
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: "Automated `pre-commit` hook update"
branch: pre-commit-hooks-update
title: "[MNT] Automated `pre-commit` hook update"
body: "Automated weekly update to `.pre-commit-config.yaml` hook versions."
labels: maintenance, full pre-commit, no changelog

teams-table-auto-update:
runs-on: ubuntu-24.04

steps:
- name: Checkout main
uses: actions/checkout@v4
with:
sparse-checkout: .github/utilities

- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Create app token
uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.PR_APP_ID }}
private-key: ${{ secrets.PR_APP_KEY }}

- name: Process comment edit
id: label_out
run: python .github/utilities/generate_developer_tables.py
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

- uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: "Automated teams tables update"
branch: webpage-teams-update
title: "[DOC] Automated website teams tables update"
body: "Automated weekly update to the website teams tables."
labels: documentation, no changelog

github-security-scorecard:
name: Scorecard analysis
runs-on: ubuntu-24.04
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Run analysis
uses: ossf/[email protected]
with:
results_file: results.sarif
results_format: sarif
publish_results: true

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SARIF file
path: results.sarif
retention-days: 5

- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif

stale_branches:
runs-on: ubuntu-24.04

steps:
- name: Create app token
uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.PR_APP_ID }}
private-key: ${{ secrets.PR_APP_KEY }}

- name: Stale Branches
uses: crs-k/[email protected]
with:
repo-token: ${{ steps.app-token.outputs.token }}
days-before-stale: 180
days-before-delete: 210
comment-updates: true
tag-committer: true
stale-branch-label: "stale branch"
compare-branches: "info"
pr-check: true
11 changes: 10 additions & 1 deletion docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,18 @@ The release management workgroup is responsible for managing the project's relea
```{include} about/release_management_workgroup.md
```

### Supporting Developers

Supporting developers have been provided write access to the main repository to aid
with package contributions and maintenance.

```{include} about/supporting_developers.md
```

### Core Developers

The core developers push forward `aeon`'s development and maintain the package.
Core developers push forward `aeon`'s development, maintain the package and build
our community.

```{include} about/core_developers.md
```
Expand Down
15 changes: 15 additions & 0 deletions docs/about/supporting_developers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Generated by generate_developer_table.py -->
<div class='aeon-teams-container'>
<div>
<a href='https://github.com/LinGinQiu'><img src='https://avatars.githubusercontent.com/u/80885865?v=4' class='avatar' /></a> <br />
<p><a href='https://github.com/LinGinQiu'>Chuanhang Qiu </a></p>
</div>
<div>
<a href='https://github.com/alexbanwell1'><img src='https://avatars.githubusercontent.com/u/31886108?v=4' class='avatar' /></a> <br />
<p><a href='https://github.com/alexbanwell1'>alexbanwell1</a></p>
</div>
<div>
<a href='https://github.com/pattplatt'><img src='https://avatars.githubusercontent.com/u/55019140?v=4' class='avatar' /></a> <br />
<p><a href='https://github.com/pattplatt'>Patrick</a></p>
</div>
</div>