aboutsummaryrefslogtreecommitdiff
path: root/tex/project-graph.tex
blob: 1ae9af475a229c8b1db5c1a71ef57406dc874119 (plain)
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
% Copyright (C) 2018-2019 Mohammad Akhlaghi <mohammad@akhlaghi.org>
%
% This LaTeX source is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
% published by the Free Software Foundation, either version 3 of the
% License, or (at your option) any later version.
%
% This LaTeX source is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
% General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this LaTeX source.  If not, see <https://www.gnu.org/licenses/>.
\small
\Wider[5em]{
\begin{center}
\vspace{-3mm}
\begin{tikzpicture}[>=stealth, thick, black!50, text=black,
    every new ->/.style={shorten >=1pt},
    hv path/.style={to path={-| (\tikztotarget)}},
    graphs/every graph/.style={edges=rounded corners}]

  %% This white line is only added to fix the vertical position of the
  %% figure so it doesn't change as we add more boxes.
  \draw [white] (0,-4.3) -- (0,3.8);
  \draw [white] (-0.5,0) -- (12,0);

  %% Box showing containers.
  \ifdefined\containers
    \filldraw[YellowOrange!20!white, rounded corners=2mm] (-0.1,0.3) rectangle (5.6,3.8);
    \draw (-0.1,3.6) node [anchor=west] {\scriptsize Existing solutions:};
    \draw (0.1,3.3) node [anchor=west] {\scriptsize Virtual machines};
    \draw (0.1,3.0) node [anchor=west] {\scriptsize Containers (e.g., Docker)};
    \draw (0.1,2.7) node [anchor=west] {\scriptsize OSs (e.g., Nix, GNU Guix)};
  \fi

  \graph[grow right sep, simple] {
    { [nodes={yshift=7mm}]
      soft/Software [gbox] -> build/Build [bbox],
      hard/Hardware/data [gbox, yshift=-0.5cm] --
      p1 [coordinate, xshift=2cm, yshift=-0.5cm]
    } -- [hv path]
    p2 [coordinate] ->
    srun/Run software on data [bbox] ->
    paper/Paper [bbox]
  };

  \ifdefined\paperfinal
    \node (happy) [inner sep=0pt, below=of paper, yshift=+8mm]
          {\includegraphics[width=2cm]{img/happy-question.jpg}};
    \node (happyurl) [below=of happy, xshift=-9.5mm, yshift=+1cm]
          {\tiny \url{https://heywhatwhatdidyousay.wordpress.com}};
    \node (qurl) [below=of happyurl, xshift=10.5mm, yshift=+1.2cm]
          {\tiny \url{http://pngimages.net}};
  \else
    \ifdefined\paperinit
      \node (happy) [inner sep=0pt, below=of paper, yshift=+8mm]
            {\includegraphics[width=2cm]{img/happy.jpg}};
      \node (happyurl) [below=of happy, xshift=-9.5mm, yshift=+1cm]
            {\tiny \url{https://heywhatwhatdidyousay.wordpress.com}};
    \fi
  \fi

  %% Software...
  \let\ppopacity\undefined
  \ifdefined\allopacity \newcommand{\ppopacity}{1}
  \else \ifdefined\focusonpackages
      \newcommand{\ppopacity}{1}
    \else
      \newcommand{\ppopacity}{0.3}
    \fi
  \fi

  \ifdefined\sver
  \node (sver)
        [rbox, above=of soft, yshift=-8mm, opacity=\ppopacity]
        {What version?};
  \fi
  \ifdefined\srep
  \node (srep)
        [rbox, above=of sver, yshift=-8mm, opacity=\ppopacity]
        {Repository?};
  \fi

  %% Build
  \ifdefined\dver
  \node (dver)
        [rbox, above=of build, yshift=-8mm, opacity=\ppopacity]
        {Dependencies?};
  \fi
  \ifdefined\ddver
  \node (ddver)
        [rbox, above=of dver, yshift=-8mm, opacity=\ppopacity]
        {Dep. versions?};
  \fi
  \ifdefined\confopt
  \node (confopt)
        [rbox, above=of ddver, yshift=-8mm, opacity=\ppopacity]
        {Config options?};
  \fi
  \ifdefined\confenv
  \node (confenv)
        [rbox, above=of confopt, yshift=-8mm, opacity=\ppopacity]
        {Config environment?};
  \fi

  %% Hardware/data
  \let\ppopacity\undefined
  \ifdefined\allopacity \newcommand{\ppopacity}{1}
  \else \ifdefined\focusonhardware
      \newcommand{\ppopacity}{1}
    \else
      \newcommand{\ppopacity}{0.3}
    \fi
  \fi
  \ifdefined\db
  \node (db)
        [rbox, below=of hard, yshift=+8mm, opacity=\ppopacity]
        {Data base, or PID?};
  \fi
  \ifdefined\calib
  \node (calib)
        [rbox, below=of db, yshift=+8mm, opacity=\ppopacity]
        {Calibration/version?};
  \fi
  \ifdefined\corr
  \node (corr)
        [rbox, below=of calib, yshift=+8mm, opacity=\ppopacity]
        {Integrity?};
  \fi

  %% Run software ...
  \let\ppopacity\undefined
  \ifdefined\allopacity \newcommand{\ppopacity}{1}
  \else \ifdefined\focusonrun
      \newcommand{\ppopacity}{1}
    \else
      \newcommand{\ppopacity}{0.3}
    \fi
  \fi
  \ifdefined\runord
  \node (runord)
        [rbox, above=of srun, yshift=-8mm, opacity=\ppopacity]
        {What order?};
  \fi
  \ifdefined\runopt
  \node (runopt)
        [rbox, above=of runord, yshift=-8mm, opacity=\ppopacity]
        {Runtime options?};
  \fi
  \ifdefined\humanerr
  \node (humanerr)
        [rbox, above=of runopt, yshift=-8mm, opacity=\ppopacity]
        {Human error?};
  \fi
  \ifdefined\confirmbias
  \node (confirmbias)
        [rbox, above=of humanerr, yshift=-8mm, opacity=\ppopacity]
        {Confirmation bias?};
  \fi
  \ifdefined\depupdate
  \node (depupdate)
        [rbox, below=of srun, yshift=+8mm, opacity=\ppopacity]
        {Environment update?};
  \fi
  \ifdefined\coauth
  \node (coaut)
        [rbox, below=of depupdate, yshift=+8mm, opacity=\ppopacity]
        {In sync with coauthors?};
  \fi

  %% Paper ...
  \let\ppopacity\undefined
  \ifdefined\allopacity \newcommand{\ppopacity}{1}
  \else \ifdefined\focusonpaper
      \newcommand{\ppopacity}{1}
    \else
      \newcommand{\ppopacity}{0.3}
    \fi
  \fi
  \ifdefined\varsinpaper
  \node (varsinpaper)
        [rbox, above=of paper, xshift=-1mm, yshift=-8mm, opacity=\ppopacity]
        {Sync with analysis?};
  \fi
  \ifdefined\recordinfo
  \node (recordinfo)
        [rbox, above=of varsinpaper, yshift=-8mm, opacity=\ppopacity]
        {Report this info?};
  \fi
  \ifdefined\softcite
  \node (softcite)
        [rbox, above=of recordinfo, yshift=-8mm, opacity=\ppopacity]
        {Cited software?};
  \fi
  \ifdefined\prevchange
  \node (prevchange)
        [rbox, above=of softcite, yshift=-8mm, opacity=\ppopacity]
        {History recorded?};
  \fi

  \ifdefined\gitlogo
  \node [inner sep=0pt, opacity=0.5] at (5.5,0)
        {\includegraphics[width=10cm]{img/git.png}};
  \fi
\end{tikzpicture}
\end{center}


\vspace{-1.2cm} \scriptsize
   \textcolor{green!50!black}{Green boxes} with sharp corners:
   \emph{source}/input components/files.\\
   \textcolor{blue}{Blue boxes} with rounded corners: \emph{built} components.\\
   \textcolor{red}{Red boxes} with dashed borders: questions that must be clarified for each phase.
}