To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

slides.tex 12.1 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
\input{../.style/header}

\title{Software Management for Open Science}
\author{Horea Christian}
\institute{SSC TheAlternative | ETHZ and UZH}

\begin{document}
	\begin{frame}
		\titlepage
	\end{frame}
	\begin{frame}{These Slides}
		Type one link, click all others:
		\begin{itemize}
			\item Download \textcolor{lg}{\href{http://chymera.eu/pres/ld_packaging-sci/pres.pdf}{\texttt{chymera.eu/pres/ld\_foss/pres.pdf}}}
		\end{itemize}
	\end{frame}
	\section{Requirements}
		\subsection{... for the Demo Session}
			\begin{frame}{SSH}
				Linux and MacOS:
				\begin{itemize}
					\item check that you can run
					\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|ssh userXX@130.60.24.172|
				\end{itemize}
				Windows:
				\begin{itemize}
					\item Download and launch “Git for Windows” from \textcolor{lg}{\href{https://git-for-windows.github.io}{\texttt{git-for-windows.github.io}}}
					\item check that you can run
					\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|ssh userXX@130.60.24.172|
				\end{itemize}
			\end{frame}
			\begin{frame}{GitHub Account}
				GitHub is a \textbf{social coding platform} providing free accounts:
				\begin{itemize}
					\item Register under \textcolor{lg}{\href{https://github.com}{\texttt{github.com}}}
				\end{itemize}
			\end{frame}
	\section{What?}
		\subsection{What is Packaging?}
			\begin{frame}{The Package}
				A package is a software format which is (easily):
				\begin{itemize}
					\item distributable (i.e. installable)
					\item integrated
					\item testable
					\item updateable
					\item uninstallable
					\item understandable
				\end{itemize}
			\end{frame}
			\begin{frame}{Package Management --- best done automatically}
				\begin{minipage}{0.44\textwidth}
					Packages interact in complex and nontrivial manners:
					\begin{itemize}
						\item architecture requirements
						\item dependencies (incl. blockers, version-dependent behaviour, static/dynamic linking)
					\end{itemize}
				\end{minipage}
				\begin{minipage}{0.55\textwidth}
					\begin{figure}
						\includegraphics[height=0.83\textheight]{img/ng_mi.png}
						\vspace{-1em}
						\caption{Minimal neuroscience package dependency stack \cite{Ioanas2017}}
					\end{figure}
				\end{minipage}
			\end{frame}
			\begin{frame}{Binary Packages}
				\begin{figure}
				\centering
					\includegraphics[width=0.9\textwidth]{img/pm_d.png}
					\caption{Rudimentary overview of binary package distribution workflow.}
				\end{figure}
				\begin{columns}
					\column{.5\linewidth}
						Advantages:
						\begin{itemize}
							\item Faster installation
							\item More reproducible installation
						\end{itemize}
					\column{.5\linewidth}
						Disadvantages:
						\begin{itemize}
							\item No access to live software
							\item Man-in-the middle
							\item Limited support for rolling release
						\end{itemize}
				\end{columns}
			\end{frame}
			\begin{frame}{Source Packages}
				\begin{figure}
				\centering
					\includegraphics[width=0.9\textwidth]{img/pm_g.png}
					\caption{Rudimentary overview of source distribution workflow.}
				\end{figure}
				\begin{columns}
					\column{.5\linewidth}
						Advantages:
						\begin{itemize}
							\item Live software is a first-class citizen
							\item Thin wrapper for upstream
							\item Acutely version and linking aware
						\end{itemize}
					\column{.5\linewidth}
						Disadvantages:
						\begin{itemize}
							\item Slower installation
							\item More variable installation
						\end{itemize}
				\end{columns}
			\end{frame}
	\section{Why?}
		\subsection{Why Package my Software?}
			\begin{frame}{Recognition}
				\begin{itemize}
					\item Establish proof of authorship.
					\item Publicize your innovative workflows, solutions, data structures.
					\item Create a handle for attribution (including DOI), e.g:
					\begin{itemize}
						\item BehavioPy: \textcolor{lg}{\href{http://doi.org/10.5281/zenodo.188169}{\texttt{10.5281/zenodo.188169}}}
						\item Nipype: \textcolor{lg}{\href{http://doi.org/10.5281/zenodo.50186}{\texttt{10.5281/zenodo.50186}}}
					\end{itemize}
				\end{itemize}
			\end{frame}
			\begin{frame}{Impact}
				\begin{itemize}
					\item Reach more potential users.
					\item Communicate with users to improve your software's usability.
					\item Retain more users.
				\end{itemize}
			\end{frame}
			\begin{frame}{Quality}
				\begin{itemize}
					\item Make development more transparent.
					\item Get \textbf{constructive} feedback.
					\item Ask for help with concrete reproducible examples.
					\item Easily manage \textcolor{lg}{\href{https://github.com/gentoo-science/sci/issues}{\texttt{bugs/issues}}} and \textcolor{lg}{\href{https://github.com/gentoo-science/sci/pulls}{\texttt{conributions}}}.
					\item Implement proper version tracking.
				\end{itemize}
			\end{frame}
			\begin{frame}{Sustainability}
				\begin{itemize}
					\item Avoid death-by-PhD.
					\item Ensure long-term availability of your software.
					\item Give your funding bodies their money's worth.
					\item Develop a lean start-up.
					\item Maintain a sustainable and affordable infrastructure for your business/employer.
				\end{itemize}
			\end{frame}
			\begin{frame}{Why Not?}
				\begin{itemize}
					\item Don't be afraid of your software not being “good/unique enough”!
					\item Don't be wait until your software is “ready”!
					\item A lot of research software you are already using is not written by “professional” programmers.
				\end{itemize}
			\end{frame}
	\section{How?}
		\subsection{How Do I Package my Software?}
			\begin{frame}{Choose an Environment}
				\begin{columns}
					\column{.5\linewidth}
						\begin{figure}
						\centering
							\includegraphics[width=0.6\textwidth]{img/gentoo.png}
							\caption{Gentoo Linux Logo by Gentoo Foundation and Lennart Andre Rolland - CC BY-SA/2.5.}
						\end{figure}
					\column{.5\linewidth}
						\begin{figure}
							\centering
							\includegraphics[width=0.6\textwidth]{img/python.png}
							\caption{Python Logo by Python Software Foundation.}
						\end{figure}
				\end{columns}
			\end{frame}
			\begin{frame}{Reposit Your Software}
				\begin{itemize}
					\item Bitbucket
					\item GitHub
					\item GitLab
					\item ...
				\end{itemize}
			\end{frame}
			\begin{frame}{Python Package Distribution}
				\begin{columns}
					\column{.4\linewidth}
					You can package your python software by writing \textbf{one short} file.
						\begin{itemize}
							\item Python provides its own package management, e.g. via \textcolor{lg}{\href{https://packaging.python.org/distributing/}{\texttt{setuptools}}}.
							\item Package metadata saved in \texttt{setup.py}, e.g. \textcolor{lg}{\href{https://github.com/IBT-FMI/SAMRI/blob/master/setup.py}{\texttt{SAMRI/setup.py}}}
						\end{itemize}
					\column{.6\linewidth}
						\begin{figure}
							\centering
							\includegraphics[width=0.9\textheight]{img/sp.png}
						\end{figure}
				\end{columns}
			\end{frame}
			\begin{frame}{Gentoo Packages}
				\begin{columns}
					\column{.4\linewidth}
					You can package your software for Gentoo by writing \textbf{one short} file.
						\begin{itemize}
							\item Gentoo packages metadata/instruction text files
							\item The Gentoo package manager understands external package management formats, e.g. as seen in  \textcolor{lg}{\href{https://github.com/TheChymera/overlay/blob/master/sci-biology/samri/samri-9999.ebuild}{\texttt{=sci-biology/samri-9999}}}
						\end{itemize}
					\column{.6\linewidth}
						\begin{figure}
							\centering
							\includegraphics[width=0.7\textheight]{img/eb.png}
						\end{figure}
				\end{columns}
			\end{frame}
	\section{Demo}
		\subsection{Put what you have learned into practice, and start typing...}
			\begin{frame}{A Few Basic Gentoo Commands}
				\begin{itemize}
					\item check available package names, versions, and details
					\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|eix samri|
					\item see package dependencies
					\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|equery g samri|
					\item see what packages depend on a said package
					\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|equery d nipype|
					\item try to install a new package
					\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|emerge -p =nilearn-0.1.4.1|
				\end{itemize}
			\end{frame}
			\begin{frame}{Reproduce a Scientific Article}
				Novel frameworks, such as RepSeP \cite{repsep} permit articles to be written as software.
				\begin{itemize}
					\item Get the source code for brand-new articles:
					\begin{itemize}
						\item Work-in-progress (reexecution time \SI{\approx 3}{\second})
						\vspace{-0.5em}
						\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git clone https://gitlab.com/Chymera/nvcz.git |
						\item Preprint (reexecution time \SI{\approx 2}{\minute})
						\vspace{-0.5em}
						\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git clone git clone https://bitbucket.org/TheChymera/irsabi.git |
					\end{itemize}
					\item Switch to article directory
					\vspace{-0.5em}
					\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cd nvcz|
					\item Attempt to reexecute
					\vspace{-0.5em}
					\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|./compile.sh|
					%\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git chechout 28b5d2d1|
				\end{itemize}
			\end{frame}
			\begin{frame}{What happened? Dependency requirements happened.}
				Write a new package atom for the package manager.
				\begin{itemize}
					\item Gentoo Linux makes this wholly autonomous.
					\item Solve one problem only once:
					\begin{itemize}
						\item Installation will be automatic on all your further systems.
						\item And on everybody else's systems!
					\end{itemize}
				\end{itemize}
			\end{frame}
			\begin{frame}{Write an ebuild}
				\begin{itemize}
					\Item Fork an overlay on GitHub.
					\textcolor{lg}{\href{https://github.com/TheChymera/overlay}{\texttt{github.com/TheChymera/overlay}}}
					\item Go back to your home directory.
					\vspace{-0.5em}
					\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cd|
					\item Clone your fork of the overlay.
					\vspace{-0.5em}
					\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git clone https://github.com/TheChymera/overlay.git|
					\item Clone your fork of the overlay.
					\vspace{-0.5em}
					\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git clone https://github.com/TheChymera/overlay.git|
				\end{itemize}
			\end{frame}
			\begin{frame}{Write Packaged Free and Open Source Scientific Software}
				\begin{enumerate}
					\item correct URL in \textcolor{lg}{\href{https://github.com/IBT-FMI/SAMRI/blob/master/setup.py}{\texttt{SAMRI/setup.py}}}
					\item Add notice of dependency on nilearn in \textcolor{lg}{\href{https://github.com/IBT-FMI/SAMRI/blob/master/README.md}{\texttt{SAMRI/README.md}}}
					\item Add notice of dependency on nilearn in \textcolor{lg}{\href{https://github.com/TheChymera/overlay/blob/master/sci-biology/samri/samri-9999.ebuild}{\texttt{=sci-biology/samri-9999}}}
					\item Remove \texttt{dcmstack} import and dependency from the SAMRI source and the Gentoo SAMRI package
				\end{enumerate}
			\end{frame}


	\section{Meta}
		\subsection{About this presentation}
			\begin{frame}{What now?}
				\begin{itemize}
					\item Q\&A round\\
					\textcolor{lg}{in a few seconds}
					\item Get help packaging your own Free and Open Source Scientific Software\\
					\textcolor{lg}{in a few minutes}
					\item Get help with running your own Gentoo Linux data analysis server\\
					\textcolor{lg}{in a few hours}
					\item Spread the word\\
					\textcolor{lg}{tomorrow at work}
				\end{itemize}
			\end{frame}
			\begin{frame}{These Slides}
				\begin{itemize}
					\item \textcolor{lg}{Latest Slides:}\\ \url{http://chymera.eu/pres/ld_packaging-sci/pres.pdf}
					\item \textcolor{lg}{Source:}\\ \url{https://bitbucket.org/TheChymera/ld_packaging-sci/}
				\end{itemize}
				%separate sources from info so it looks nicer
				\begin{itemize}
					\item \textcolor{lg}{License:} \href{https://creativecommons.org/licenses/by-sa/3.0/}{CC BY-SA 3.0}
					\item \small\textcolor{lg}{Special Thanks to} Mickey Vaenskae
				\end{itemize}
			\end{frame}
			\begin{frame}{References}
				\bibliographystyle{abbrv}
				\bibliography{./bib}
			\end{frame}
\end{document}