Skip to content

Commit 110f52d

Browse files
committed
Merge branch 'main' into handle-todos
2 parents 5d8eae4 + 9f9903b commit 110f52d

File tree

10 files changed

+209
-62
lines changed

10 files changed

+209
-62
lines changed

.github/workflows/paper.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
- name: Install Python requirements
2121
run: pip install -r requirements.txt
2222

23+
- name: Install LaTeX requirements for matplotlib
24+
run: sudo apt install -y texlive-latex-base texlive-latex-extra cm-super-minimal texlive-fonts-extra
25+
2326
- name: Create contributor snippet
2427
run: python contributors.py
2528

@@ -29,8 +32,10 @@ jobs:
2932
- uses: xu-cheng/latex-action@v3
3033
with:
3134
root_file: paper.tex
35+
3236
- name: move
3337
run: mkdir -p github_artifacts && mv ${{ env.DIR }}/*.pdf ./github_artifacts/
38+
3439
- name: Upload pdf as artifact
3540
uses: actions/upload-artifact@v4
3641
with:

contributors.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,17 @@
1515
for author in data["authors"]:
1616
if 'affiliations' in author:
1717
affiliations.extend(author["affiliations"])
18-
data["affiliations"] = {aff: i + 1 for i, aff in enumerate(list(dict.fromkeys(affiliations)))}
18+
# make sure affiliations are not duplicated - here by checking for exact name string
19+
affiliations = list({aff['name']: aff for aff in affiliations}.values())
20+
21+
# create and add unique index and also a reverse lookup table
22+
data["affiliations"] = {i + 1: aff for i, aff in enumerate(affiliations)}
23+
aff_index_by_name = {aff['name']: i for i, aff in data["affiliations"].items()}
24+
25+
# attach index to authors
1926
for author in data["authors"]:
2027
if 'affiliations' in author:
21-
author["affiliations"] = [data["affiliations"][aff] for aff in author["affiliations"]]
28+
author["affiliations"] = [aff_index_by_name[aff['name']] for aff in author["affiliations"]]
2229

2330
env = jinja2.Environment(
2431
loader=jinja2.FileSystemLoader(os.getcwd()),

contributors.tex.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
{%- for author in data.authors %}
99
\author[​{% if author.affiliations %}{{ author.affiliations|join(", ") }}{% endif %}]{{ "{" }}{{ author.author }}{% if author.orcid is defined %}\texorpdfstring{\thinspace\orcidlink{ {{-author.orcid-}} }}{}{% endif %}{{ "}" }}
1010
{%- endfor %}
11-
{%- for affiliation, index in data.affiliations.items() %}
12-
\affil[{{ index }}]{{ "{" }}{{ affiliation }}{{ "}" }}
11+
{%- for index, affiliation in data.affiliations.items() %}
12+
\affil[{{ index }}]{{ "{" }}{{ affiliation.name }}{% if affiliation.ror is defined %}\texorpdfstring{\thinspace\rorlink{ {{-affiliation.ror-}} }} {}{% endif %}{{ "}" }}
1313
{%- endfor %}

contributors.yml

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ authors:
44
lastName: Ankenbrandt
55
initials: MJA
66
affiliations:
7-
- Center for Computational and Theoretical Biology, University of Würzburg, Germany
7+
- name: Center for Computational and Theoretical Biology, University of Würzburg, Germany
8+
ror: https://ror.org/00fbnyb24
89
orcid: 0000-0002-6620-807X
910

1011
- author: "Leyla Jael Castro"
1112
firstName: Leyla Jael
1213
lastName: Castro
1314
initials: LC
1415
affiliations:
15-
- Semantic Technologies team, ZB MED Information Centre for Life Sciences, Germany
16+
- name: Semantic Technologies team, ZB MED Information Centre for Life Sciences, Germany
17+
ror: https://ror.org/0259fwx54
1618
orcid: 0000-0003-3986-0510
1719
1820

@@ -21,7 +23,8 @@ authors:
2123
lastName: Caspart
2224
initials: RC
2325
affiliations:
24-
- Scientific Computing Center, Karlsruher Institut für Technologie, Germany
26+
- name: Scientific Computing Center, Karlsruher Institut für Technologie, Germany
27+
ror: https://ror.org/04t3en479
2528
orcid: 0000-0002-5502-9412
2629
tier: 1
2730

@@ -30,7 +33,8 @@ authors:
3033
lastName: Flemisch
3134
initials: BF
3235
affiliations:
33-
- Institute for Modelling Hydraulic and Environmental Systems, University of Stuttgart, Germany
36+
- name: Institute for Modelling Hydraulic and Environmental Systems, University of Stuttgart, Germany
37+
ror: https://ror.org/04vnq7t77
3438
orcid: 0000-0001-8188-620X
3539
3640
tier: 1
@@ -40,7 +44,8 @@ authors:
4044
lastName: Goth
4145
initials: FG
4246
affiliations:
43-
- Institute for Theoretical Physics and Astrophysics, University of Würzburg, Germany
47+
- name: Institute for Theoretical Physics and Astrophysics, University of Würzburg, Germany
48+
ror: https://ror.org/00fbnyb24
4449
orcid: 0000-0003-2707-4790
4550
4651
acknowledgements: |
@@ -54,7 +59,8 @@ authors:
5459
lastName: Grad
5560
initials: JNG
5661
affiliations:
57-
- Institute for Computational Physics, University of Stuttgart, Germany
62+
- name: Institute for Computational Physics, University of Stuttgart, Germany
63+
ror: https://ror.org/04vnq7t77
5864
orcid: 0000-0002-5821-4912
5965
6066
acknowledgements: |
@@ -73,7 +79,8 @@ authors:
7379
lastName: Hagdorn
7480
initials: MH
7581
affiliations:
76-
- Geschäftsbereich IT, Charité Universitätsmedizin Berlin, Germany
82+
- name: Geschäftsbereich IT, Charité Universitätsmedizin Berlin, Germany
83+
ror: https://ror.org/001w7jn25
7784
orcid: 0000-0002-5076-4864
7885
7986

@@ -82,7 +89,8 @@ authors:
8289
lastName: Kempf
8390
initials: DK
8491
affiliations:
85-
- Heidelberg University, Scientific Software Center, Germany
92+
- name: Heidelberg University, Scientific Software Center, Germany
93+
ror: https://ror.org/038t36y30
8694
orcid: 0000-0002-6140-2332
8795
8896
acknowledgements: |
@@ -95,7 +103,8 @@ authors:
95103
lastName: Linxweiler
96104
initials: JL
97105
affiliations:
98-
- Technische Universität Braunschweig, Germany
106+
- name: Technische Universität Braunschweig, Germany
107+
ror: https://ror.org/010nsgg66
99108
orcid: 0000-0002-2755-5087
100109
101110
tier: 1
@@ -105,7 +114,8 @@ authors:
105114
lastName: Loewe
106115
initials: AL
107116
affiliations:
108-
- Karlsruhre Institute of Technology (KIT)
117+
- name: Karlsruhre Institute of Technology (KIT)
118+
ror: https://ror.org/04t3en479
109119
orcid: 0000-0002-2487-4744
110120
111121

@@ -114,7 +124,8 @@ authors:
114124
lastName: Löffler
115125
initials: FL
116126
affiliations:
117-
- Competence Center Digital Research, Friedrich Schiller University Jena, Germany
127+
- name: Competence Center Digital Research, Friedrich Schiller University Jena, Germany
128+
ror: https://ror.org/05qpz1x62
118129
orcid: 0000-0001-6643-6323
119130
120131
tier: 1
@@ -124,7 +135,8 @@ authors:
124135
lastName: Schäfer
125136
initials: PMS
126137
affiliations:
127-
- Competence Center Digital Research, Friedrich Schiller University Jena, Germany
138+
- name: Competence Center Digital Research, Friedrich Schiller University Jena, Germany
139+
ror: https://ror.org/05qpz1x62
128140
orcid: 0000-0003-3931-6670
129141
130142
tier: 1
@@ -134,7 +146,8 @@ authors:
134146
lastName: Sommer
135147
initials: PS
136148
affiliations:
137-
- Institute of Carbon Cycles, Helmholtz Coastal Data Center, Helmholtz-Zentrum Hereon, Germany
149+
- name: Institute of Carbon Cycles, Helmholtz Coastal Data Center, Helmholtz-Zentrum Hereon, Germany
150+
ror: https://ror.org/03qjp1d79
138151
orcid: 0000-0001-6171-7716
139152
140153

@@ -143,7 +156,8 @@ authors:
143156
lastName: Speck
144157
initials: RS
145158
affiliations:
146-
- Jülich Supercomputing Centre, Forschungszentrum Jülich GmbH, Germany
159+
- name: Jülich Supercomputing Centre, Forschungszentrum Jülich GmbH, Germany
160+
ror: https://ror.org/02nv7yv05
147161
orcid: 0000-0002-3879-1210
148162
149163
tier: 1
@@ -153,7 +167,8 @@ authors:
153167
lastName: Struck
154168
initials: AS
155169
affiliations:
156-
- Cluster of Excellence Matters of Activity. Image Space Material at Humboldt-Universitaet zu Berlin
170+
- name: Cluster of Excellence Matters of Activity. Image Space Material at Humboldt-Universitaet zu Berlin
171+
ror: https://ror.org/01hcx6992
157172
orcid: 0000-0002-1173-9228
158173
159174
acknowledgements: |

group_composition_plot/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
**/*.pdf
2+
group_composition_plot_the_fantastic_four.labels
23
/submissions.volume

