From 6e4ec9a305f7021643fe22e08fe0ad17dd363a93 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sat, 17 Apr 2021 04:31:31 +0100 Subject: IMPORTANT: print-general-metadata new name for print-copyright Summary: - Use the new name of this variable in your Makefiles. - In 'metadata.conf', remove fixed URL prefixes for DOIs ('https://doi.org/') or arXiv ('https://arxiv.org/abs'). Until now, the Make variable that would print the general metadata (of whole project) into each to-be-published dataset was called 'print-copyright'! But it now does much more than simply printing the copyright, it will also print a lot of metadata like arXiv ID, Zenodo DOI and etc into plain-text outputs. The out-dated name could thus be misleading and cause confusions. With this commit, the variable is therefore called 'print-general-metadata'. After merging your project with the Maneage branch, please replace any usage of 'print-copyright' to 'print-general-metadata'. Also with this commit, 'README-hacking.md' mentions 'metadata.conf' and 'print-general-metadata' in the "Publication checklist" section and reminds you to keep the first up to date, and use the second in your to-be-published datasets. --- reproduce/analysis/config/metadata.conf | 21 ++++++++++++++++++--- reproduce/analysis/make/delete-me.mk | 4 ++-- reproduce/analysis/make/initialize.mk | 24 ++++++++++++++++-------- 3 files changed, 36 insertions(+), 13 deletions(-) (limited to 'reproduce/analysis') diff --git a/reproduce/analysis/config/metadata.conf b/reproduce/analysis/config/metadata.conf index e92a057..aaf2ca0 100644 --- a/reproduce/analysis/config/metadata.conf +++ b/reproduce/analysis/config/metadata.conf @@ -1,6 +1,19 @@ -# Project meta-data that can be used in a project's output datasets and +# Project meta-data that will be used in a project's output datasets and # final paper. Please set the values here and use them in your analysis or -# paper, don't repeat them +# paper, don't repeat them. +# +# These variables are used in 'reproduce/analysis/make/initialize.mk': 1) +# to create a Make variable called 'print-general-metadata'. You can simply +# print this variable's value in any plain-text output. +# +# Why add a Copyright for the data? people need to know if they can "use" +# the dataset (i.e., modify it), or possibly re-distribute it and their +# derived products. They also need to know how they can contact the creator +# of the datset (who is usually also the copyright owner). So take this +# seriously and add your name and email-address (or the name of the person +# and email of the person who was in charge of that part of the project), +# and the copyright license name and standard link to the fully copyright +# license. # # Copyright (C) 2020-2021 Mohammad Akhlaghi # @@ -12,7 +25,9 @@ # Project information metadata-title = The project title goes here -# DOIs and identifiers. +# DOIs and identifiers (don't include fixed URL prefixes like +# 'https://doi.org/' or 'https://arxiv.org/abs'), they will be added +# automatically where necessary. metadata-arxiv = metadata-doi-zenodo = metadata-doi-journal = diff --git a/reproduce/analysis/make/delete-me.mk b/reproduce/analysis/make/delete-me.mk index f275051..c160e51 100644 --- a/reproduce/analysis/make/delete-me.mk +++ b/reproduce/analysis/make/delete-me.mk @@ -48,7 +48,7 @@ $(dm-squared): $(pconfdir)/delete-me-squared-num.conf | $(tex-publish-dir) echo "# Column 2: X_POW2 [arbitrary, f32] The horizontal axis to the power of two." \ >> $@.tmp echo "# " >> $@.tmp - $(call print-copyright, $@.tmp) + $(call print-general-metadata, $@.tmp) # Generate the table of random values. awk 'BEGIN {for(i=1;i<=$(delete-me-squared-num);i+=0.5) \ @@ -107,7 +107,7 @@ $(dm-img-histogram): $(tex-publish-dir)/%-histogram.txt: $(indir)/%.fits \ echo "# " >> $@.tmp awk '/^# Column .:/' $@.data >> $@.tmp echo "# " >> $@.tmp - $(call print-copyright, $@.tmp) + $(call print-general-metadata, $@.tmp) # Add the column numbers in a formatted manner, rename it to the # output and clean up. diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index 15a4dbf..744ecbf 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -461,19 +461,27 @@ $(data-publish-dir):; mkdir $@ # Print Copyright statement # ------------------------- # -# This statement can be used in published datasets that are in plain-text -# format. It assumes you have already put the data-specific statements in -# its first argument, it will supplement them with general project links. -print-copyright = \ +# The 'print-general-metadata' can be used to print the general metadata in +# published datasets that are in plain-text format. It should be called +# with make's 'call' function like this (where 'FILENAME' is the name of +# the file it will append this content to): +# +# $(call print-general-metadata, FILENAME) +# +# See 'reproduce/analysis/make/delete-me.mk' (in the Maneage branch) for a +# real-world usage of this variable. +doi-prefix-url = https://doi.org +arxiv-prefix-url = https://arxiv.org/abs +print-general-metadata = \ echo "\# Project title: $(metadata-title)" >> $(1); \ echo "\# Git commit (that produced this dataset): $(project-commit-hash)" >> $(1); \ - echo "\# Project's Git repository: $(metadata-git-repository)" >> $(1); \ + echo "\# Git repository: $(metadata-git-repository)" >> $(1); \ if [ x$(metadata-arxiv) != x ]; then \ - echo "\# Pre-print server: https://arxiv.org/abs/$(metadata-arxiv)" >> $(1); fi; \ + echo "\# Pre-print: $(arxiv-prefix-url)/abs/$(metadata-arxiv)" >> $(1); fi; \ if [ x$(metadata-doi-journal) != x ]; then \ - echo "\# DOI (Journal): $(metadata-doi-journal)" >> $(1); fi; \ + echo "\# DOI (Journal): $(doi-prefix-url)/$(metadata-doi-journal)" >> $(1); fi; \ if [ x$(metadata-doi-zenodo) != x ]; then \ - echo "\# DOI (Zenodo): $(metadata-doi-zenodo)" >> $(1); fi; \ + echo "\# DOI (Zenodo): $(doi-prefix-url)/$(metadata-doi-zenodo)" >> $(1); fi; \ echo "\#" >> $(1); \ echo "\# Copyright (C) $$(date +%Y) $(metadata-copyright-owner)" >> $(1); \ echo "\# Dataset is available under $(metadata-copyright)." >> $(1); \ -- cgit v1.2.1