Skip to content

Commit c217ced

Browse files
authored
Merge pull request #116 from DE-RSE/fix-affiliation-ordering
fix the ordering of affiliations
2 parents e988c2d + 0a9edca commit c217ced

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contributors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
with open("contributors.yml") as f:
88
data = yaml.safe_load(f)
99

10+
# Sort by last name and contribution tier
11+
data["authors"] = list(sorted(sorted(data["authors"], key=lambda x: x["lastName"]), key=lambda x: x.get("tier", 2)))
12+
1013
# Ensure that we have unique indices for the affiliations
1114
affiliations = list()
1215
for author in data["authors"]:
@@ -17,9 +20,6 @@
1720
if 'affiliations' in author:
1821
author["affiliations"] = [data["affiliations"][aff] for aff in author["affiliations"]]
1922

20-
# Sort by last name and contribution tier
21-
data["authors"] = list(sorted(sorted(data["authors"], key=lambda x: x["lastName"]), key=lambda x: x.get("tier", 2)))
22-
2323
env = jinja2.Environment(
2424
loader=jinja2.FileSystemLoader(os.getcwd()),
2525
keep_trailing_newline=True,

0 commit comments

Comments
 (0)