Skip to content

Commit d08c01b

Browse files
committed
make rfc_authors_from_working_group work with IRTF data
1 parent 4a43d64 commit d08c01b

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

bigbang/analysis/datatracker.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ def rfc_author_data(rfc, normalize = True):
5959
if normalize:
6060
affiliation = normalize_affiliation(affiliation)
6161

62+
if affiliation == "":
63+
affiliation = person.name
64+
6265
author = {
6366
"id": person.id,
6467
"country": author.country,
@@ -112,7 +115,21 @@ def rfc_authors_from_working_group(acr):
112115
else:
113116
print(f"No rfc data for {rfc}")
114117

115-
df = pd.DataFrame.from_records(author_records)
118+
if len(author_records) > 0 :
119+
df = pd.DataFrame.from_records(author_records)
120+
else:
121+
# IRTF groups don't have their RFCs listed in the same way.
122+
wg = dt.group_from_acronym(acr)
123+
rfcs = dt.documents(group=wg, doctype=dt.document_type_from_slug("rfc"))
124+
125+
for rfc_doc in rfcs:
126+
rfc = ri.rfc(rfc_doc.name.upper())
127+
128+
rfc_data = rfc_author_data(rfc)
129+
if rfc_data is not None:
130+
131+
authorship = authorship_from_rfc_data(rfc_data)
132+
author_records.extend(authorship)
116133

117134
return df
118135

@@ -268,4 +285,6 @@ def normalize_affiliation(affil):
268285
if lookup is not None:
269286
affil = lookup
270287

288+
affil = affil.strip() # in case there's an error there
289+
271290
return affil

0 commit comments

Comments
 (0)