Skip to content

Commit

Permalink
fix the ordering of affiliations, such that the first author is refer…
Browse files Browse the repository at this point in the history
…s to the first affiliation
  • Loading branch information
berndflemisch committed Feb 13, 2025
1 parent d678ec5 commit 0a9edca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contributors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
with open("contributors.yml") as f:
data = yaml.safe_load(f)

# Sort by last name and contribution tier
data["authors"] = list(sorted(sorted(data["authors"], key=lambda x: x["lastName"]), key=lambda x: x.get("tier", 2)))

# Ensure that we have unique indices for the affiliations
affiliations = list()
for author in data["authors"]:
Expand All @@ -17,9 +20,6 @@
if 'affiliations' in author:
author["affiliations"] = [data["affiliations"][aff] for aff in author["affiliations"]]

# Sort by last name and contribution tier
data["authors"] = list(sorted(sorted(data["authors"], key=lambda x: x["lastName"]), key=lambda x: x.get("tier", 2)))

env = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.getcwd()),
keep_trailing_newline=True,
Expand Down

0 comments on commit 0a9edca

Please sign in to comment.