group_composition_plot/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ all: group_composition_plot_the_fantastic_four.pdf \
88
group_composition_plot_the_fantastic_four.pdf: submissions/2023-12-06/Friedrich_Schiller_University_Jena_2023-12-06_10-43-44.json \
99
submissions/2023-12-06/Scientific_Software_Center_2023-12-21_13-13-27.json \
1010
submissions/2023-12-06/University_of_Reading_2023-12-11_10-18-14.json \
11-
submissions/2023-12-06/Princeton_University_2023-11-29_18-33-21.json
12-
./group_composition_plot.py --legend --outfile $@ $^
11+
submissions/2023-12-06/Princeton_University_2023-11-29_18-33-21.json \
12+
group_composition_plot.py
13+
./group_composition_plot.py --legend --outfile $@ $(filter %.json,$^)
1314

1415
group_composition_plot_all.pdf: $(GOOD)
1516
./group_composition_plot.py --legend --outfile $@ $^

group_composition_plot/group_composition_plot.py

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
#!/usr/bin/env python3
22
import sys, argparse
3+
import matplotlib
4+
rc_params = {'text.usetex': True,
5+
'svg.fonttype': 'none',
6+
'text.latex.preamble': r'\usepackage{libertine}',
7+
'font.size': 14,
8+
'font.family': 'Linux Libertine',
9+
'mathtext.fontset': 'custom',
10+
'mathtext.rm': 'libertine',
11+
'mathtext.it': 'libertine:italic',
12+
'mathtext.bf': 'libertine:bold'
13+
}
14+
matplotlib.rcParams.update(rc_params)
315
import matplotlib.pyplot as plt
416
import json
517
from pprint import pprint
618

