diff --git a/contributors.py b/contributors.py index b1844dc..fc3dc55 100755 --- a/contributors.py +++ b/contributors.py @@ -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"]: @@ -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,