Skip to content

Commit

Permalink
generate listing of bep leads
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Jun 13, 2024
1 parent c0f4bda commit 561f2f6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ docs/faq/faq*.md
.bundle/
.ruby-version
Gemfile.lock
vendor/
vendor/

bep_leads.tsv
11 changes: 2 additions & 9 deletions tools/bep_gantt_html_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,21 @@
from __future__ import annotations

from datetime import datetime
from pathlib import Path

import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
from pyzotero import zotero
from ruamel.yaml import YAML

from .utils import data_dir, root_dir

INCLUDE_PATCHES = False
START_DATE = "2014-10"
DATE_FORMAT = "%Y-%m"
Y_AXIS_VALUE = ""


def root_dir() -> Path:
return Path(__file__).parent.parent


def data_dir() -> Path:
return root_dir() / "_data"


def create_bep_timeline() -> type[go.Figure]:
completd_beps = data_dir() / "beps_completed.yml"

Expand Down
23 changes: 23 additions & 0 deletions tools/list_bep_leads.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""List the emails of the leader of each BEP."""

import pandas as pd
from ruamel.yaml import YAML
from utils import data_dir

beps = data_dir() / "beps.yml"

with open(beps, "r") as f:
yaml = YAML(typ="safe", pure=True)
data = yaml.load(f)

output = {"bep": [], "lead": [], "email": []}

for bep in data:
for lead in bep["leads"]:
output["bep"].append(f'{bep["number"]} - {bep["title"]}')
output["lead"].append(f'{lead["name"]}')
output["email"].append(f'{lead["email"]}')

df = pd.DataFrame(output)

df.to_csv("bep_leads.tsv", sep="\t", index=False)
6 changes: 4 additions & 2 deletions tools/no-bad-latin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# https://github.com/alan-turing-institute/the-turing-way/blob/af98c94/tests/no-bad-latin.py

import argparse
import fnmatch
import os
import re
import fnmatch

from pull_files import filter_files

Expand Down Expand Up @@ -113,7 +113,9 @@ def read_and_check_files(files):
]

for filename in files:
if True in [fnmatch.fnmatch(filename, pattern) for pattern in IGNORE_LIST]:
if True in [
fnmatch.fnmatch(filename, pattern) for pattern in IGNORE_LIST
]:
pass
else:
try:
Expand Down

0 comments on commit 561f2f6

Please sign in to comment.