Skip to content

Commit

Permalink
Merge pull request #116 from DE-RSE/fix-affiliation-ordering
Browse files Browse the repository at this point in the history
fix the ordering of affiliations
  • Loading branch information
knarrff authored Feb 13, 2025
2 parents e988c2d + 0a9edca commit c217ced
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 c217ced

Please sign in to comment.