From 48e61df320e7571e527049cd3eef5cf96b8cb491 Mon Sep 17 00:00:00 2001
From: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Date: Mon, 23 Mar 2020 03:16:06 +0000
Subject: Analysis and configuration file sections complete

With this commit a description of these two important parts have been added
to the project, along with several figures showing various parts of the
files that are discussed. I also done some other restructuring of the
figures and files to make things fit better into the the description of the
paper.
---
 paper.tex | 191 ++++++++++++++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 148 insertions(+), 43 deletions(-)

(limited to 'paper.tex')

diff --git a/paper.tex b/paper.tex
index f6aeed3..6a1e73a 100644
--- a/paper.tex
+++ b/paper.tex
@@ -624,12 +624,12 @@ The latter is necessary for many web-based automatic paper generating systems li
   \vspace{-5mm}
   \caption{\label{fig:files}
     Directory and file structure in a hypothetical project using this solution.
-    Files are shown with small, green boxes that have a suffix in their names (for example \inlinecode{analysis-1.mk} or \inlinecode{param-2.conf}).
+    Files are shown with small, green boxes that have a suffix in their names (for example \inlinecode{format.mk} or \inlinecode{download.tex}).
     Directories (containing multiple files) are shown as large, brown boxes, where the name ends in a slash (\inlinecode{/}).
     Directories with dashed lines and no files (just a description) are symbolic links that are created after building the project, pointing to commonly needed built directories.
     Symbolic links and their contents are not considered part of the source and are not under version control.
     Files and directories are shown within their parent directory.
-    For example the full address of \inlinecode{analysis-1.mk} from the top project directory is \inlinecode{reproduce/analysis/make/analysis-1.mk}.
+    For example the full address of \inlinecode{format.mk} from the top project directory is \inlinecode{reproduce/analysis/make/format.mk}.
   }
 \end{figure}
 
@@ -908,6 +908,8 @@ We'll follow Make's paradigm (see Section \ref{sec:usingmake}) of starting form
     Blue files/boxes are output files of various steps in the build-directory, located within the Makefile (\inlinecode{*.mk}) that generates them.
     For example \inlinecode{paper.pdf} depends on \inlinecode{project.tex} (in the build directory and generated automatically) and \inlinecode{paper.tex} (in the source directory and written by hand).
     In turn, \inlinecode{project.tex} depends on all the \inlinecode{*.tex} files at the bottom of the Makefiles above it.
+    The solid arrows and built boxes with full opacity are actually described in the context of a demonstration project in this paper.
+    The dashed arrows and lower opacity built boxes, just shows how adding more elements to the lineage is also easily possible, making this a scalable tool.
   }
 \end{figure}
 
@@ -961,14 +963,14 @@ In other words, it formalizes the connections of this scholarship with previous
 \label{sec:valuesintext}
 Figures, plots, tables and narrative aren't the only analysis output that goes into the paper.
 In many cases, quantitative values from the analysis are also blended into the sentences of the report's narration.
-For example this sentence in the abstract of \citet{akhlaghi19}: ``... the outer wings of M51 down to S/N of 0.25 ...''.
+For example this sentence in the abstract of \citet{akhlaghi19}: ``... detect the outer wings of M51 down to S/N of 0.25 ...''.
 The reported signal-to-noise ratio (S/N) value ``0.25'' depends on the analysis and is an output of the analysis just like paper's figures and plots.
 Manually typing the number in the \LaTeX{} source is prone to very important bugs: the author may forget to check it after a change in an analysis (e.g., using a newer version of the software, or changing an analysis parameter for another part of the paper).
 Given the evolution of a scientific projects, this type of human error is very hard to avoid when such values are manually written.
 Such values must also be automatically generated.
 
 To automatically generate and blend them in the text, we use \LaTeX{} macros.
