Skip to content
Snippets Groups Projects
Commit d7ef5404 authored by Horea Christian's avatar Horea Christian
Browse files

Scientific software management draft

parent 568e3f83
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
\usepackage{listings} \usepackage{listings}
\usepackage{color} \usepackage{color}
\usepackage{datapie} \usepackage{datapie}
\usepackage{minted} % COMPILE WITH `pdflatex -shell-escape`!
\usepackage{multicol} \usepackage{multicol}
\usepackage{upgreek} \usepackage{upgreek}
\usepackage{siunitx} %pretty measurement unit rendering \usepackage{siunitx} %pretty measurement unit rendering
......
@conference{repsep,
author = {Horea-Ioan Ioanas and Markus Rudin},
title = {Reproducible Self-Publishing for {P}ython-Based Research},
year = 2018,
month = aug,
publisher = {EuroSciPy},
url = {https://figshare.com/articles/Reproducible_Self-Publishing_for_Python-Based_Research/7247339},
doi = {10.6084/m9.figshare.7247339.v1},
}
@article{Ioanas2017,
author = {Horea-Ioan Ioanas and Bechara Saab and Markus Rudin},
title = {Gentoo Linux for Neuroscience - a replicable, flexible, scalable, rolling-release environment that provides direct access to development software},
volume = {3},
number = {},
year = {2017},
doi = {10.3897/rio.3.e12095},
publisher = {Pensoft Publishers},
abstract = {},
issn = {},
pages = {e12095},
URL = {https://doi.org/10.3897/rio.3.e12095},
eprint = {https://doi.org/10.3897/rio.3.e12095},
journal = {Research Ideas and Outcomes}
}
#!/usr/bin/env bash
pdflatex -shell-escape slides.tex
bibtex slides
pdflatex -shell-escape slides.tex
pdflatex -shell-escape slides.tex
scientific_software_management/img/eb.png

77.7 KiB

scientific_software_management/img/gentoo.png

107 KiB

scientific_software_management/img/ng_mi.png

3.6 MiB

File added
scientific_software_management/img/pm_d.png

16.3 KiB

scientific_software_management/img/pm_g.png

17 KiB

scientific_software_management/img/python.png

71.9 KiB

scientific_software_management/img/sp.png

54.3 KiB

\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}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment