Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions contributors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,23 @@
import os
import yaml

CORRESPONDING_AUTHOR = "Kempf"

with open("contributors.yml") as f:
data = yaml.safe_load(f)

# sort list of authors by last name
sorted_authors = sorted(data["authors"], key=lambda a: a["lastName"])
# and move corresponding author to front of the list
idx = None
for i, a in enumerate(sorted_authors):
if a["lastName"] == CORRESPONDING_AUTHOR:
idx = i
break
if idx is not None:
sorted_authors.insert(0, sorted_authors.pop(idx))
data["authors"] = sorted_authors

# Ensure that we have unique indices for the affiliations
affiliations = list()
for author in data["authors"]:
Expand Down
2 changes: 2 additions & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ authors:
email: [email protected]

- author: "Axel Loewe"
firstName: Axel
lastName: Loewe

- author: "Frank Löffler"
firstName: Frank
Expand Down
Loading