From ee8c6be24166c16df9cd7fb1912503e25bdfde85 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Thu, 24 Sep 2020 02:15:40 +0100 Subject: Gnuastro's analysis configuration files removed Until now, the core Maneage branch included some configuration files for Gnuastro's programs. This was actually a remnant of the distant past when Maneage didn't actually build its own software and we had to rely on the host's software versions. This file contained the configuration files specific to Gnuastro for this project and also had a feature to avoid checking the host's own configuration files. However, we now build all our software ourselves with fixed configuration files (for the version that is being installed and its version is stored). So those extra configuration files were just extra and caused confusion and problems in some scenarios. With this commit, those extra files are now removed. Also, two small issues are also addressed in parallel with this commit: - When running './project make clean', the 'hardware-parameters.tex' macro file (which is created by './project configure' is not deleted. - The project title is now written into the default output's PDF's properties (through 'hypersetup' in 'tex/src/preamble-header.tex') through the LaTeX macro. All these issues were found and fixed with the help of Samane Raji. --- .../analysis/config/gnuastro/astbuildprog.conf | 16 -------- .../analysis/config/gnuastro/astconvertt.conf | 33 ----------------- .../analysis/config/gnuastro/aststatistics.conf | 36 ------------------ reproduce/analysis/config/gnuastro/gnuastro.conf | 43 ---------------------- reproduce/analysis/make/initialize.mk | 7 +--- 5 files changed, 2 insertions(+), 133 deletions(-) delete mode 100644 reproduce/analysis/config/gnuastro/astbuildprog.conf delete mode 100644 reproduce/analysis/config/gnuastro/astconvertt.conf delete mode 100644 reproduce/analysis/config/gnuastro/aststatistics.conf delete mode 100644 reproduce/analysis/config/gnuastro/gnuastro.conf (limited to 'reproduce/analysis') 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 -# -# 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 -# -# 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 -# -# 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 -# -# 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/make/initialize.mk b/reproduce/analysis/make/initialize.mk index fca75f5..3a35ece 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 -# ------------------------------------------ @@ -239,7 +236,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 @@ -254,8 +251,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 -- cgit v1.2.1 From 2b39a67c571d1b6ea2375f65be6bf55831e4eaac Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sun, 18 Oct 2020 14:37:16 +0100 Subject: Recipes for final initialize and verify targets not on stdout The LaTeX macro files for these two subMakefiles are created on every run of './project make'. So their commands are also printed every time and hardly ever will a normal user want to modify or change these. So to avoid populating the standard output of a Maneaged project with all these extra lines every time (possibly getting mixed with the important analysis or LaTeX outputs), an '@' has been placed at the start of the recipes. With an '@' at the start of the recipe, Make is instructed to not print the commands it wants to run in the standard output. --- reproduce/analysis/make/initialize.mk | 7 +++++-- reproduce/analysis/make/verify.mk | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'reproduce/analysis') diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index 3a35ece..7217f0c 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -478,8 +478,11 @@ 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. + @echo "\newcommand{\projecttitle}{$(metadata-title)}" > $@ echo "\newcommand{\projectversion}{$(project-commit-hash)}" >> $@ # Calculate the latest Maneage commit used to build this diff --git a/reproduce/analysis/make/verify.mk b/reproduce/analysis/make/verify.mk index b3d62f2..fc76b96 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 -- cgit v1.2.1 From fcc77a774f2e34bd9ed6ca4ea0f5577cba967f58 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sun, 15 Nov 2020 13:28:57 +0000 Subject: Building final PDF: pdf-build-final has to be given an explicit yes Until now, when the 'pdf-build-final' configuration variable (defined in 'reproduce/analysis/config/pdf-build.conf') was given any string a PDF would be built. This was very confusing, because people could put a 'no' and the PDF would still be built! With this commit, only when this variable has a value of 'yes' will the PDF be built. If given any other string (or no string at all), it will not produce a PDF. This issue was reported by Zahra Sharbaf. --- reproduce/analysis/config/pdf-build.conf | 10 +++++----- reproduce/analysis/make/paper.mk | 16 ++++++++-------- reproduce/analysis/make/top-make.mk | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'reproduce/analysis') 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 diff --git a/reproduce/analysis/make/paper.mk b/reproduce/analysis/make/paper.mk index 906b4d9..28f44a9 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/pdflatex ] && [ x"$(pdf-build-final)" != x ]; then + @if [ -f .local/bin/pdflatex ] && [ 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'. @@ -59,11 +59,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 9a26f22..140b026 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 creatation 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 -- cgit v1.2.1 From 6ca2fbf925d14fff862889840913e3c89ea8048a Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Mon, 30 Nov 2020 23:50:38 +0000 Subject: IMPORTANT: organizational improvements in Maneage TeX sources This only concerns the TeX sources in the default branch. In case you don't use them, there should only be a clean conflict in 'paper.tex' (that is obvious and easy to fix). Conflicts may only happen in some of the 'tex/src/preamble-*.tex' files if you have actually changed them for your project. But generally any conflict that does arise by this commit with your project branch should be very clear and easy to fix and test. In short, from now on things will even be easier: any LaTeX configuration that you want to do for your project can be done in 'tex/src/preamble-project.tex', so you don't have to worry about any other LaTeX preamble file. They are either templates (like the ones for PGFPlots and BibLaTeX) or low-level things directly related to Maneage. Until now, this distinction wasn't too clear. Here is a summary of the improvements: - Two new options to './project make': with '--highlight-new' and '--highlight-notes' it is now possible to activate highlighting on the command-line. Until now, there was a LaTeX macro for this at the start of 'paper.tex' (\highlightchanges). But changing that line would change the Git commit hash, making it hard for the readers to trust that this is the same PDF. With these two new run-time options, the printed commit hash will not changed. - paper.tex: the sentences are formatted as one sentence per line (and one line per sentence). This helps in version controlling narrative and following the changes per sentence. A description of this format (and its advantages) is also included in the default text. - The internal Maneage preambles have been modified: - 'tex/src/preamble-header.tex' and 'tex/src/preamble-style.tex' have been merged into one preamble file called 'tex/src/preamble-maneage-default-style.tex'. This helps a lot in simply removing it when you use a journal style file for example. - Things like the options to highlight parts of the text are now put in a special 'tex/src/preamble-maneage.tex'. This helps highlight that these are Maneage-specific features that are independent of the style used in the paper. - There is a new 'tex/src/preamble-project.tex' that is the place you can add your project-specific customizations. --- reproduce/analysis/make/paper.mk | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'reproduce/analysis') diff --git a/reproduce/analysis/make/paper.mk b/reproduce/analysis/make/paper.mk index 28f44a9..fc10699 100644 --- a/reproduce/analysis/make/paper.mk +++ b/reproduce/analysis/make/paper.mk @@ -48,10 +48,23 @@ $(mtexdir)/project.tex: $(mtexdir)/verify.tex # Put a LaTeX input command for all the necessary macro files. # 'hardware-parameters.tex' is created in 'configure.sh'. - rm -f $(mtexdir)/project.tex + projecttex=$(mtexdir)/project.tex + rm -f $$projecttex for t in $(subst paper,,$(makesrc)) hardware-parameters; do - echo "\input{tex/build/macros/$$t.tex}" >> $(mtexdir)/project.tex + echo "\input{tex/build/macros/$$t.tex}" >> $$projecttex done + + # Possibly highlight the '\new' parts of the text. + if [ x"$(highlightnew)" = x1 ]; then + echo "\newcommand{\highlightnew}{}" >> $$projecttex + fi + + # Possibly show the text within '\tonote'. + if [ x"$(highlightnotes)" = x1 ]; then + echo "\newcommand{\highlightnotes}{}" >> $$projecttex + fi + + # The paper shouldn't be built. else echo echo "-----" -- cgit v1.2.1 From ac8eee90b1580fb566ee5b84fef9acb4ed437c01 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Tue, 1 Dec 2020 11:43:04 +0000 Subject: Default paper: macros available for date of commits cited Until now, Maneage only provided the commit hashes (of the project and Maneage) as LaTeX macros to use in your paper. However, they are too cryptic and not really human friendly (unless you have access to the Git history on a computer). With this commit, to make things easier for the readers, the date of both commits are also available as LaTeX macros for use in the paper. The date of the Maneage commit is also included in the acknowledgements. Also, the paragraph above the acknowledgements has been updated with better explanation on why adding this acknowledgement in the science papers is good/necessary. --- reproduce/analysis/make/initialize.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'reproduce/analysis') diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index 7217f0c..3649fd2 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -482,7 +482,9 @@ $(mtexdir)/initialize.tex: | $(mtexdir) # 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. - @echo "\newcommand{\projecttitle}{$(metadata-title)}" > $@ + @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)}" >> $@ # Calculate the latest Maneage commit used to build this @@ -494,4 +496,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}" >> $@ -- cgit v1.2.1