diff --git a/.style/header.tex b/.style/header.tex index acc6a50bcf9bb32558417e75bc50285ab86381db..5ff130d0115e9a860a15e309c219120e691d0dcd 100644 --- a/.style/header.tex +++ b/.style/header.tex @@ -4,6 +4,7 @@ \usepackage{listings} \usepackage{color} \usepackage{datapie} +\usepackage{minted} % COMPILE WITH `pdflatex -shell-escape`! \usepackage{multicol} \usepackage{upgreek} \usepackage{siunitx} %pretty measurement unit rendering diff --git a/scientific_software_management/bib.bib b/scientific_software_management/bib.bib new file mode 100644 index 0000000000000000000000000000000000000000..7e849df66e429d8b20b69f5e5ef8f5aa055d7266 --- /dev/null +++ b/scientific_software_management/bib.bib @@ -0,0 +1,24 @@ +@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} +} diff --git a/scientific_software_management/compile.sh b/scientific_software_management/compile.sh new file mode 100755 index 0000000000000000000000000000000000000000..98994fc17209800b73164fdeee7c8179891bca64 --- /dev/null +++ b/scientific_software_management/compile.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +pdflatex -shell-escape slides.tex +bibtex slides +pdflatex -shell-escape slides.tex +pdflatex -shell-escape slides.tex diff --git a/scientific_software_management/img/eb.png b/scientific_software_management/img/eb.png new file mode 100644 index 0000000000000000000000000000000000000000..fce5ae61a634e81ce11253cb964506370a86d40d Binary files /dev/null and b/scientific_software_management/img/eb.png differ diff --git a/scientific_software_management/img/gentoo.png b/scientific_software_management/img/gentoo.png new file mode 100644 index 0000000000000000000000000000000000000000..226839965185304f9cd8aad8e5b7a8578d4088e8 Binary files /dev/null and b/scientific_software_management/img/gentoo.png differ diff --git a/scientific_software_management/img/ng_mi.png b/scientific_software_management/img/ng_mi.png new file mode 100644 index 0000000000000000000000000000000000000000..55b71ccad2218e5a8e5c7542457341de9b5487a1 Binary files /dev/null and b/scientific_software_management/img/ng_mi.png differ diff --git a/scientific_software_management/img/pm.xcf b/scientific_software_management/img/pm.xcf new file mode 100644 index 0000000000000000000000000000000000000000..353985cf2d7e290f03e8e10c05fb43dc59b801b3 Binary files /dev/null and b/scientific_software_management/img/pm.xcf differ diff --git a/scientific_software_management/img/pm_d.png b/scientific_software_management/img/pm_d.png new file mode 100644 index 0000000000000000000000000000000000000000..3f6d4f05cdce334ea598fd057a03b3dc84b4ccc9 Binary files /dev/null and b/scientific_software_management/img/pm_d.png differ diff --git a/scientific_software_management/img/pm_g.png b/scientific_software_management/img/pm_g.png new file mode 100644 index 0000000000000000000000000000000000000000..f8d681101d7d6cf7894fa7da81ac65f2478ace2f Binary files /dev/null and b/scientific_software_management/img/pm_g.png differ diff --git a/scientific_software_management/img/python.png b/scientific_software_management/img/python.png new file mode 100644 index 0000000000000000000000000000000000000000..193c227431b5b0ed66eb3dab40ffc448a1177009 Binary files /dev/null and b/scientific_software_management/img/python.png differ diff --git a/scientific_software_management/img/sp.png b/scientific_software_management/img/sp.png new file mode 100644 index 0000000000000000000000000000000000000000..bdc34ae8c8c3439388956ef95d6f4e16cc6f935f Binary files /dev/null and b/scientific_software_management/img/sp.png differ diff --git a/scientific_software_management/slides.tex b/scientific_software_management/slides.tex new file mode 100644 index 0000000000000000000000000000000000000000..7edc8a73529b65d53806e4fba1665c23b9c8a214 --- /dev/null +++ b/scientific_software_management/slides.tex @@ -0,0 +1,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}