Skip to content

Commit

Permalink
make rfc_authors_from_working_group work with IRTF data
Browse files Browse the repository at this point in the history
  • Loading branch information
sbenthall committed Dec 9, 2024
1 parent 4a43d64 commit d08c01b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion bigbang/analysis/datatracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ def rfc_author_data(rfc, normalize = True):
if normalize:
affiliation = normalize_affiliation(affiliation)

if affiliation == "":
affiliation = person.name

author = {
"id": person.id,
"country": author.country,
Expand Down Expand Up @@ -112,7 +115,21 @@ def rfc_authors_from_working_group(acr):
else:
print(f"No rfc data for {rfc}")

df = pd.DataFrame.from_records(author_records)
if len(author_records) > 0 :
df = pd.DataFrame.from_records(author_records)
else:
# IRTF groups don't have their RFCs listed in the same way.
wg = dt.group_from_acronym(acr)
rfcs = dt.documents(group=wg, doctype=dt.document_type_from_slug("rfc"))

for rfc_doc in rfcs:
rfc = ri.rfc(rfc_doc.name.upper())

rfc_data = rfc_author_data(rfc)
if rfc_data is not None:

authorship = authorship_from_rfc_data(rfc_data)
author_records.extend(authorship)

return df

Expand Down Expand Up @@ -268,4 +285,6 @@ def normalize_affiliation(affil):
if lookup is not None:
affil = lookup

affil = affil.strip() # in case there's an error there

return affil

0 comments on commit d08c01b

Please sign in to comment.