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

Commit aa72bd2a authored by Horea Christian's avatar Horea Christian
Browse files

PRESENTED: 2019-11-11 Linux Days Zurich

parent 0f326c36
# 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
...@@ -19,14 +19,14 @@ ...@@ -19,14 +19,14 @@
\begin{frame}{SSH} \begin{frame}{SSH}
Linux and MacOS: Linux and MacOS:
\begin{itemize} \begin{itemize}
\item check that you can run \item Check that you can run:
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|ssh YOURUSER@130.60.24.66| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|ssh YOURUSER@130.60.24.66|
\end{itemize} \end{itemize}
Windows: Windows:
\begin{itemize} \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 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 Check that you can run:
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|ssh YOURUSER@130.60.24.66| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|ssh YOURUSER@130.60.24.66|
\end{itemize} \end{itemize}
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
\begin{frame}{Command Line Text Editor} \begin{frame}{Command Line Text Editor}
Usable via SSH and ubiquitous. There are many alternatives, but here we use \textcolor{lg}{\texttt{nano}}: Usable via SSH and ubiquitous. There are many alternatives, but here we use \textcolor{lg}{\texttt{nano}}:
\begin{itemize} \begin{itemize}
\item Open file \item Open file:
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|nano file| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|nano file|
\item Save via: \keys{Ctrl + c} \item Save via: \keys{Ctrl + c}
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
GitHub is a \textbf{social coding platform} providing free accounts: GitHub is a \textbf{social coding platform} providing free accounts:
\begin{itemize} \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. \item Use a password which you can remember.
\end{itemize} \end{itemize}
\end{frame} \end{frame}
...@@ -68,12 +68,12 @@ ...@@ -68,12 +68,12 @@
A package is a software format which is (easily): A package is a software format which is (easily):
\begin{multicols}{2} \begin{multicols}{2}
\begin{itemize} \begin{itemize}
\item distributable \item Distributable
\item integrated \item Integrated
\item testable \item Testable
\item updateable \item Updateable
\item uninstallable \item Uninstallable
\item understandable \item Understandable
\end{itemize} \end{itemize}
\end{multicols} \end{multicols}
\end{frame} \end{frame}
...@@ -81,10 +81,10 @@ ...@@ -81,10 +81,10 @@
\begin{minipage}{0.44\textwidth} \begin{minipage}{0.44\textwidth}
Packages interact in complex and nontrivial manners: Packages interact in complex and nontrivial manners:
\begin{itemize} \begin{itemize}
\item version-dependent behaviour \item Version-dependent behaviour
\item optional features \item Optional features
\item incompatibilities \item Incompatibilities
\item static/dynamic linking \item Static/dynamic linking
\end{itemize} \end{itemize}
\end{minipage} \end{minipage}
\begin{minipage}{0.55\textwidth} \begin{minipage}{0.55\textwidth}
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
You can package your python software by writing \textbf{one short} file. You can package your python software by writing \textbf{one short} file.
\begin{itemize} \begin{itemize}
\item Python provides its own limited package management, e.g. via \textcolor{lg}{\href{https://packaging.python.org/distributing/}{\texttt{setuptools}}}. \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} \end{itemize}
\column{.45\linewidth} \column{.45\linewidth}
\inputminted[bgcolor=tlg,fontsize=\Tiny,tabsize=4]{python}{samri/setup.py} \inputminted[bgcolor=tlg,fontsize=\Tiny,tabsize=4]{python}{samri/setup.py}
...@@ -220,8 +220,8 @@ ...@@ -220,8 +220,8 @@
\column{.55\linewidth} \column{.55\linewidth}
A Gentoo package is \textbf{one short} file. A Gentoo package is \textbf{one short} file.
\begin{itemize} \begin{itemize}
\item regardless of the programming language \item Regardless of the programming language
\item can automatically interpret information contained in the package, e.g. in \textcolor{lg}{\texttt{setup.py}} \item Can automatically interpret information contained in the package, e.g. in \textcolor{lg}{\texttt{setup.py}}
\end{itemize} \end{itemize}
\column{.47\linewidth} \column{.47\linewidth}
\vspace{-3em} \vspace{-3em}
...@@ -249,21 +249,21 @@ ...@@ -249,21 +249,21 @@
\subsection{Put what you have learned into practice, and start typing...} \subsection{Put what you have learned into practice, and start typing...}
\begin{frame}{A Few Basic Gentoo Commands} \begin{frame}{A Few Basic Gentoo Commands}
\begin{itemize} \begin{itemize}
\item check available package names, versions, and details \item Check available package names, versions, and details.
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|eix nibabel| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|eix -v nibabel|
\item see package dependencies \item See package dependencies.
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|equery g nibabel| \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} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|equery d nibabel| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|equery d nibabel|
\item see files installed by package \item See files installed by package.
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|equery f nibabel| \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} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|emerge -p nibabel| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|emerge -p psychopy|
\end{itemize} \end{itemize}
\end{frame} \end{frame}
\begin{frame}{Reproduce a Scientific Article} \begin{frame}{Reproduce a Scientific Article}
...@@ -271,17 +271,17 @@ ...@@ -271,17 +271,17 @@
\begin{itemize} \begin{itemize}
\item Get the source code for brand-new articles: \item Get the source code for brand-new articles:
\begin{itemize} \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} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git clone https://gitlab.com/Chymera/nvcz.git | \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} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git clone https://bitbucket.org/TheChymera/irsabi.git | \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git clone https://bitbucket.org/TheChymera/irsabi.git |
\end{itemize} \end{itemize}
\item Switch to article directory \item Switch to article directory.
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cd nvcz| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cd nvcz|
\item Attempt to reexecute \item Attempt to reexecute.
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|./compile.sh| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|./compile.sh|
%\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git chechout 28b5d2d1| %\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|git chechout 28b5d2d1|
...@@ -323,12 +323,12 @@ ...@@ -323,12 +323,12 @@
\begin{frame}{Transparency means less work for you!} \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. You could write the following files from scratch, but you can also reuse analogous files from existing packages.
\begin{itemize} \begin{itemize}
\item Copy a metadata file from a Python package \item Copy a metadata file from a Python package.
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cp /usr/portage/sci-libs/nibabel/metadata.xml .| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cp /usr/portage/dev-python/astropy/metadata.xml .|
\item Copy an ebuild file from a Python package \item Copy an ebuild file from a Python package.
\vspace{-0.6em} \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{itemize}
\end{frame} \end{frame}
\begin{frame}{Write a Package Atom --- The Metadata File} \begin{frame}{Write a Package Atom --- The Metadata File}
...@@ -352,10 +352,10 @@ ...@@ -352,10 +352,10 @@
\end{frame} \end{frame}
\begin{frame}{Write a Package Atom --- Finishing Touches} \begin{frame}{Write a Package Atom --- Finishing Touches}
\begin{itemize} \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} \vspace{-0.6em}
\inputminted[bgcolor=tlg,fontsize=\scriptsize,tabsize=4,firstline=49,lastline=49]{bash}{samri/samri-0.4.ebuild} \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} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|wget https://thealternative.ch/ssm/samri/samri-0.4.ebuild -P ~| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|wget https://thealternative.ch/ssm/samri/samri-0.4.ebuild -P ~|
\vspace{-3.1em} \vspace{-3.1em}
...@@ -368,7 +368,10 @@ ...@@ -368,7 +368,10 @@
\end{frame} \end{frame}
\begin{frame}{Social Coding --- Upload Your Package for Reuse} \begin{frame}{Social Coding --- Upload Your Package for Reuse}
\begin{itemize} \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} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|repoman full| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|repoman full|
\item Record and publish your work in version control. \item Record and publish your work in version control.
...@@ -383,13 +386,13 @@ ...@@ -383,13 +386,13 @@
\end{frame} \end{frame}
\begin{frame}{Use Your Work} \begin{frame}{Use Your Work}
\begin{itemize} \begin{itemize}
\item Package index update (done by the superuser). \item Update the package index (as superuser).
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|eix-sync| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|eix-sync|
\item Try out the install command yourself. \item Try out the install command yourself.
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|emerge -pv samri| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|emerge -pv samri|
\item Install (done by the superuser). \item Install (as superuser).
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|emerge -v samri| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|emerge -v samri|
\end{itemize} \end{itemize}
...@@ -401,7 +404,7 @@ ...@@ -401,7 +404,7 @@
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cd ~/nvcz| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|cd ~/nvcz|
\item Compile. \item Compile.
\vspace{-0.6em} \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 Log out from SSH: \keys{Ctrl + d}
\item Get the document locally. \item Get the document locally.
\vspace{-0.6em} \vspace{-0.6em}
...@@ -418,15 +421,42 @@ ...@@ -418,15 +421,42 @@
\item Automatically adjust the t-statistic threshold for the entire document. \item Automatically adjust the t-statistic threshold for the entire document.
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}:grep -rlI 3\.5 | xargs sed -i -e "s/3.5/3.0/g": \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} \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 Compile, log out.
\item Get the document locally. \item Get the document locally.
\vspace{-0.6em} \vspace{-0.6em}
\mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|scp YOURUSER@130.60.24.66:nvcz/article.pdf newarticle.pdf| \mint[bgcolor=tlg,fontsize=\footnotesize]{bash}|scp YOURUSER@130.60.24.66:nvcz/article.pdf newarticle.pdf|
\end{itemize} \end{itemize}
\end{frame} \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} \section{Meta}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment