Skip to content

Commit 13e07ad

Browse files
authored
Merge pull request #55 from DE-RSE/contributor-rendering
Collect author information in a YAML file
2 parents 25d2be4 + 7280f52 commit 13e07ad

File tree

7 files changed

+144
-21
lines changed

7 files changed

+144
-21
lines changed

.github/workflows/paper.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-python@v4
16+
17+
- name: Install Python requirements
18+
run: pip install -r requirements.txt
19+
20+
- name: Create contributor snippet
21+
run: python contributors.py
1422

1523
- uses: xu-cheng/latex-action@v3
1624
with:

contributors.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env python3
2+
import jinja2
3+
import os
4+
import yaml
5+
6+
7+
with open("contributors.yml") as f:
8+
data = yaml.safe_load(f)
9+
10+
# Ensure that we have unique indices for the affiliations
11+
affiliations = list()
12+
for authors in data["authors"]:
13+
affiliations.extend(authors.get("affiliations", []))
14+
data["affiliations"] = {aff: i + 1 for i, aff in enumerate(set(affiliations))}
15+
for author in data["authors"]:
16+
author["affiliations"] = [data["affiliations"][aff] for aff in author.get("affiliations", [])]
17+
18+
env = jinja2.Environment(
19+
loader=jinja2.FileSystemLoader(os.getcwd()),
20+
keep_trailing_newline=True,
21+
)
22+
23+
with open("./contributors.tex", "w") as out:
24+
out.write(env.get_template("contributors.tex.j2").render(data=data))

contributors.tex

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
% The file contributors.tex is automatically generated by running contributors.py.
2+
% Changed within will be OVERWRITTEN.
3+
% For changes to the tex template, change contributors.tex.j2.
4+
% For changes to the author information, change contributors.yml.
5+
%
6+
\author[]{Markus Ankenbrand}
7+
\author[]{Bernd Flemisch}
8+
\author[5]{Florian Goth}
9+
\author[3]{Jean-Noël Grad}
10+
\author[2]{Dominic Kempf}
11+
\author[4]{Jan Linxweiler}
12+
\author[]{Axel Loewe}
13+
\author[1]{Frank Löffler}
14+
\author[1]{Philipp Matthias Schäfer}
15+
\author[]{Alexander Struck}
16+
\affil[1]{Competence Center Digital Research, Michael Stifel Center Jena, Friedrich Schiller University Jena, Jena, Germany}
17+
\affil[2]{Heidelberg University, Scientific Software Center, Germany}
18+
\affil[3]{Institute for Computational Physics, University of Stuttgart, Germany}
19+
\affil[4]{Technische Universität Braunschweig, Germany}
20+
\affil[5]{Institute for Theoretical Physics and Astrophysics, University of Würzburg, Germany}

contributors.tex.j2

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
% The file contributors.tex is automatically generated by running contributors.py.
2+
% Changed within will be OVERWRITTEN.
3+
% For changes to the tex template, change contributors.tex.j2.
4+
% For changes to the author information, change contributors.yml.
5+
%
6+
{%- for author in data.authors %}
7+
\author[{{ author.affiliations|join(", ") }}]{{ "{" }}{{ author.author }}{{ "}" }}
8+
{%- endfor %}
9+
{%- for affiliation, index in data.affiliations.items() %}
10+
\affil[{{ index }}]{{ "{" }}{{ affiliation }}{{ "}" }}
11+
{%- endfor %}

contributors.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
authors:
2+
- author: "Markus Ankenbrand"
3+
4+
- author: "Bernd Flemisch"
5+
6+
- author: "Florian Goth"
7+
firstName: Florian
8+
lastName: Goth
9+
initials: FG
10+
affiliations:
11+
- Institute for Theoretical Physics and Astrophysics, University of Würzburg, Germany
12+
orcid: 0000-0003-2707-4790
13+
14+
acknowledgements: |
15+
FG acknowledges funding from the Deutsche Forschungsgemeinschaft
16+
(DFG, German Research Foundation) through the SFB 1170 “Tocotronics”,
17+
project Z03 - project number \geprislink{258499086}.
18+
19+
- author: "Jean-Noël Grad"
20+
firstName: Jean-Noël
21+
lastName: Grad
22+
initials: JNG
23+
affiliations:
24+
- Institute for Computational Physics, University of Stuttgart, Germany
25+
orcid: 0000-0002-5821-4912
26+
27+
acknowledgements: |
28+
JNG acknowledges funding from the Deutsche Forschungsgemeinschaft
29+
(DFG, German Research Foundation) - project number \geprislink{391126171}
30+
(PI: Holm) and from the European Union – this work has received funding
31+
from the European High Performance Computing Joint Undertaking (JU) and
32+
countries participating in the project under grant agreement
33+
No [101093169](https://doi.org/10.3030/101093169).
34+
35+
- author: "Dominic Kempf"
36+
firstName: Dominic
37+
lastName: Kempf
38+
initials: DK
39+
affiliations:
40+
- Heidelberg University, Scientific Software Center, Germany
41+
orcid: 0000-0002-6140-2332
42+
43+
acknowledgements: |
44+
DK acknowledges support from the Scientific Software Center which is funded as part
45+
of the Excellence Strategy of the German Federal and State Governments.
46+
47+
- author: "Jan Linxweiler"
48+
firstName: Jan
49+
lastName: Linxweiler
50+
initials: JL
51+
affiliations:
52+
- Technische Universität Braunschweig, Germany
53+
orcid: 0000-0002-2755-5087
54+
55+
56+
- author: "Axel Loewe"
57+
58+
- author: "Frank Löffler"
59+
firstName: Frank
60+
lastName: Löffler
61+
initials: FL
62+
affiliations:
63+
- Competence Center Digital Research, Michael Stifel Center Jena, Friedrich Schiller University Jena, Jena, Germany
64+
orcid: 0000-0001-6643-6323
65+
66+
67+
- author: "Philipp Matthias Schäfer"
68+
firstName: Philipp Matthias
69+
lastName: Schäfer
70+
initials: PMS
71+
affiliations:
72+
- Competence Center Digital Research, Michael Stifel Center Jena, Friedrich Schiller University Jena, Jena, Germany
73+
orcid: 0000-0003-3931-6670
74+
75+
76+
- author: "Alexander Struck"

paper.tex

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
\documentclass[a4paper]{article}
2+
\usepackage{authblk}
23
\usepackage[]{biblatex}
34
\usepackage{graphicx}
45
\usepackage{hyperref}
@@ -11,27 +12,8 @@
1112
\addbibresource{bibliography.bib}
1213
\addbibresource{positionpaper.bib}
1314
\title{Establishing RSE departments in German research institutions}
14-
\author{
15-
Bernd Flemisch
16-
\and
17-
Florian Goth
18-
\and
19-
Dominic Kempf
20-
\and
21-
Jan Linxweiler
22-
\and
23-
Frank Löffler
24-
\and
25-
Philipp Schäfer
26-
\and
27-
Alexander Struck
28-
\and
29-
Axel Loewe
30-
\and
31-
Markus Ankenbrand
32-
\and
33-
Jean-Noël Grad
34-
}
15+
16+
\include{contributors.tex}
3517

3618
\date{\today}
3719

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jinja2
2+
pyaml

0 commit comments

Comments
 (0)