19+
720
def errorexit(msg='internal error', code=1):
821
print(msg, file=sys.stderr)
922
sys.exit(code)
@@ -42,25 +55,36 @@ def errorexit(msg='internal error', code=1):
4255
activity_to_color = {activity: colors[i] for i, activity in enumerate(activity_names)}
4356

4457
# Creating the joint plot
45-
scaling = .9
58+
scaling = 6
4659
iymax = (len(data)+1)//2
47-
fig = plt.figure(figsize=(scaling*16, scaling*9/2*iymax))
60+
fig = plt.figure(figsize=(scaling, scaling/2*iymax))
4861

4962
i = 1
63+
inst_names = {}
5064
for inst, idata in data.items():
5165
ax = fig.add_subplot(iymax, min(2, len(data)), i)
52-
ax.pie(idata['activity_weights'], colors=colors, startangle=140, shadow=True, radius=.8)
66+
ax.pie(idata['activity_weights'], colors=colors, startangle=90, shadow=True, radius=1)
5367
inst_name = idata['institution_name']
5468
if 'group_name' in idata:
55-
inst_name = idata['group_name'] + "\n" + inst_name
69+
inst_name = idata['group_name'] + ", " + inst_name
5670
if not args['hide_titles']:
57-
ax.set_title(inst_name, fontsize=20, y=-0.05)
71+
ax.set_title(chr(ord('a')-1+i), y=-0.05)
72+
inst_names[chr(ord('a')-1+i)] = inst_name
5873
i += 1
5974

6075
# Shared legend
6176
if args['legend']:
62-
fig.legend(activity_names, title="Activities", loc="center right", bbox_to_anchor=(1.2, 0.5), fontsize=20)
77+
legend = fig.legend(activity_names, title="Activities",
78+
loc="upper right", bbox_to_anchor=(1.4, .7), frameon=False)
79+
#nothing = matplotlib.patches.Rectangle((0,0), 1, 1, fill=False, edgecolor='none', visible=False)
80+
#legend_inst = plt.legend([nothing]*len(inst_names),
81+
# [i+": "+inst_name for i, inst_name in inst_names.items()],
82+
# loc="upper left", bbox_to_anchor=(-1.2, 0.0), frameon=False)
83+
#plt.gca().add_artist(legend_inst)
84+
with open(args['outfile'].replace('.pdf', '.labels'), 'w') as f:
85+
f.write(', '.join([i+": "+inst_name for i, inst_name in inst_names.items()]))
6386

6487
plt.tight_layout()
88+
fig.subplots_adjust(bottom=0)
6589
fig.savefig(args['outfile'], bbox_inches='tight')
6690
# plt.show()

0 commit comments

Comments
 (0)