aboutsummaryrefslogtreecommitdiff
path: root/about.html
diff options
context:
space:
mode:
Diffstat (limited to 'about.html')
-rw-r--r--about.html112
1 files changed, 35 insertions, 77 deletions
diff --git a/about.html b/about.html
index cc233f1..248142a 100644
--- a/about.html
+++ b/about.html
@@ -212,9 +212,7 @@
command-line with the following command (you can come out of the "Info"
environment by pressing <code>q</code>).</p>
- <pre><code>
-info make
- </code></pre>
+ <pre><code>info make</code></pre>
<p>If you aren't familiar with the Info documentation format, we strongly
recommend running <code>$ info info</code> and reading along. In less than an hour,
@@ -549,14 +547,12 @@ info make
create and go into the conventional <code>master</code> branch to start
committing in your project later.</p>
- <pre><code>
-git clone https://git.maneage.org/project.git <span class="comment"># Clone/copy the project and its history.</span>
+ <pre><code>git clone https://git.maneage.org/project.git <span class="comment"># Clone/copy the project and its history.</span>
mv project my-project <span class="comment"># Change the name to your project's name.</span>
cd my-project <span class="comment"># Go into the cloned directory.</span>
git remote rename origin origin-maneage <span class="comment"># Rename current/only remote to "origin-maneage".</span>
git checkout -b master <span class="comment"># Create and enter your own "master" branch.</span>
-pwd <span class="comment"># Just to confirm where you are.</span>
- </code></pre></li>
+pwd <span class="comment"># Just to confirm where you are.</span></code></pre></li>
<li><p><strong>Prepare to build project</strong>: The <code>./project configure</code> command of the
next step will build the different software packages within the
"build" directory (that you will specify). Nothing else on your system
@@ -572,10 +568,8 @@ pwd <span class="comment"># Just to
installed in the project build directory it will be removed. Again,
don't worry, nothing will be installed outside the build directory.</p>
- <pre><code>
-<span class="comment"># On another terminal (go to top project source directory, last command above)</span>
-./project --check-config
- </code></pre></li>
+ <pre><code><span class="comment"># On another terminal (go to top project source directory, last command above)</span>
+./project --check-config</code></pre></li>
<li><p><strong>Test Maneage</strong>: Before making any changes, it is important to test it
and see if everything works properly with the commands below. If there
is any problem in the <code>./project configure</code> or <code>./project make</code> steps,
@@ -587,11 +581,9 @@ pwd <span class="comment"># Just to
Maneage for your project. But before that, clean all the extra Maneage
outputs with <code>make clean</code> as shown below.</p>
- <pre><code>
-./project configure <span class="comment"># Build the project's software environment (can take an hour or so).</span>
+ <pre><code>./project configure <span class="comment"># Build the project's software environment (can take an hour or so).</span>
./project make <span class="comment"># Do the processing and build paper (just a simple demo).</span>
-<span class="comment"># Open 'paper.pdf' and see if everything is ok.
- </code></pre></li>
+<span class="comment"># Open 'paper.pdf' and see if everything is ok.</code></pre></li>
<li><p><strong>Setup the remote</strong>: You can use any <a href="https://en.wikipedia.org/wiki/Comparison_of_source_code_hosting_facilities">hosting
facility</a>
that supports Git to keep an online copy of your project's version
@@ -614,11 +606,9 @@ pwd <span class="comment"># Just to
command, you can actually check this (which local and remote branches
are tracking each other).</p>
- <pre><code>
-git remote add origin XXXXXXXXXX <span class="comment"># Newly created repo is now called 'origin'.</span>
+ <pre><code>git remote add origin XXXXXXXXXX <span class="comment"># Newly created repo is now called 'origin'.</span>
git push --set-upstream origin master <span class="comment"># Push 'master' branch to 'origin' (with tracking).</span>
-git push origin maneage <span class="comment"># Push 'maneage' branch to 'origin' (no tracking).</span>
- </code></pre></li>
+git push origin maneage <span class="comment"># Push 'maneage' branch to 'origin' (no tracking).</span></code></pre></li>
<li><p><strong>Title</strong>, <strong>short description</strong> and <strong>author</strong>: The title and basic
information of your project's output PDF paper should be added in
<code>paper.tex</code>. You should see the relevant place in the preamble (prior
@@ -657,11 +647,9 @@ git push origin maneage <span class="comment"># Push 'maneage' b
<code>download</code> to <code>XXXXX</code> (any temporary string, you'll fix it in the
end of your project, when its complete).</p></li>
<li><p>Delete all <code>delete-me*</code> files in the following directories:</p>
- <pre><code>
-rm tex/src/delete-me*
+ <pre><code>rm tex/src/delete-me*
rm reproduce/analysis/make/delete-me*
-rm reproduce/analysis/config/delete-me*
- </code></pre></li>
+rm reproduce/analysis/config/delete-me*</code></pre></li>
<li><p>Disable verification of outputs by removing the <code>yes</code> from
<code>reproduce/analysis/config/verify-outputs.conf</code>. Later, when you are
ready to submit your paper, or publish the dataset, activate
@@ -672,10 +660,8 @@ rm reproduce/analysis/config/delete-me*
<li><p>Re-make the project (after a cleaning) to see if you haven't
introduced any errors.</p>
- <pre><code>
-./project make clean
-./project make
- </code></pre></li>
+ <pre><code>./project make clean
+./project make</code></pre></li>
</ul></li>
<li><p><strong>Don't merge some files in future updates</strong>: As described below, you
can later update your infra-structure (for example to fix bugs) by
@@ -694,15 +680,13 @@ rm reproduce/analysis/config/delete-me*
other change in that file. Also, don't add core Maneage Makefiles,
otherwise Maneage can break on the next run.</p>
- <pre><code>
-echo "paper.tex merge=ours" &gt; .gitattributes
+ <pre><code>echo "paper.tex merge=ours" &gt; .gitattributes
echo "tex/src/delete-me.mk merge=ours" &gt;&gt; .gitattributes
echo "tex/src/delete-me-demo.mk merge=ours" &gt;&gt; .gitattributes
echo "reproduce/analysis/make/delete-me.mk merge=ours" &gt;&gt; .gitattributes
echo "reproduce/software/config/TARGETS.conf merge=ours" &gt;&gt; .gitattributes
echo "reproduce/analysis/config/delete-me-num.conf merge=ours" &gt;&gt; .gitattributes
-git add .gitattributes
- </code></pre></li>
+git add .gitattributes</code></pre></li>
<li><p><strong>Copyright and License notice</strong>: It is necessary that <em>all</em> the
"copyright-able" files in your project (those larger than 10 lines)
have a copyright and license notice. Please take a moment to look at
@@ -720,10 +704,8 @@ git add .gitattributes
<code>tex/src/preamble-header.tex</code>, <code>reproduce/analysis/make/top-make.mk</code>,
and generally, all the files you modified in the previous step.</p>
- <pre><code>
-Copyright (C) 2018-2020 Existing Name &lt;existing@email.address&gt;
-Copyright (C) 2020 YOUR NAME &lt;YOUR@EMAIL.ADDRESS&gt;
- </code></pre></li>
+ <pre><code>Copyright (C) 2018-2020 Existing Name &lt;existing@email.address&gt;
+Copyright (C) 2020 YOUR NAME &lt;YOUR@EMAIL.ADDRESS&gt;</code></pre></li>
<li><p><strong>Configure Git for fist time</strong>: If this is the first time you are
running Git on this system, then you have to configure it with some
basic information in order to have essential information in the commit
@@ -732,11 +714,9 @@ Copyright (C) 2020 YOUR NAME &lt;YOUR@EMAIL.ADDRESS&gt;
can also specify your favorite text editor for making the commit
(<code>emacs</code>, <code>vim</code>, <code>nano</code>, and etc.).</p>
- <pre><code>
-git config --global user.name "YourName YourSurname"
+ <pre><code>git config --global user.name "YourName YourSurname"
git config --global user.email your-email@example.com
-git config --global core.editor nano
- </code></pre></li>
+git config --global core.editor nano</code></pre></li>
<li><p><strong>Your first commit</strong>: You have already made some small and basic
changes in the steps above and you are in your project's <code>master</code>
branch. So, you can officially make your first commit in your
@@ -745,16 +725,14 @@ git config --global core.editor nano
always re-build the system before a commit to be sure it works as
expected.</p>
- <pre><code>
-git status <span class="comment"># See which files you have changed.</span>
+ <pre><code>git status <span class="comment"># See which files you have changed.</span>
git diff <span class="comment"># Check the lines you have added/changed.</span>
./project make <span class="comment"># Make sure everything builds successfully.</span>
git add -u <span class="comment"># Put all tracked changes in staging area.</span>
git status <span class="comment"># Make sure everything is fine.</span>
git diff --cached <span class="comment"># Confirm all the changes that will be committed.</span>
git commit <span class="comment"># Your first commit: put a good description!</span>
-git push <span class="comment"># Push your commit to your remote.</span>
- </code></pre></li>
+git push <span class="comment"># Push your commit to your remote.</span></code></pre></li>
<li><p><strong>Start your exciting research</strong>: You are now ready to add flesh and
blood to this raw skeleton by further modifying and adding your
exciting research steps. You can use the "published works" section in
@@ -798,9 +776,7 @@ git push <span class="comment"># Push your commit to your remo
dataset with the command below and replace it with your input's
dataset.</p>
- <pre><code>
-grep -ir wfpc2 ./*
- </code></pre></li>
+ <pre><code>grep -ir wfpc2 ./*</code></pre></li>
<li><p><strong><code>README.md</code></strong>: Correct all the <code>XXXXX</code> place holders (name of your
project, your own name, address of your project's online/remote
repository, link to download dependencies and etc). Generally, read
@@ -861,9 +837,7 @@ grep -ir wfpc2 ./*
attempt, the <code>./project make</code> script should be run with the
<code>--prepare-redo</code> option, or you can delete the special file above.</p>
- <pre><code>
-./project make --prepare-redo
- </code></pre></li>
+ <pre><code>./project make --prepare-redo</code></pre></li>
<li><p><strong>Pre-publication</strong>: add notice on reproducibility**: Add a notice
somewhere prominent in the first page within your paper, informing the
reader that your research is fully reproducible. For example in the
@@ -981,9 +955,7 @@ grep -ir wfpc2 ./*
<a href="https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html">here</a>. If
you use GNU Make, you can also see this page on your command-line:</p>
- <pre><code>
-info make "automatic variables"
- </code></pre></li>
+ <pre><code>info make "automatic variables"</code></pre></li>
<li><p><em>Debug</em>: Since Make doesn't follow the common top-down paradigm, it
can be a little hard to get accustomed to why you get an error or
un-expected behavior. In such cases, run Make with the <code>-d</code>
@@ -1004,15 +976,13 @@ info make "automatic variables"
<code>large2.fits</code> and delete <code>large1.fits</code> in the same rule (when its no
longer needed). We can later do the same with <code>large2.fits</code> when it
is no longer needed and so on.
- <pre><code>
-large1.fits.txt: input.fits
+ <pre><code>large1.fits.txt: input.fits
astarithmetic $&lt; 2 + --output=$(subst .txt,,$@)
echo "done" &gt; $@
large2.fits.txt: large1.fits.txt
astarithmetic $(subst .txt,,$&lt;) 2 - --output=$(subst .txt,,$@)
rm $(subst .txt,,$&lt;)
-echo "done" &gt; $@
- </code></pre>
+echo "done" &gt; $@</code></pre>
A more advanced Make programmer will use Make's <a href="https://www.gnu.org/software/make/manual/html_node/Call-Function.html">call function</a>
to define a wrapper in <code>reproduce/analysis/make/initialize.mk</code>. This
wrapper will replace <code>$(subst .txt,,XXXXX)</code>. Therefore, it will be
@@ -1031,8 +1001,7 @@ echo "done" &gt; $@
deletion. For example, see the minimal working example Makefile below
(which you can actually put in a <code>Makefile</code> and run if you have an
<code>input.fits</code> in the same directory, and Gnuastro is installed).
- <pre><code>
-.ONESHELL:
+ <pre><code>.ONESHELL:
.SHELLFLAGS = -ec
all: mean-std.txt
shm-maneage := /dev/shm/$(shell whoami)-maneage-XXXXXXXXXX
@@ -1049,8 +1018,7 @@ echo "$$out" &gt; $@
mean-std.txt: large2.txt
input=$$(cat $&lt;)
aststatistics $$input.fits --mean --std &gt; $@
-rm $$input.fits $$input
- </code></pre>
+rm $$input.fits $$input</code></pre>
The important point here is that the temporary name template
(<code>shm-maneage</code>) has no suffix. So you can add the suffix
corresponding to your desired format afterwards (for example
@@ -1117,14 +1085,12 @@ rm $$input.fits $$input
<strong>conflicts</strong> which might happen in the merge (updated settings that
you have customized in Maneage).</p>
- <pre><code>
-git checkout maneage
+ <pre><code>git checkout maneage
git pull <span class="comment"># Get recent work in Maneage</span>
git log XXXXXX..XXXXXX --reverse <span class="comment"># Inspect new work (replace XXXXXXs with hashs mentioned in output of previous command).</span>
git log --oneline --graph --decorate --all <span class="comment"># General view of branches.</span>
git checkout master <span class="comment"># Go to your top working branch.</span>
-git merge maneage <span class="comment"># Import all the work into master.</span>
- </code></pre></li>
+git merge maneage <span class="comment"># Import all the work into master.</span></code></pre></li>
<li><p><em>Adding Maneage to a fork of your project</em>: As you and your colleagues
continue your project, it will be necessary to have separate
forks/clones of it. But when you clone your own project on a
@@ -1135,11 +1101,9 @@ git merge maneage <span class="comment"># Import all the work
below will setup the <code>origin-maneage</code> remote, and a local <code>maneage</code>
branch to track it, on the new clone.</p>
- <pre><code>
-git remote add origin-maneage https://git.maneage.org/project.git
+ <pre><code>git remote add origin-maneage https://git.maneage.org/project.git
git fetch origin-maneage
-git checkout -b maneage --track origin-maneage/maneage
- </code></pre></li>
+git checkout -b maneage --track origin-maneage/maneage</code></pre></li>
<li><p><em>Commit message</em>: The commit message is a very important and useful
aspect of version control. To make the commit message useful for
others (or yourself, one year later), it is good to follow a
@@ -1197,18 +1161,14 @@ git checkout -b maneage --track origin-maneage/maneage
project):</li>
</ul>
- <pre><code>
-git bundle create my-project-git.bundle --all
- </code></pre>
+ <pre><code>git bundle create my-project-git.bundle --all</code></pre>
<ul>
<li>You can easily upload <code>my-project-git.bundle</code> anywhere. Later, if
you need to un-bundle it, you can use the following command.</li>
</ul>
- <p><p><pre><code>
-git clone my-project-git.bundle
- </code></pre></li>
+ <p><p><pre><code>git clone my-project-git.bundle</code></pre></li>
</ul></p></li>
</ul></p>
@@ -1241,9 +1201,7 @@ git clone my-project-git.bundle
architecture) and the standard program name. For example (from the Nix
webpage):</p>
- <pre><code>
-/nix/store/b6gvzjyb2pg0kjfwrjmg1vfhh54ad73z-firefox-33.1/
- </code></pre>
+ <pre><code>/nix/store/b6gvzjyb2pg0kjfwrjmg1vfhh54ad73z-firefox-33.1/</code></pre>
<p>The important thing is that the "store" is <em>not</em> in the project's search
path. After the complete installation of the software, symbolic links are