Skip to content

Commit a192f65

Browse files
authored
Merge branch 'main' into issue_15_contribution_sis_eth_zurich
2 parents c1f45eb + 0a3a06e commit a192f65

File tree

48 files changed

+1370
-405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1370
-405
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:

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,4 +298,6 @@ TSWLatexianTemp*
298298
# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib
299299
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
300300
# Uncomment the next line to have this generated file ignored.
301-
#*Notes.bib
301+
#*Notes.bib
302+
303+
paper.pdf

bibliography.bib

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,13 +1424,15 @@ @Misc{DFG_50_01
14241424
urldate = {2023-11-14},
14251425
}
14261426

1427-
@misc{dfg_gsp,
1428-
author = {Deutsche Forschungsgemeinschaft},
1429-
title = {Guidelines for Safeguarding Good Research Practice. Code of Conduct},
1430-
month = apr,
1431-
year = 2022,
1432-
publisher = {Deutsche Forschungsgemeinschaft},
1433-
doi = {10.5281/zenodo.6472827},
1427+
@TechReport{dfg_gsp,
1428+
author = {Deutsche Forschungsgemeinschaft},
1429+
title = {Guidelines for Safeguarding Good Research Practice},
1430+
year = {2022},
1431+
type = {Code of Conduct},
1432+
number = {version~1.1},
1433+
month = apr,
1434+
doi = {10.5281/zenodo.6472827},
1435+
publisher = {Deutsche Forschungsgemeinschaft},
14341436
}
14351437

14361438
@InCollection{Diamond2016,
@@ -1976,16 +1978,17 @@ @online{GitHubStreakStats
19761978
urldate = {2023-06-14},
19771979
}
19781980

1979-
1980-
@article{Goble2014,
1981-
author = {Goble, C.},
1982-
journal = {IEEE Internet Computing},
1983-
month = {Sep.},
1984-
number = {5},
1985-
pages = {4-8},
1986-
title = {Better Software, Better Research},
1987-
volume = {18},
1988-
year = {2014}
1981+
@Article{Goble2014,
1982+
author = {Goble, Carole},
1983+
title = {Better Software, Better Research},
1984+
journal = {IEEE Internet Computing},
1985+
year = {2014},
1986+
volume = {18},
1987+
number = {5},
1988+
month = sep,
1989+
pages = {4--8},
1990+
issn = {1089-7801},
1991+
doi = {10.1109/MIC.2014.88},
19891992
}
19901993

19911994
@Article{Godoy2022,

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: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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"
77+
firstName: Alexander
78+
lastName: Struck
79+
initials: AS
80+
affiliations:
81+
- Cluster of Excellence Matters of Activity. Image Space Material at Humboldt-Universitaet zu Berlin
82+
orcid: 0000-0002-1173-9228
83+
84+
acknowledgements: |
85+
AS acknowledges the support of the Cluster of Excellence »Matters of Activity. Image Space Material« funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany's Excellence Strategy – EXC 2025 – 390648296.
86+

group_composition_plot/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
group_composition_plot.pdf
22
/submissions.volume
3-
/submissions/
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
./group_composition_plot.py --legend \
2+
--outfile group_composition_plot_the_fantastic_four.pdf \
3+
submissions/2023-12-06/Friedrich_Schiller_University_Jena_2023-12-06_10-43-44.json \
4+
submissions/2023-12-06/Scientific_Software_Center_2023-12-21_13-13-27.json \
5+
submissions/2023-12-06/University_of_Reading_2023-12-11_10-18-14.json \
6+
submissions/2023-12-06/Princeton_University_2023-11-29_18-33-21.json
7+
8+
find submissions/2023-12-06 -type f -name "*.json" -print0 | \
9+
xargs -0 -P 0 -I{} \
10+
bash -c 'f=$(basename "{}"); ./group_composition_plot.py --outfile pdf/"${f%.json}.pdf" "{}"'
Lines changed: 56 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,66 @@
1-
#!/usr/bin/python3
2-
# author: Frank Löffler <[email protected]>
3-
# license: CC0
4-
5-
import numpy as np
1+
#!/usr/bin/env python3
2+
import sys, argparse
63
import matplotlib.pyplot as plt
4+
import json
5+
from pprint import pprint
76

8-
# preliminary names
9-
names = ["RSE Network",
10-
"Partner Network",
11-
"RSE Teaching",
12-
"RSE Consultation",
13-
"SW Development",
14-
"SW Maintenance",
15-
"RSE Infrastructure",
16-
"RSE Research",
17-
"RSE Outreach",
18-
]
19-
# some example values
20-
data = np.array([[1, 0.2],
21-
[3, 0.6,],
22-
[1, 0.1,],
23-
[3, 0.2,],
24-
[4, 0.4,],
25-
[3, 0.3,],
26-
[0, 0.8,],
27-
[2, 0.6,],
28-
[3, 1,],
29-
])
30-
31-
fig = plt.figure(figsize=(10,5))
32-
33-
# percentages of the widths of the left and middle section of the plot, with the right
34-
# part being calculated from those (assuming 100% plot width)
35-
widths = [0.2, 0.1]
36-
widths.append(1-sum(widths))
37-
ax_l = fig.add_axes((0, 0, widths[0], 1))
38-
ax_c = fig.add_axes((widths[0], 0, widths[1], 1))
39-
ax_r = fig.add_axes((widths[0]+widths[1], 0, widths[2], 1))
40-
41-
xstep = 0.1
42-
43-
# eps: small value to ensure that where-clauses do not leave some range un-plotted
44-
# should roughly be half of the smallest step-size you want in x-direction
45-
eps = xstep/2
7+
def errorexit(msg='internal error', code=1):
8+
print(msg, file=sys.stderr)
9+
sys.exit(code)
4610

47-
x = np.arange(0, 1+eps, xstep)
48-
y = [np.repeat(0, len(x))]
49-
p = [np.repeat(0, len(x))]
50-
ye = [[0, 0],]
51-
ysum = np.sum(data[:,0])
52-
for i in np.arange(len(data)):
53-
y.append(np.repeat(data[i,0], len(x))/ysum + y[-1])
54-
p.append(np.repeat(data[i,1], len(x)))
55-
ye.append([(i+1)/len(data), y[-1][0]])
11+
parser = argparse.ArgumentParser(
12+
description="Plot activity fields of different institutions", add_help=False)
13+
parser.add_argument('infiles', metavar='infile', nargs="+",
14+
help="json files containing compositions of individual institutions")
15+
parser.add_argument('--outfile', default='group_composition_plot.pdf',
16+
help="specifies output file name, and by extension also the output format")
17+
parser.add_argument('--legend', action='store_true',
18+
help="add a legend")
19+
parser.add_argument('--hide-titles', action='store_true',
20+
help="hide the pie plot titles")
21+
args = vars(parser.parse_args())
5622

57-
for i in np.arange(len(data))+1:
58-
ax_l.fill_between([0,1], [ye[i][0], ye[i][0]], facecolor="none", edgecolor='k')
59-
ax_l.text(0.05, (ye[i][0]+ye[i-1][0])/2, names[i-1])
23+
data = {}
24+
activity_names = None
25+
for infilename in args['infiles']:
26+
try:
27+
infile = open(infilename, 'r')
28+
except:
29+
errorexit(f'Error: cannot read file {infilename}')
30+
try:
31+
data[infilename] = json.loads(infile.read())
32+
except:
33+
errorexit(f'Error: cannot parse data in file {infilename}')
34+
if activity_names and data[infilename]['activity_names'] != activity_names:
35+
errorexit(f'Error: inconsitent activity names between {infilename} and others in {data.keys()}')
36+
else:
37+
activity_names = data[infilename]['activity_names']
6038

61-
ax_c.fill_between([0,1], ye[i], facecolor="none", edgecolor='k')
39+
colors = plt.cm.Paired(range(len(activity_names)))
6240

63-
ax_r.fill_between(x, y[i-1], y[i], facecolor="none", edgecolor='k', hatch='/', where=p[i]>x-eps)
64-
ax_r.fill_between(x, y[i-1], y[i], facecolor="none", edgecolor='k', hatch='\\', where=p[i]<x+eps)
41+
# Mapping activities to colors
42+
activity_to_color = {activity: colors[i] for i, activity in enumerate(activity_names)}
6543

66-
for ax in [ax_l, ax_c, ax_r]:
67-
ax.set_xlim(0,1)
68-
ax.set_ylim(0,1)
69-
ax.set_xticks([])
70-
ax.set_yticks([])
44+
# Creating the joint plot
45+
scaling = .9
46+
iymax = (len(data)+1)//2
47+
fig = plt.figure(figsize=(scaling*16, scaling*8*iymax))
7148

49+
i = 1
50+
for inst, idata in data.items():
51+
ax = fig.add_subplot(iymax, min(2, len(data)), i)
52+
ax.pie(idata['activity_weights'], colors=colors, startangle=140)
53+
inst_name = idata['institution_name']
54+
if 'group_name' in idata:
55+
inst_name = idata['group_name'] + "\n" + inst_name
56+
if not args['hide_titles']:
57+
ax.set_title(inst_name, fontsize=20)
58+
i += 1
7259

60+
# Shared legend
61+
if args['legend']:
62+
fig.legend(activity_names, title="Activities", loc="center right", bbox_to_anchor=(1.2, 0.5), fontsize=20)
7363

74-
plt.savefig("group_composition_plot.pdf")
75-
#plt.show()
64+
plt.tight_layout()
65+
fig.savefig(args['outfile'], bbox_inches='tight')
66+
# plt.show()

0 commit comments

Comments
 (0)