diff options
-rw-r--r-- | README-hacking.md | 28 | ||||
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | paper.tex | 7 | ||||
-rw-r--r-- | reproduce/analysis/config/gnuastro/astbuildprog.conf | 16 | ||||
-rw-r--r-- | reproduce/analysis/config/gnuastro/astconvertt.conf | 33 | ||||
-rw-r--r-- | reproduce/analysis/config/gnuastro/aststatistics.conf | 36 | ||||
-rw-r--r-- | reproduce/analysis/config/gnuastro/gnuastro.conf | 43 | ||||
-rw-r--r-- | reproduce/analysis/config/pdf-build.conf | 10 | ||||
-rw-r--r-- | reproduce/analysis/make/initialize.mk | 24 | ||||
-rw-r--r-- | reproduce/analysis/make/paper.mk | 16 | ||||
-rw-r--r-- | reproduce/analysis/make/top-make.mk | 4 | ||||
-rw-r--r-- | reproduce/analysis/make/verify.mk | 8 | ||||
-rwxr-xr-x | reproduce/software/shell/configure.sh | 62 | ||||
-rw-r--r-- | tex/src/preamble-project.tex | 27 |
14 files changed, 144 insertions, 182 deletions
diff --git a/README-hacking.md b/README-hacking.md index a598373..d944fb0 100644 --- a/README-hacking.md +++ b/README-hacking.md @@ -180,13 +180,22 @@ evolving rapidly, so some details will differ between the different versions. The more recent papers will tend to be the most useful as good working examples. - - Roukema ([2020](https://arxiv.org/abs/2007.11779), + - Peper & Roukema ([2020](https://arxiv.org/abs/2010.03742), + arXiv:2010.03742): The live version of the controlled source is [at + Codeberg](https://codeberg.org/boud/elaphrocentre); the main input + dataset, a software snapshot, the software tarballs, the project + outputs and editing history are available at + [zenodo.4062461](https://zenodo.org/record/4062461); and the + archived git history is available at + [swh:1:dir:c4770e81288f340083dd8aa9fe017103c4eaf476](https://archive.softwareheritage.org/swh:1:dir:c4770e81288f340083dd8aa9fe017103c4eaf476). + + - Roukema ([2020](https://arxiv.org/abs/2007.11779), arXiv:2007.11779): The live version of the controlled source is [at Codeberg](https://codeberg.org/boud/subpoisson); the main input dataset, a software snapshot, the software tarballs, the project outputs and editing history are available at [zenodo.3951152](https://zenodo.org/record/3951152); and the - archived git history is also available at + archived git history is available at [swh:1:dir:fcc9d6b111e319e51af88502fe6b233dc78d5166](https://archive.softwareheritage.org/swh:1:dir:fcc9d6b111e319e51af88502fe6b233dc78d5166). - Akhlaghi et al. ([2020](https://arxiv.org/abs/2006.03018), @@ -240,10 +249,9 @@ working examples. Citation -------- -A paper to fully describe Maneage has been submitted. Until then, if you -used it in your work, please cite the paper that implemented its first -version: Akhlaghi & Ichikawa -([2015](http://adsabs.harvard.edu/abs/2015ApJS..220....1A), ApJS, 220, 1). +If you use Maneage in your project please cite Akhlaghi et +al. ([2020](https://arxiv.org/abs/2006.03018), arXiv:2006.03018). It has +been submitted and is under peer review. Also, when your paper is published, don't forget to add a notice in your own paper (in coordination with the publishing editor) that the paper is @@ -1254,11 +1262,9 @@ for the benefit of others. - *Configuration files*: If your research uses special programs as part of the processing, put all their configuration files in a devoted directory (with the program's name) within - `reproduce/software/config`. Similar to the - `reproduce/software/config/gnuastro` directory (which is put in - Maneage as a demo in case you use GNU Astronomy Utilities). It is - much cleaner and readable (thus less buggy) to avoid mixing the - configuration files, even if there is no technical necessity. + `reproduce/software/config`. It is much cleaner and readable (thus + less buggy) to avoid mixing the configuration files, even if there is + no technical necessity. - **Contents**: It is good practice to follow the following @@ -419,6 +419,18 @@ command). docker cp CONTAINER:/file/path/within/container /host/path/target ``` +#### Deleting all Docker images + +After doing your tests/work, you may no longer need the multi-gigabyte +files images, so its best to just delete them. To do this, just run the two +commands below to first stop all running containers and then to delete all +the images: + +```shell +docker ps -a -q | xargs docker rm +docker images -a -q | xargs docker rmi -f +``` + @@ -14,14 +14,15 @@ %% assumed to be if you use `\includetikz' when `\makepdf' is not defined. \newcommand{\makepdf}{} -%% Import the project's processing macros 'project.tex' and the -%% Maneage-specific preambles. +%% VALUES FROM ANALYSIS (NUMBERS AND STRINGS): this file is automatically +%% generated at the end of the processing and includes LaTeX macros +%% (defined with '\newcommand') for various processing outputs to be used +%% within the paper. \input{tex/build/macros/project.tex} \input{tex/src/preamble-maneage.tex} %% Import the other necessary TeX files for this particular project. \input{tex/src/preamble-project.tex} -\input{tex/src/preamble-pgfplots.tex} %% Title and author names. \title{\projecttitle} diff --git a/reproduce/analysis/config/gnuastro/astbuildprog.conf b/reproduce/analysis/config/gnuastro/astbuildprog.conf deleted file mode 100644 index 7adb4d1..0000000 --- a/reproduce/analysis/config/gnuastro/astbuildprog.conf +++ /dev/null @@ -1,16 +0,0 @@ -# BuildProgram's configuration file depends on the build and is installed -# along with the rest of Gnuastro. So we'll set any specific configuration -# we want here, then import those. -# -# Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org> -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice and -# this notice are preserved. This file is offered as-is, without any -# warranty. - -# To keep the program's compiled excutable file, comment this line. -deletecompiled 1 - -# Import the built configuration file -config .local/etc/astbuildprog.conf
\ No newline at end of file diff --git a/reproduce/analysis/config/gnuastro/astconvertt.conf b/reproduce/analysis/config/gnuastro/astconvertt.conf deleted file mode 100644 index 770ac39..0000000 --- a/reproduce/analysis/config/gnuastro/astconvertt.conf +++ /dev/null @@ -1,33 +0,0 @@ -# Default parameters (System) for ConvertType. -# ConvertType is part of GNU Astronomy Utitlies. -# -# Use the long option name of each parameter followed by a value. The name -# and value should be separated by atleast one white-space character (for -# example ` '[space], or tab). Lines starting with `#' are ignored. -# -# For more information, please run these commands: -# -# $ astconvertt --help # Full list of options, short doc. -# $ astconvertt -P # Print all options and used values. -# $ info astconvertt # All options and input/output. -# $ info gnuastro "Configuration files" # How to use configuration files. -# -# Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org> -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice and -# this notice are preserved. This file is offered as-is, without any -# warranty. - -# Input: - -# Output: - quality 100 - widthincm 10.0 - borderwidth 1 - output jpg - -# Flux: - invert 0 - -# Common options diff --git a/reproduce/analysis/config/gnuastro/aststatistics.conf b/reproduce/analysis/config/gnuastro/aststatistics.conf deleted file mode 100644 index 90f985d..0000000 --- a/reproduce/analysis/config/gnuastro/aststatistics.conf +++ /dev/null @@ -1,36 +0,0 @@ -# Default parameters (System) for Statistics. -# Statistics is part of GNU Astronomy Utitlies. -# -# Use the long option name of each parameter followed by a value. The name -# and value should be separated by atleast one white-space character (for -# example ` '[space], or tab). Lines starting with `#' are ignored. -# -# For more information, please run these commands: -# -# $ aststatistics --help # Full list of options, short doc. -# $ aststatistics -P # Print all options and used values. -# $ info aststatistics # All options and input/output. -# $ info gnuastro "Configuration files" # How to use configuration files. -# -# Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org> -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice and -# this notice are preserved. This file is offered as-is, without any -# warranty. - -# Input image: - -# Sky and its STD settings - khdu 1 - meanmedqdiff 0.005 - outliersigma 10 - outliersclip 3,0.2 - smoothwidth 3 - sclipparams 3,0.1 - -# Histogram and CFP settings - numasciibins 70 - asciiheight 10 - numbins 100 - mirrordist 1.5 diff --git a/reproduce/analysis/config/gnuastro/gnuastro.conf b/reproduce/analysis/config/gnuastro/gnuastro.conf deleted file mode 100644 index 82cb100..0000000 --- a/reproduce/analysis/config/gnuastro/gnuastro.conf +++ /dev/null @@ -1,43 +0,0 @@ -# Default values for the common options to all the programs in GNU -# Astronomy Utitlies. -# -# IMPORTANT NOTE: The `lastconfig' option is very important in a -# reproducible environment. Because we don't want any of Gnuastro's -# programs to go into an un-controlled environment (user or system wide -# configuration files). -# -# The rest of this configuration file is taken from the default Gnuastro -# configuration from its source (`bin/gnuastro.conf'). -# -# Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org> -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice and -# this notice are preserved. This file is offered as-is, without any -# warranty. - -# Local project settings (`config' has to be before `lastconfig'). - config .gnuastro/gnuastro-local.conf - lastconfig 1 - -# Input: - hdu 1 - ignorecase 1 - searchin name - stdintimeout 100000 - -# Tessellation - tilesize 30,30 - numchannels 1,1 - remainderfrac 0.1 - workoverch 0 - interpmetric radial - interpnumngb 9 - interponlyblank 0 - -# Output: - tableformat fits-binary - -# Operating mode - quietmmap 0 - minmapsize 2000000000 diff --git a/reproduce/analysis/config/pdf-build.conf b/reproduce/analysis/config/pdf-build.conf index e2d59cc..48585b4 100644 --- a/reproduce/analysis/config/pdf-build.conf +++ b/reproduce/analysis/config/pdf-build.conf @@ -3,13 +3,13 @@ # # During the project's early phases, it is usually not necessary to build # the PDF file (which makes a lot of output lines on the command-line and -# can make it hard to find the commands and possible errors (and their -# outputs). Also, in some cases, only the produced results may be of +# can make it hard to find the analysis commands and possible errors (and +# their outputs). Also, in some cases, only the produced results may be of # interest and not the final PDF, so LaTeX (and its necessary packages) may -# not be installed. +# not be installed at all. # -# If this variable is given any string, a PDF will be made with -# LaTeX. Otherwise, a notice will just printed that for now, no PDF will be +# If 'pdf-build-final' is given the value 'yes', a PDF will be made with +# LaTeX. Otherwise, a notice will just printed that, no PDF will be # created. # # Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org> diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index 6431863..75f87ee 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -38,9 +38,6 @@ mtexdir = $(texdir)/macros bashdir = reproduce/analysis/bash pconfdir = reproduce/analysis/config installdir = $(BDIR)/software/installed -# --------- Delete for no Gnuastro --------- -gconfdir = reproduce/analysis/config/gnuastro -# ------------------------------------------ @@ -240,7 +237,7 @@ clean: clean-mmap # features like ignoring the listing of a file with `!()' that we # are using afterwards. shopt -s extglob - rm -rf $(BDIR)/tex/macros/!(dependencies.tex|dependencies-bib.tex) + rm -rf $(BDIR)/tex/macros/!(dependencies.tex|dependencies-bib.tex|hardware-parameters.tex) rm -rf $(BDIR)/!(software|tex) $(BDIR)/tex/!(macros|$(texbtopdir)) rm -rf $(BDIR)/tex/build/!(tikz) $(BDIR)/tex/build/tikz/* rm -rf $(BDIR)/software/preparation-done.mk @@ -255,8 +252,8 @@ distclean: clean # `rm' program. So for this recipe, we'll use the host system's # `rm', not our own. $$sys_rm -rf $(BDIR) + $$sys_rm -f $(pconfdir)/LOCAL.conf $$sys_rm -f Makefile .gnuastro .local .build - $$sys_rm -f $(pconfdir)/LOCAL.conf $(gconfdir)/gnuastro-local.conf @@ -487,8 +484,13 @@ print-copyright = \ # actually exists, it is also aded as a `.PHONY' target above. $(mtexdir)/initialize.tex: | $(mtexdir) - # Version and title of project. - @echo "\newcommand{\projecttitle}{$(metadata-title)}" > $@ + # Version and title of project. About the starting '@': since these + # commands are run every time with './project make', it is annoying + # to print them on the standard output every time. With the '@', + # make will not print the commands that it runs in this recipe. + @d=$$(git show -s --format=%aD HEAD | awk '{print $$2, $$3, $$4}') + echo "\newcommand{\projectdate}{$$d}" > $@ + echo "\newcommand{\projecttitle}{$(metadata-title)}" >> $@ echo "\newcommand{\projectversion}{$(project-commit-hash)}" >> $@ # arXiv/Zenodo identifier (necessary for download link): @@ -505,10 +507,6 @@ $(mtexdir)/initialize.tex: | $(mtexdir) # after cloning from a fork that didn't include it!). In this # case, we'll just return the string a clear string. v=$$(git describe --always --long maneage) || v=maneage-ref-missing + d=$$(git show -s --format=%aD $$v | awk '{print $$2, $$3, $$4}') + echo "\newcommand{\maneagedate}{$$d}" >> $@ echo "\newcommand{\maneageversion}{$$v}" >> $@ - - # Get the date of the most recent commit from the Maneage - # branch. Note that with '%aD', the format looks like this: - # Wed, 9 Sep 2020 10:08:20 +0200 - v=$$(git show -s --format=%aD $$v | awk '{print $$2, $$3, $$4}') - echo "\newcommand{\maneagedate}{$$v}" >> $@ diff --git a/reproduce/analysis/make/paper.mk b/reproduce/analysis/make/paper.mk index 6a974d9..d8f18b3 100644 --- a/reproduce/analysis/make/paper.mk +++ b/reproduce/analysis/make/paper.mk @@ -37,14 +37,14 @@ # completed. # # Note that if you don't want the final PDF and just want the processing -# and file outputs, you can remove the value of `pdf-build-final' in -# `reproduce/analysis/config/pdf-build.conf'. +# and file outputs, you can give any value other than 'yes' to +# 'pdf-build-final' in `reproduce/analysis/config/pdf-build.conf'. $(mtexdir)/project.tex: $(mtexdir)/verify.tex # If no PDF is requested, or if LaTeX isn't available, don't # continue to building the final PDF. Otherwise, merge all the TeX # macros into one for building the PDF. - @if [ -f .local/bin/latex ] && [ x"$(pdf-build-final)" != x ]; then + @if [ -f .local/bin/latex ] && [ x"$(pdf-build-final)" = xyes ]; then # Put a LaTeX input command for all the necessary macro files. # 'hardware-parameters.tex' is created in 'configure.sh'. @@ -77,11 +77,11 @@ $(mtexdir)/project.tex: $(mtexdir)/verify.tex echo "LaTeX-built PDF paper will not be built." echo if [ x$(more-on-building-pdf) = x1 ]; then - echo "To do so, make sure you have LaTeX within the project (you" - echo "can check by running './.local/bin/latex --version'), _AND_" - echo "make sure that the 'pdf-build-final' variable has a value." - echo "'pdf-build-final' is defined in: " - echo "'reproduce/analysis/config/pdf-build.conf'." + echo "To build the PDF, make sure you have LaTeX within the " + echo "project (you can check by running " + echo "'./.local/bin/latex --version'), _AND_ make sure that " + echo "the 'pdf-build-final' variable has a value of 'yes', it " + echo "is defined in: 'reproduce/analysis/config/pdf-build.conf'." echo echo "If you don't have LaTeX within the project, please re-run" echo "'./project configure -e' when you have internet access." diff --git a/reproduce/analysis/make/top-make.mk b/reproduce/analysis/make/top-make.mk index 55b1f43..18d54b1 100644 --- a/reproduce/analysis/make/top-make.mk +++ b/reproduce/analysis/make/top-make.mk @@ -62,8 +62,8 @@ include reproduce/software/config/LOCAL.conf # ----------------------------- # # If you are just interested in the processing and don't want to build the -# PDF, you can skip the creation of the final PDF by removing the value -# of `pdf-build-final' in `reproduce/analysis/config/pdf-build.conf'. +# PDF, you can skip the creation of the final PDF by giving a value of +# `yes' to `pdf-build-final' in `reproduce/analysis/config/pdf-build.conf'. ifeq (x$(reproducible_paper_group_name),x$(GROUP-NAME)) all: paper.pdf else diff --git a/reproduce/analysis/make/verify.mk b/reproduce/analysis/make/verify.mk index fe828dd..35f49db 100644 --- a/reproduce/analysis/make/verify.mk +++ b/reproduce/analysis/make/verify.mk @@ -114,8 +114,12 @@ verify-dep = $(subst verify,,$(subst paper,,$(makesrc))) verify-check = $(subst initialize,,$(verify-dep)) $(mtexdir)/verify.tex: $(foreach s, $(verify-dep), $(mtexdir)/$(s).tex) - # Make sure that verification is actually requested. - if [ x"$(verify-outputs)" = xyes ]; then + # Make sure that verification is actually requested, the '@' at the + # start of the recipe is added so Make doesn't print the commands + # on the standard output because this recipe is run on every call + # to the project and can be annoying (get mixed in the middle of + # the analysis outputs or the LaTeX outputs). + @if [ x"$(verify-outputs)" = xyes ]; then # Make sure the temporary output doesn't exist (because we want # to append to it). We are making a temporary output target so if diff --git a/reproduce/software/shell/configure.sh b/reproduce/software/shell/configure.sh index d9a1b46..0b0daea 100755 --- a/reproduce/software/shell/configure.sh +++ b/reproduce/software/shell/configure.sh @@ -212,13 +212,31 @@ if [ x$kernelname = xLinux ]; then # Don't forget to add the respective C++ compiler below (leave 'cc' in # the end). c_compiler_list="gcc clang cc" -else +elif [ x$kernelname = xDarwin ]; then host_cc=1 on_mac_os=yes # Don't forget to add the respective C++ compiler below (leave 'cc' in # the end). c_compiler_list="clang gcc cc" +else + on_mac_os=no + cat <<EOF +______________________________________________________ +!!!!!!! WARNING !!!!!!! + +Maneage has been tested on GNU/Linux and Darwin (macOS) systems. But, it +seems that the current system is not GNU/Linux or Darwin (macOS). If you +notice any problem during the configure phase, please contact us with this +web-form: + + https://savannah.nongnu.org/support/?func=additem&group=reproduce + +The configuration will continue in 10 seconds... +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +EOF + sleep 10 fi @@ -281,6 +299,47 @@ fi +# Check for Xcode in macOS systems +# -------------------------------- +# +# When trying to build Maneage on macOS systems, there are some problems +# related with the Xcode and Command Line Tools. As a consequnce, in order to +# avoid these error it is highly recommended to install Xcode in the host +# system. Here, it is checked that this is the case, and if not, warn the user +# about not having Xcode already installed. +if [ x$on_mac_os = xyes ]; then + xcode=$(which xcodebuild) + if [ x$xcode != x ]; then + xcode_version=$(xcodebuild -version | grep Xcode) + echo " " + echo "$xcode_version already installed in the system" + echo " " + else + cat <<EOF +______________________________________________________ +!!!!!!! WARNING !!!!!!! + +Maneage has been tested Darwin (macOS) systems with host Xcode +installation. However, Xcode cannot be found in this system. As a +consequence, the configure step may fail at some point. If this is the +case, please install Xcode and try to run again the configure step. If the +problem still persist after installing Xcode, please contact us with this +web-form: + + https://savannah.nongnu.org/support/?func=additem&group=reproduce + +The configuration will continue in 5 seconds ... +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +EOF + sleep 5 + fi +fi + + + + + # Check for C/C++ compilers # ------------------------- # @@ -1211,7 +1270,6 @@ ln -s "$tikzdir" tex/tikz # --------- Delete for no Gnuastro --------- rm -f .gnuastro -ln -s "$topdir"/reproduce/analysis/config/gnuastro .gnuastro # ------------------------------------------ diff --git a/tex/src/preamble-project.tex b/tex/src/preamble-project.tex index 4382485..11bf9c3 100644 --- a/tex/src/preamble-project.tex +++ b/tex/src/preamble-project.tex @@ -1,16 +1,24 @@ -%% Settings specific to this project (beyond the journal's style). +%% Necessary macros for this project. +%% +%% These are a set of packages that have been commonly necessary in most +%% LaTeX usages. However, if any are not needed in your work, please feel +%% free to remove them. % -%% Copyright (C) 2020 Mohammad Akhlaghi <mohammad@akhlaghi.org> +%% Copyright (C) 2018-2020 Mohammad Akhlaghi <mohammad@akhlaghi.org> +%% Copyright (C) YYYY Your Name <your@email.address> % -%% This LaTeX file is part of Maneage. Maneage 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 file 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. % -%% Maneage is distributed in the hope that it will be useful, but WITHOUT +%% This file 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. See <http://www.gnu.org/licenses/>. +%% for more details. +% +%% You should have received a copy of the GNU General Public License along +%% with this file. If not, see <http://www.gnu.org/licenses/>. @@ -78,3 +86,6 @@ \newcommand\eprint[1]{\href{https://arXiv.org/abs/#1}{{arXiv:#1}}} \newcommand\doi[1]{\href{https://oadoi.org/#1}{{DOI:#1}}} + +%% Import Maneage template for PGFPlots. +\input{tex/src/preamble-pgfplots.tex} |