diff --git a/scientific_software_management/img/fig_new.png b/scientific_software_management/img/fig_new.png new file mode 100644 index 0000000000000000000000000000000000000000..e04c27c9934db3d73f3192224883d3aa70009e58 Binary files /dev/null and b/scientific_software_management/img/fig_new.png differ diff --git a/scientific_software_management/img/fig_old.png b/scientific_software_management/img/fig_old.png new file mode 100644 index 0000000000000000000000000000000000000000..f3d27bdb3cbe1073de809ccb7d48878b45b69272 Binary files /dev/null and b/scientific_software_management/img/fig_old.png differ diff --git a/scientific_software_management/reset_system.sh b/scientific_software_management/reset_system.sh new file mode 100644 index 0000000000000000000000000000000000000000..23d558c8689708553599eb40638a49ad217b9c43 --- /dev/null +++ b/scientific_software_management/reset_system.sh @@ -0,0 +1,9 @@ +# reset the system +rm -rf /var/db/repos/chymeric/ +emerge -C samri +eix-sync + +# reset the overlay repo +cd overlay/location/with/Chymera/account +git reset --hard commitwhichwasbeforethepull +git push -f origin master diff --git a/scientific_software_management/slides.pdf b/scientific_software_management/slides.pdf index 32ac1abe92f234fe55d2963e7ace65d527912ef7..e8d008952d02214780eac5a4420e121d97fd9137 100644 Binary files a/scientific_software_management/slides.pdf and b/scientific_software_management/slides.pdf differ diff --git a/scientific_software_management/slides.tex b/scientific_software_management/slides.tex index 6aeb01bef9d62b737ef8b29e33b8de48864d96bf..928bda83d84ce6dc32b271d414a2df830ffe4eb3 100644 --- a/scientific_software_management/slides.tex +++ b/scientific_software_management/slides.tex @@ -19,14 +19,14 @@ \begin{frame}{SSH} Linux and MacOS: \begin{itemize} - \item check that you can run + \item Check that you can run: \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|ssh YOURUSER@130.60.24.66| \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 + \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: \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|ssh YOURUSER@130.60.24.66| \end{itemize} @@ -34,7 +34,7 @@ \begin{frame}{Command Line Text Editor} Usable via SSH and ubiquitous. There are many alternatives, but here we use \textcolor{lg}{\texttt{nano}}: \begin{itemize} - \item Open file + \item Open file: \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|nano file| \item Save via: \keys{Ctrl + c} @@ -53,7 +53,7 @@ GitHub is a \textbf{social coding platform} providing free accounts: \begin{itemize} - \item Register under \textcolor{lg}{\href{https://github.com}{\texttt{github.com}}} + \item Register under \textcolor{lg}{\href{https://github.com}{\texttt{github.com}}}. \item Use a password which you can remember. \end{itemize} \end{frame} @@ -68,12 +68,12 @@ A package is a software format which is (easily): \begin{multicols}{2} \begin{itemize} - \item distributable - \item integrated - \item testable - \item updateable - \item uninstallable - \item understandable + \item Distributable + \item Integrated + \item Testable + \item Updateable + \item Uninstallable + \item Understandable \end{itemize} \end{multicols} \end{frame} @@ -81,10 +81,10 @@ \begin{minipage}{0.44\textwidth} Packages interact in complex and nontrivial manners: \begin{itemize} - \item version-dependent behaviour - \item optional features - \item incompatibilities - \item static/dynamic linking + \item Version-dependent behaviour + \item Optional features + \item Incompatibilities + \item Static/dynamic linking \end{itemize} \end{minipage} \begin{minipage}{0.55\textwidth} @@ -209,7 +209,7 @@ You can package your python software by writing \textbf{one short} file. \begin{itemize} \item Python provides its own limited 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}}} + \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{.45\linewidth} \inputminted[bgcolor=tlg,fontsize=\Tiny,tabsize=4]{python}{samri/setup.py} @@ -220,8 +220,8 @@ \column{.55\linewidth} A Gentoo package is \textbf{one short} file. \begin{itemize} - \item regardless of the programming language - \item can automatically interpret information contained in the package, e.g. in \textcolor{lg}{\texttt{setup.py}} + \item Regardless of the programming language + \item Can automatically interpret information contained in the package, e.g. in \textcolor{lg}{\texttt{setup.py}} \end{itemize} \column{.47\linewidth} \vspace{-3em} @@ -249,21 +249,21 @@ \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 + \item Check available package names, versions, and details. \vspace{-0.6em} - \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|eix nibabel| - \item see package dependencies + \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|eix -v nibabel| + \item See package dependencies. \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|equery g nibabel| - \item see what packages depend on a said package + \item See what packages depend on a said package. \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|equery d nibabel| - \item see files installed by package + \item See files installed by package. \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|equery f nibabel| - \item try to install a new package + \item Try to install a new package. \vspace{-0.6em} - \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|emerge -p nibabel| + \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|emerge -p psychopy| \end{itemize} \end{frame} \begin{frame}{Reproduce a Scientific Article} @@ -271,17 +271,17 @@ \begin{itemize} \item Get the source code for brand-new articles: \begin{itemize} - \item Work-in-progress (reexecution time \SI{\approx 3}{\second}) + \item Work-in-progress (reexecution time \SI{\approx 2}{\minute}) \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git clone https://gitlab.com/Chymera/nvcz.git | - \item Preprint (reexecution time \SI{\approx 2}{\minute}) + \item Preprint (reexecution time \SI{\approx 11}{\minute}) \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git clone https://bitbucket.org/TheChymera/irsabi.git | \end{itemize} - \item Switch to article directory + \item Switch to article directory. \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cd nvcz| - \item Attempt to reexecute + \item Attempt to reexecute. \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|./compile.sh| %\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git chechout 28b5d2d1| @@ -323,12 +323,12 @@ \begin{frame}{Transparency means less work for you!} You could write the following files from scratch, but you can also reuse analogous files from existing packages. \begin{itemize} - \item Copy a metadata file from a Python package + \item Copy a metadata file from a Python package. \vspace{-0.6em} - \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cp /usr/portage/sci-libs/nibabel/metadata.xml .| - \item Copy an ebuild file from a Python package + \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cp /usr/portage/dev-python/astropy/metadata.xml .| + \item Copy an ebuild file from a Python package. \vspace{-0.6em} - \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cp /usr/portage/sci-libs/nibabel/*2.5.1.ebuild samri-0.4.ebuild| + \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cp /usr/portage/dev-python/astropy/*2.0.1.ebuild samri-0.4.ebuild| \end{itemize} \end{frame} \begin{frame}{Write a Package Atom --- The Metadata File} @@ -352,10 +352,10 @@ \end{frame} \begin{frame}{Write a Package Atom --- Finishing Touches} \begin{itemize} - \item Not all packages are perfect. Append the following to the ebuild. + \item Not all packages are perfect. Append the following to the ebuild: \vspace{-0.6em} \inputminted[bgcolor=tlg,fontsize=\scriptsize,tabsize=4,firstline=49,lastline=49]{bash}{samri/samri-0.4.ebuild} - \item Check your work. + \item Check your work. Minor formatting differences (e.g. indents) are not critical. \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|wget https://thealternative.ch/ssm/samri/samri-0.4.ebuild -P ~| \vspace{-3.1em} @@ -368,7 +368,10 @@ \end{frame} \begin{frame}{Social Coding --- Upload Your Package for Reuse} \begin{itemize} - \item Quality Control. + \item Download the data and make git aware of your files. + \vspace{-0.6em} + \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|ebuild samri-0.4.ebuild manifest && git add .| + \item Run a quality check. \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|repoman full| \item Record and publish your work in version control. @@ -383,13 +386,13 @@ \end{frame} \begin{frame}{Use Your Work} \begin{itemize} - \item Package index update (done by the superuser). + \item Update the package index (as superuser). \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|eix-sync| \item Try out the install command yourself. \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|emerge -pv samri| - \item Install (done by the superuser). + \item Install (as superuser). \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|emerge -v samri| \end{itemize} @@ -401,7 +404,7 @@ \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cd ~/nvcz| \item Compile. \vspace{-0.6em} - \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|./compile| + \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|./compile.sh| \item Log out from SSH: \keys{Ctrl + d} \item Get the document locally. \vspace{-0.6em} @@ -418,15 +421,42 @@ \item Automatically adjust the t-statistic threshold for the entire document. \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}:grep -rlI 3\.5 | xargs sed -i -e "s/3.5/3.0/g": - \item Visualize what you have changed. + \item Clean up trace files and visualize what you have changed. \vspace{-0.6em} - \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git diff| + \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|./cleanup.sh && git diff| \item Compile, log out. \item Get the document locally. \vspace{-0.6em} \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|scp YOURUSER@130.60.24.66:nvcz/article.pdf newarticle.pdf| \end{itemize} \end{frame} + \begin{frame}{Results} + You have: + \begin{itemize} + \item Packaged a new piece of scientific software, now automatically installable: + \begin{itemize} + \item By anybody else + \item By you on any machine + \end{itemize} + \item Updated data analysis visualizations in a reproducible article. + \begin{itemize} + \item It's that easy to contribute to well-organized research! + \end{itemize} + \end{itemize} + \vspace{-.5em} + \begin{columns} + \column{.5\linewidth} + \begin{figure} + \centering + \includegraphics[width=0.52\textwidth]{img/fig_old.png} + \end{figure} + \column{.5\linewidth} + \begin{figure} + \centering + \includegraphics[width=0.52\textwidth]{img/fig_new.png} + \end{figure} + \end{columns} + \end{frame} \section{Meta}