-In the quote above, the \LaTeX{} source\footnote{\citet{akhlaghi19} uses this templat to be reproducible, so its LaTeX source is available in multiple ways: 1) direct download from arXiv:\href{https://arxiv.org/abs/1909.11230}{1909.11230}, by clicking on ``other formats'', or 2) the Git or \href{https://doi.org/10.5281/zenodo.3408481}{zenodo.3408481} links is also available on arXiv.} looks like this: ``\inlinecode{\small the outer wings of M51 down to S/N of \$\textbackslash{}demo\-sf\-optimized\-sn\$}''.
+In the quote above, the \LaTeX{} source\footnote{\citet{akhlaghi19} uses this templat to be reproducible, so its LaTeX source is available in multiple ways: 1) direct download from arXiv:\href{https://arxiv.org/abs/1909.11230}{1909.11230}, by clicking on ``other formats'', or 2) the Git or \href{https://doi.org/10.5281/zenodo.3408481}{zenodo.3408481} links is also available on arXiv.} looks like this: ``\inlinecode{\small detect the outer wings of M51 down to S/N of \$\textbackslash{}demo\-sf\-optimized\-sn\$}''.
 The \LaTeX{} macro ``\inlinecode{\small\textbackslash{}demosfoptimizedsn}'' is automatically calculated and recorded during in the project and expands to the value ``\inlinecode{0.25}''.
 The automatically generated file \inlinecode{project.tex} stores all such inline output macros.
 Furthermore, Figure \ref{fig:datalineage} shows that it is a prerequisite of \inlinecode{paper.pdf} (as well as the manually written \LaTeX{} sources that are shown in green).
@@ -977,14 +979,14 @@ Therefore \inlinecode{paper.pdf} will not be built until this file is ready and
 However, managing all the necessary \LaTeX{} macros for a full project in one file is against the modularity principle and can be frustrating and buggy.
 To address this problem, all subMakefiles \emph{must} contain a fixed target with the same base-name, but with a \inlinecode{.tex} suffix.
 For example in Figure \ref{fig:datalineage}, assume \inlinecode{out-1b.dat} is a table and the mean of its third column must be reported in the paper.
-Therefore in \inlinecode{analysis1.mk}, a prerequisite of \inlinecode{analysis1.tex} is \inlinecode{out-1b.dat} (as shown by the arrow in Figure \ref{fig:datalineage}).
-The recipe of this rule will calculate the mean of the column and put it in the \LaTeX{} macro which is written in \inlinecode{analysis1.tex}.
-In a similar way, any other reported calculation from \inlinecode{analysis1.mk} is stored as a \LaTeX{} macro in \inlinecode{analysis1.tex}.
+Therefore in \inlinecode{format.mk}, a prerequisite of \inlinecode{format.tex} is \inlinecode{out-1b.dat} (as shown by the arrow in Figure \ref{fig:datalineage}).
+The recipe of this rule will calculate the mean of the column and put it in the \LaTeX{} macro which is written in \inlinecode{format.tex}.
+In a similar way, any other reported calculation from \inlinecode{format.mk} is stored as a \LaTeX{} macro in \inlinecode{format.tex}.
 
 These \LaTeX{} macro files thus form the core skeleton of the project: as shown in Figure \ref{fig:datalineage}, the outward arrows of all built files of any subMakefile ultimately leads to one of these \LaTeX{} macro files.
 Note that \emph{built} files in a subMakefile don't have to be a prerequisite of its \inlinecode{.tex} file.
 They may point to another Makefile's \LaTeX{} macro file.
-For example even though \inlinecode{input1.dat} is a target in \inlinecode{download.mk}, it isn't a prerequisite of \inlinecode{download.tex}, it is a prerequisite of \inlinecode{out-2a.dat} (a target in \inlinecode{analysis2.mk}).
+For example even though \inlinecode{input1.dat} is a target in \inlinecode{download.mk}, it isn't a prerequisite of \inlinecode{download.tex}, it is a prerequisite of \inlinecode{out-2a.dat} (a target in \inlinecode{demo-plot.mk}).
 The lineage ultimate ends in a \LaTeX{} macro file in \inlinecode{analysis3.tex}.
 
 
@@ -1054,33 +1056,39 @@ Note that in such cases the servers often encode the creation date and version o
 Even when the actual data is identical, this metadata (which is in the same file) will differ based on the moment the query was done.
 Therefore a simple checksum of the whole downloaded file can't be used for validation in such scenarios, see Section \ref{principle:verify}.
 
+\begin{figure}[t]
+  \input{tex/src/figure-inputconf.tex}
+  \vspace{-3mm}
+  \caption{\label{fig:inputconf} Contents of the \inlinecode{INPUTS.conf} file for the demonstration dataset of \citet{menke20}.
+    This file contains the basic, or minimal, metadata for retrieving the required dataset(s) of a project: it can become arbitrarily long.
+    Here, \inlinecode{M20DATA} contains the name of this dataset within this project.
+    \inlinecode{MK20MD5} contains the MD5 checksum of the dataset, in order to check the validity and integrity of the dataset before usage.
+    \inlinecode{MK20SIZE} contains the size of the dataset in human readable format.
+    \inlinecode{MK20URL} is the URL which the dataset is automatically downloaded from (only when its not already present on the host).
+    Note that the original URL (footnote \ref{footnote:dataurl}) was too long to display properly here.
+  }
+\end{figure}
+
 Each external dataset has some basic information, including its expected name on the local system (for offline access), the necessary checksum to validate it (either the whole file or just its main ``data''), and its URL/PID.
 In this template, such information regarding a project's input dataset(s) is in the \inlinecode{INPUTS.conf} file.
 See Figures \ref{fig:files} \& \ref{fig:datalineage} for the position of \inlinecode{INPUTS.conf} in the project's file structure and data lineage respectively.
-For demonstration, in this paper, we are using the datasets of \citet{menke20} which are stored in one \inlinecode{.xlsx} file on bioXriv.
-In \inlinecode{INPUTS.conf}, the example lines below show the necessary information as Make variables for this dataset.
-Just note the the full URL was too large to show in this demonstration\footnote{\label{footnote:dataurl}This is the full URL: \url{\menketwentyurl}. Note that in the \LaTeX{} source, this URL is just a macro that was created in \inlinecode{download.mk}, and directly comes from \inlinecode{INPUTS.mk}, it is not hand-written.}.
-
-\begin{lstlisting}[language=bash]
-  MK20DATA = menke20.xlsx
-  MK20MD5  = 8e4eee64791f351fec58680126d558a0
-  MK20SIZE = 1.9MB
-  MK20URL  = https://the.full.url/is/too/large/for/here/media-1.xlsx
-\end{lstlisting}
+For demonstration, in this paper, we are using the datasets of \citet{menke20} which are stored in one \inlinecode{.xlsx} file on bioXriv\footnote{\label{footnote:dataurl}Full data URL: \url{\menketwentyurl}}.
+Figure \ref{fig:inputconf} shows the corresponding \inlinecode{INPUTS.conf}, show the necessary information as Make variables for this dataset.
 
 \begin{figure}[t]
-  \input{tex/src/figure-download.tex}
+  \input{tex/src/figure-src-download.tex}
   \vspace{-3mm}
-  \caption{\label{fig:download} Simplified Make rule, showing how the downloaded data URL is written into this paper (Footnote \ref{footnote:dataurl}).
-    In Make, lines starting with a \inlinecode{\#} are ignored (thus used for comments, like first line here).
-    The \emph{target} is placed before a colon (\inlinecode{:}) and its \emph{prerequisite(s)} is(are) after the colon (here, both can be seen in the second line).
+  \caption{\label{fig:download} Simplified Make rule, showing how the downloaded data URL is written into this paper (in Footnote \ref{footnote:dataurl}).
+    In Make, lines starting with a \inlinecode{\#} are ignored (thus used for human-readable comments, like the red line shown here).
+    The \emph{target} is placed before a colon (\inlinecode{:}) and its \emph{prerequisite(s)} is(are) after the colon.
+    Here, both the target and prerequisite can be seen in the second line.
     The executable \emph{recipe} lines (shell commands to build the target from the prerequisite), start with a \inlinecode{TAB} (shown here with a light gray \inlinecode{\_\_\_TAB\_\_\_}).
-    A Make recipe can be viewed as a containerized shell script.
+    A Make recipe is an independent, or containerized, shell script.
     In the recipe, \inlinecode{\$@} is an \emph{automatic variable}, expanding to the target file's name.
-    The \inlinecode{MK20URL} variable is defined in \inlinecode{INPUTS.conf} and directly used to download the input dataset.
-    The same URL is then passed to this paper through the definition of the \inlinecode{\textbackslash{}menketwentyurl} \LaTeX{} variable that is written in \inlinecode{\$(mtexdir)/download.tex}.
+    For \inlinecode{MK20URL}, see Figure \ref{fig:inputconf}.
+    The same URL is then passed to this paper through the definition of the \LaTeX{} variable \inlinecode{\textbackslash{}menketwentyurl} that is written in \inlinecode{\$(mtexdir)/download.tex}.
     Later, when the paper's PDF is being built, this \inlinecode{.tex} file is loaded into it.
-    \inlinecode{mtexdir} is the directory hosting all the \LaTeX{} macro files for various stages of the analysis, see Section \ref{sec:valuesintext}.
+    \inlinecode{\$(mtexdir)} is the directory hosting all the \LaTeX{} macro files for various stages of the analysis, see Section \ref{sec:valuesintext}.
   }
 \end{figure}
 
@@ -1114,52 +1122,149 @@ The analysis subMakefile(s) are loaded into \inlinecode{top-make.mk} after the i
 However, the analysis phase involves much more complexity.
 If done without modularity in mind from the start, research project sources can become very long, thus becoming hard to modify, debug, improve or read.
 Maneage is therefore designed to encourage and facilitate splitting the analysis into multiple/modular subMakefiles.
-For example in the data lineage graph of Figure \ref{fig:datalineage}, the analysis is broken into three subMakefiles: \inlinecode{analysis-1.mk}, \inlinecode{analysis-2.mk} and \inlinecode{analysis-3.mk}.
+For example in the data lineage graph of Figure \ref{fig:datalineage}, the analysis is broken into three subMakefiles: \inlinecode{format.mk}, \inlinecode{demo-plot.mk} and \inlinecode{analysis3.mk}.
 
-Theoretical discussion of this phase can be hard to follow, we will thus describe the contents of \inlinecode{analysis1\-.mk} (Figure \ref{fig:mk20tab3}) in a demo project on data from \citet{menke20}.
+Theoretical discussion of this phase can be hard to follow, we will thus describe a demonstration project on data from \citet{menke20}.
 In Section \ref{sec:download}, the process of importing this dataset into the proejct was described.
-The first issue is that \inlinecode{menke20.xlsx} must be converted to a simple plain-text table which is generically usable by simple tools (see principle of minimal complexity in Section \ref{principle:complexity}).
+The first issue is that \inlinecode{menke20.xlsx} must be converted to a simple plain-text table which is generically usable by simple tools (see the principle of minimal complexity in Section \ref{principle:complexity}).
 For more on the problems with Microsoft Office and this format, see Section \ref{sec:lowlevelanalysis}.
-In \inlinecode{analysis1.mk} (Figure \ref{fig:mk20tab3}), we thus convert it to a simple white-space separated, plain-text table (\inlinecode{menke20-table-3.txt}) and do a basic calculation here to report.
+In \inlinecode{format.mk} (Figure \ref{fig:formatsrc}), we thus convert it to a simple white-space separated, plain-text table (\inlinecode{menke20-table-3.txt}) and do a basic calculation on it.
 
 \begin{figure}[t]
-  \input{tex/src/figure-mk20tab3.tex}
+  \input{tex/src/figure-src-format.tex}
   \vspace{-3mm}
-  \caption{\label{fig:mk20tab3}Simplified contents of \inlinecode{analysis1.mk}.
+  \caption{\label{fig:formatsrc}Simplified contents of \inlinecode{format.mk}.
     Here, we want to convert the downloaded XLSX dataset (Office Open XML Workbook format) to a simple plain-text fixed-width-per-column table.
     For the position of this subMakefile in the full project's data lineage, see Figure \ref{fig:datalineage}.
-    In particular, here the arrows of that figure from \inlinecode{menke20.xlsx} to \inlinecode{menke20-table-3.txt} and from the latter to \inlinecode{analysis1.tex} are shown as the second and third Make rules.
+    In particular, here the arrows of that figure from \inlinecode{menke20.xlsx} to \inlinecode{menke20-table-3.txt} and from the latter to \inlinecode{format.tex} are shown as the second and third Make rules.
     See Figure \ref{fig:download} and Appendix \ref{appendix:make} for more on the Make notation and Section \ref{sec:analysis} for describing the steps.
   }
 \end{figure}
 
-As shown in Figure \ref{fig:mk20tab3}, the first operation (or Make \emph{rule}) is to define a directory to keep the generated files.
+As shown in Figure \ref{fig:formatsrc}, the first operation (or Make \emph{rule}) is to define a directory to keep the generated files.
 To keep the source and build-directories separate, we thus define \inlinecode{a1dir} under the build-directory (\inlinecode{BDIR}, see Section \ref{sec:localdirs}).
 We'll then define all outputs/targets to be under this directory.
 The second rule (which depends on the directory as a prerequisite), then converts the Microsoft Excel spreadsheet file to a simple plain-text format using the XLSX I/O program.
 But XLSX I/O only converts to CSV and we don't need all the columns here, so we further shorten and modify the table (re-order columns and multiply them) using the AWK program (which is available on any Unix-like operating system).
 In Figure \ref{fig:datalineage} on the example data lineage, this second rule is shown with the arrow from \inlinecode{menke20.xlsx} to \inlinecode{menke20-table-3.txt}.
 
-Finally, as described in Section \ref{sec:valuesintext}, the last rule of a subMakefile should be a \LaTeX{} macro file (in Figure \ref{fig:mk20tab3}, this is the third rule).
-Ending each analysis phase with a \LaTeX{} macro is natural in many reports.
+Finally, as described in Section \ref{sec:valuesintext}, the last rule of a subMakefile should be a \LaTeX{} macro file (in Figure \ref{fig:formatsrc}, this is the third rule).
+Ending each analysis phase with a \LaTeX{} macro is natural in many papers/reports.
 For example, here, once the dataset is ready, we want to give the reader a general view of the dataset size.
-We thus need to report the number of subjects (papers/journals) studied in \citet{menke20}.
+We thus need to report the number of subjects studied in \citet{menke20}.
 Therefore in the \LaTeX{} macro rule, we count them from the simplified table of the second rule.
-In both cases, we write the sum as a temporary shell variable \inlinecode{v}, then write the value of \inlinecode{v} into \inlinecode{\textbackslash{}menkenumpapers} and \inlinecode{\textbackslash{}menkenumjournals} \LaTeX{} macros respectively.
+In both cases, we write the sum as a temporary shell variable \inlinecode{v}, which is respectively written into these two \LaTeX{} macros \inlinecode{\textbackslash{}menkenumpapers} and \inlinecode{\textbackslash{}menkenumjournals}.
 In the built PDF paper, they expand to $\menkenumpapers$ (number of papers studied) and $\menkenumjournals$ (number of journals studied) respectively.
-This rule is shown schematically in Figure \ref{fig:datalineage} with the arrow from \inlinecode{menke20-table-3.txt} to \inlinecode{analysis1.tex}.
+This rule is shown schematically in Figure \ref{fig:datalineage} with the arrow from \inlinecode{menke20-table-3.txt} to \inlinecode{format.tex}.
 
-Figure \ref{fig:mk20tab3} also shows one major advantage of Maneage: 1) The XLSX I/O software may not be present on many systems, or 2) the \inlinecode{FPAT} feature is only present in GNU AWK, not all implementations of AWK.
-Therefore, while this Makefile can work when run alone, on many systems it won't complete successfuly because of these major portability problems.
-However, because Maneage installs its own software, these problems don't exist: specific versions of XLSX I/O and GNU AWK are installed within the project.
-Such portability problems are much more pronounced and relevant in higher-level science software.
+To further demonstrate the concept, we'll reproduce (with some enhancements) Figure 1C of \citet{menke20} in Figure \ref{fig:toolsperyear}.
+Figure \ref{fig:toolsperyear} also shows the number of papers that were studied each year in the same plot (unlike the original plot).
+Its horizontal axis also shows the full range of the data (starting from $\menkefirstyear$) while the original Figure 1C in \citet{menke20} starts from 1997.
+The reason \citet{menke20} decided to avoid earlier years was probably the small number of papers before 1997.
+For example in \menkenumpapersdemoyear, they had only studied \menkenumpapersdemocount{} papers.
+Note that both the numbers of this sentence, and the first year of data mentioned above, are actually \LaTeX{} macros, see Figure \ref{fig:demoplotsrc}).
 
+\begin{figure}[t]
+  \begin{center}
+    \includetikz{figure-tools-per-year}
+  \end{center}
+  \vspace{-5mm}
+  \caption{\label{fig:toolsperyear}Fraction of papers mentioning software tools (green line, left vertical axis) to total number of papers studied in that year (light red bars, right vertical axis in log-scale).
+    Data from \citet{menke20}.
+    The subMakefile archiving the executable lineage of figure's data is shown in Figure \ref{fig:demoplotsrc} and discussed in Section \ref{sec:analysis}.
+  }
+\end{figure}
 
+The operation of reproducing that figure is a contextually separate operation from the operations that were described above in \inlinecode{format.mk}.
+Therfore we add a new subMakefile to the project called \inlinecode{demo-plot.mk}, which is shown in Figure \ref{fig:demoplotsrc}.
+As before, in the first rule, we make the directory to host the data (\inlinecode{a2dir}).
+However, unlike before, this directory is placed under \inlinecode{texdir} which is the directory hosting all \LaTeX{} related files.
+This is because the plot of Figure \ref{fig:toolsperyear} is directly made within \LaTeX{}, using its PGFPlots package\footnote{PGFPLots package of \LaTeX: \url{https://ctan.org/pkg/pgfplots}.
+  \inlinecode{texdir} has some special features when using \LaTeX{}, see Section \ref{sec:buildingpaper}.
+  PGFPlots uses the same graphics engine that is building the paper, producing a highquality figure that blends nicely in the paper.}.
+Note that this is just our personal choice, other methods of generating plots (for example with R, Gnuplot or Matplotlib) are also possible within this system, see Section \ref{sec:buildingpaper}.
+
+The plain-text table that is used to build Figure \ref{fig:toolsperyear} is defined as the variable \inlinecode{a2mk20f1c} of Figure \ref{fig:demoplotsrc} (just above the second rule).
+As shown in the second rule, again we use GNU AWK to extract the necessary information from \inlinecode{mk20tab3} (which was built in \inlinecode{format.mk}).
+\inlinecode{mk20tab3} is thus the \emph{prerequisite} of \inlinecode{a2mk20f1c} (along with \inlinecode{a2dir}).
+In Figure \ref{fig:datalineage}, this lineage is shown as the arrow from \inlinecode{menke20-table-3.txt} (file name of \inlinecode{mk20tab3}) that points to \inlinecode{tools-per-year.txt} (file name of \inlinecode{a2mk20f1c}).
+
+As with all subMakefiles, \inlinecode{demo-plot.mk} finishes with the rule to build its \LaTeX{} macro file (\inlinecode{demo-plot.tex}) containing the values reported above.
+But here, it doesn't just depend on \inlinecode{a2mk20f1c}, it also depends on the \inlinecode{menke-demo-year.conf} configuration file.
+This is also visible in the data lineage (Figure \ref{fig:datalineage}): two arrows point to \inlinecode{demo-plot.tex}, one from a configuration file, and one from a built file.
+Configuration files are discussed in more detain in Section \ref{sec:configfiles}.
 
+\begin{figure}[t]
+  \input{tex/src/figure-src-demoplot.tex}
+  \vspace{-2mm}
+  \caption{\label{fig:demoplotsrc}Contents of \inlinecode{analysi2.mk} subMakefile used to generate the data for Figure \ref{fig:toolsperyear}.
+  }
+\end{figure}
 
+In a similar manner many more subMakefiles can be added in more complex analysis scenarios.
+This is shown with the lower opacity files and dashed arrows of the data lineage in Figure \ref{fig:datalineage}.
+Generally, the files created within one subMakefile don't necessarily have to be a prerequisite of its \LaTeX{} macro.
+For example see \inlinecode{demo-out.dat} in Figure \ref{fig:datalineage}: it is managed in \inlinecode{demo-plot.mk}, however, it isn't a prerequisite of \inlinecode{demo-plot.tex}, it is a prerequisite of \inlinecode{out-3b.dat} (which is managed in \inlinecode{another-step.mk} and is a prerequisite of \inlinecode{another-step.tex}).
+Hence ultimately, through another file, it's decendants conclude in a \LaTeX{} macro.
 
+The high-level \inlinecode{top-make.mk} file is designed to simplify the addition of new subMakefiles for the authors, and reading the source for readers (see Section \ref{sec:highlevelanalysis}).
+As mentioned before, this high-level Makefile just defines the ultimate target (\inlinecode{paper.pdf}, see Section \ref{sec:paperpdf}) and imports all the subMakefiles in the specific order.
+For example Figure \ref{fig:topmake} shows this project's \inlinecode{top-make.mk}.
+When descriptive names are chosen for the subMakefiles, a simple glance over the values to \inlinecode{makesrc} here provides a general understanding of the project without needing to get into the technical details.
 
+\begin{figure}[t]
+  \input{tex/src/figure-src-topmake.tex}
+  \vspace{-3mm}
+  \caption{\label{fig:topmake} Important parts of High-level \inlinecode{top-make.mk}.
+  }
+\end{figure}
+
+
+
+\subsubsection{Configuration files}
+\label{sec:configfiles}
+
+The analysis subMakefiles discussed above in Section \ref{sec:analysis} should only contain the organization of an analysis, they should not contains any fixed numbers, settings or parameters.
+Such elements should only be used as variables that are defined elsewhere.
+In the data lineage plot of Figure \ref{fig:datalineage}, configuration files are shown as the sharp-edged, green \inlinecode{*.conf} files in the top row.
+
+The last recipe of Figure \ref{fig:demoplotsrc} is a good demonstration of their usage: in Section \ref{sec:analysis}, we reported the number of papers studied by \citet{menke20} in \menkenumpapersdemoyear.
+However, note that in Figure \ref{fig:demoplotsrc}, the year's number is not written by hand in the subMakefile.
+It is referenced through the \inlinecode{menke-year-demo} variable, which is defined in \inlinecode{menke-demo-year.conf}, that is a prerequisite of the \inlinecode{demo-plot.tex} rule.
+This is also visible in the data lineage of Figure \ref{fig:demoplotsrc}.
+
+All the configuration files of a project are placed under the \inlinecode{reproduce/analysis/config} (see Figure \ref{fig:files}) subdirectory, and are loaded into \inlinecode{top-make.mk} before any of the subMakefiles, see Figure \ref{fig:topmake}.
+The configuration files greatly simplify project management from multiple perspectives as listed below:
+
+\begin{itemize}
+\item If an analysis parameter is used in multiple places within the project, simply changing the value in the configuration file will change it everywhere in the project.
+  This is cirtical in more complex projects and if not done like this can lead to significant human error.
+\item Configuration files enable the logical separation between the low-level implementation and high-level running of a project.
+  For example after writing the project, the authors don't need to remember where the number/parameter was used, they can just modify the configuration file.
+  Other co-authors, or readers, of the project also benefit: they just need to know that there is a unified place for high-level project settings, parameters, or numbers without necessarily having to know the low-level implementation.
+\item A configuration file will be a prerequisite to any rule that uses it's value.
+  If the configuration file is updated (the value/parameter is changed), Make will automatically detect the data lineage branch that is affected by it and re-execute only that branch, without any human interference.
+\end{itemize}
 
+This is a great leap compared the current, mostly manual, project management that many scientists employ.
+Manual management is prone to serious human error factors: at the later phases of a project, scientists are least likely to experiment on their project's configurations.
+However, the later phases of a project are precisely the times where the lower-level parts of the project are complete and the authors can look at the bigger picture.
+This style of managing project parameters therefore produces a much more healthy scientific result where experimentation is very cheap during all phases of a project; before its publication (by the authors) and after it (by the authors and readers).
+
+
+
+
+
+\subsubsection{The validation}
+\label{sec:thevalidation}
+
+\subsubsection{Building the paper}
+\label{sec:buildingpaper}
+
+\begin{itemize}
+\item Discuss the importance of putting the \LaTeX{} related files in \inlinecode{texdir}. Especially how \inlinecode{tex/build} points to it.
+\item Discuss how easy it is to built graphics outside of \LaTeX{}.
+\end{itemize}
 
 
 \section{Discussion}
-- 
cgit v1.2.1

