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. --- reproduce/analysis/make/initialize.mk | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'reproduce/analysis/make') 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/make') 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/make/paper.mk | 16 ++++++++-------- reproduce/analysis/make/top-make.mk | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'reproduce/analysis/make') 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/make') 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/make') 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