diff options
-rw-r--r-- | README-hacking.md | 32 | ||||
-rw-r--r-- | README.md | 8 | ||||
-rwxr-xr-x | configure | 54 | ||||
-rw-r--r-- | paper.tex | 4 | ||||
-rw-r--r-- | reproduce/src/make/dependencies.mk | 2 | ||||
-rw-r--r-- | reproduce/src/make/initialize.mk | 2 | ||||
-rw-r--r-- | tex/src/references.tex | 2 |
7 files changed, 60 insertions, 44 deletions
diff --git a/README-hacking.md b/README-hacking.md index eddac1a..eaa9196 100644 --- a/README-hacking.md +++ b/README-hacking.md @@ -516,22 +516,6 @@ advanced in later stages of your work. git remote add origin XXXXXXXXXX ``` - - **Copyright**, **name** and **date**: All the "copyrightable" files - (those larger than 10 lines) must have a copyright statement and - license notice. As you progress with the project and modify files to - customize for your project change the copyright owner to your self - (since this template is free software, you can do this after you edit - any part of it). Also, don't forget to add similar notices to new - files you add for your own project. You can always find the files - without a copyright notice using this command: - - ```shell - find . -type f ! -path ./.git/\* \ - | while read i; do \ - grep -qi 'copyright \((c)\|[&]copy;\|@copyright\)' $i || echo $i;\ - done - ``` - - **Title**, **short description** and **author** in source files: In this raw skeleton, the title or short description of your project should be added in the following two files: `reproduce/src/make/top.mk` (the @@ -613,6 +597,22 @@ advanced in later stages of your work. with. Also check and update this file one last time when you are ready to publish your work (and its reproduction pipeline). + - **Copyright**: All the "copyrightable" files (those larger than 10 + lines) must have a copyright statement and license notice. As you + progress with the project and modify files to customize for your + project change the copyright owner to your self (since this template + is free software, you can do this after you edit any part of + it). Also, don't forget to add similar notices to new files you add + for your own project. You can always find the files without a + copyright notice using this command: + + ```shell + find . -type f ! -path ./.git/\* \ + | while read i; do \ + grep -qi 'copyright \((c)\|[&]copy;\|@copyright\)' $i || echo $i;\ + done + ``` + - **Your first commit**: You have already made some small and basic changes in the steps above and you are in the `master` branch. So, you can officially make your first commit in your project's history. But @@ -88,11 +88,13 @@ This pipeline was designed to have as few dependencies as possible. Copyright information --------------------- -This file is part of the reproducible paper template - https://gitlab.com/makhlaghi/reproducible-paper + +This file and `.file-metadata' (a binary file, used by Metastore to store +file dates when doing Git checkouts) are part of the reproducible paper +template (https://gitlab.com/makhlaghi/reproducible-paper) and share the +same copyright below. Copyright (C) 2018-2019 Mohammad Akhlaghi. -See the end of the file for license conditions. This template 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 @@ -654,7 +654,7 @@ itidir=$verdir/tex if ! [ -d $itidir ]; then mkdir $itidir; fi texdir=$bdir/tex -if ! [ -d $texdir ]; then mkdir $texdir; fi +if ! [ -d $texdir ]; then mkdir $texdir; ln -s $texdir tex/pipeline; fi mtexdir=$texdir/macros if ! [ -d $mtexdir ]; then mkdir $mtexdir; fi @@ -1019,25 +1019,40 @@ fi -# Put all the names and versions in a human-readable format in LaTeX. +# Put all the names and versions in a human-readable paragraph. function prepare_name_version() { - # Total number of tools to report. - num=$(.local/bin/cat "$@" | .local/bin/wc -l) - - # Put them all in one paragraph. - .local/bin/cat "$@" \ - | .local/bin/sort \ - | .local/bin/awk 'NF>0 { \ - c++; \ - if(c==1) \ - { \ - if('$num'==1) printf("%s", $0); \ - else printf("%s", $0); \ - } \ - else if(c=='$num') printf(" and %s\n", $0); \ - else printf(", %s", $0) \ - }' + # First see if the (possible) `*' in the input arguments corresponds to + # anything. Note that some of the given directories may be empty (no + # software installed). + hasfiles=0 + for f in $@; do + if [ -f $f ]; then hasfiles=1; break; fi; + done + + # If there are any files, merge all the names in a paragraph. + if [ $hasfiles = 1 ]; then + + # Count how many names there are. This is necessary to identify the + # last element. + num=$(.local/bin/cat $@ \ + | .local/bin/sed '/^\s*$/d' \ + | .local/bin/wc -l) + + # Put them all in one paragraph. + .local/bin/cat $@ \ + | .local/bin/sort \ + | .local/bin/awk 'NF>0 { \ + c++; \ + if(c==1) \ + { \ + if('$num'==1) printf("%s", $0); \ + else printf("%s", $0); \ + } \ + else if(c=='$num') printf(" and %s\n", $0); \ + else printf(", %s", $0) \ + }' + fi } # Report the different software in separate contexts (separating Python and @@ -1050,8 +1065,7 @@ texpkg=$(prepare_name_version $verdir/tex/texlive) pkgver=$mtexdir/dependencies.tex .local/bin/echo "This research was done with the following free" > $pkgver .local/bin/echo "software programs and libraries: $proglibs." >> $pkgver -npython=$(.local/bin/ls $verdir/python/* | .local/bin/wc -l) -if [ $npython != 0 ]; then +if [ x$pymodules != x ]; then .local/bin/echo "Within Python, the following modules" >> $pkgver echo "were used: $pymodules." >> $pkgver fi @@ -48,7 +48,7 @@ and bibliography. If you use this pipeline in your work, don't forget to add a notice to clearly let the readers know that your work is reproducible. If this pipeline proves useful in your research, please - cite \citet{ai15}. + cite \citet{gnuastro}. \vspace{0.25cm} @@ -175,7 +175,7 @@ abstract clearly mentioning that your work is fully reproducible. For the time being, we haven't written a specific paper only for this reproduction pipeline, so until then, we would be grateful if you could cite the first paper that used the first version of this pipeline: -\citet{ai15}. +\citet{gnuastro}. After publication, don't forget to upload all the necessary data, software source code and the reproduction pipeline to a long-lasting host like diff --git a/reproduce/src/make/dependencies.mk b/reproduce/src/make/dependencies.mk index d5e8411..ae1daa7 100644 --- a/reproduce/src/make/dependencies.mk +++ b/reproduce/src/make/dependencies.mk @@ -607,7 +607,7 @@ endif $(call gbuild, $<, gnuastro-$(gnuastro-version), static, \ $$staticopts, -j$(numthreads), \ make check -j$(numthreads)) \ - && echo "GNU Astronomy Utilities $(gnuastro-version)" > $@ + && echo "GNU Astronomy Utilities $(gnuastro-version) \citep{gnuastro}" > $@ $(ibidir)/unzip: $(tdir)/unzip-$(unzip-version).tar.gz v=$$(echo $(unzip-version) | sed -e's/\.//') diff --git a/reproduce/src/make/initialize.mk b/reproduce/src/make/initialize.mk index 3c272d8..286e64e 100644 --- a/reproduce/src/make/initialize.mk +++ b/reproduce/src/make/initialize.mk @@ -162,7 +162,7 @@ export MPI_PYTHON3_SITEARCH := .SUFFIXES: $(lockdir): | $(BDIR); mkdir $@ $(texbdir): | $(texdir); mkdir $@ -$(tikzdir): | $(texbdir); mkdir $@ && ln -s $(tikzdir) tex/tikz +$(tikzdir): | $(texbdir); mkdir $@ && ln -fs $@ tex/tikz diff --git a/tex/src/references.tex b/tex/src/references.tex index b4f4cb4..641089e 100644 --- a/tex/src/references.tex +++ b/tex/src/references.tex @@ -108,7 +108,7 @@ archivePrefix = "arXiv", -@ARTICLE{ai15, +@ARTICLE{gnuastro, author = {{Akhlaghi}, M. and {Ichikawa}, T.}, title = "{Noise-based Detection and Segmentation of Nebulous Objects}", journal = {ApJS}, |