[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-devel] [task #14172] When in a Git repository, store commit de
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-devel] [task #14172] When in a Git repository, store commit describe in output |
Date: |
Thu, 6 Oct 2016 14:39:34 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 |
URL:
<http://savannah.gnu.org/task/?14172>
Summary: When in a Git repository, store commit describe in
output
Project: GNU Astronomy Utilities
Submitted by: makhlaghi
Submitted on: Thu 06 Oct 2016 11:39:32 PM JST
Should Start On: Thu 06 Oct 2016 12:00:00 AM JST
Should be Finished on: Thu 06 Oct 2016 12:00:00 AM JST
Category: All Gnuastro
Priority: 5 - Normal
Item Group: Enhancement
Status: Postponed
Privacy: Public
Percent Complete: 0%
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Effort: 0.00
_______________________________________________________
Details:
One of the main reasons to build Gnuastro was to help/encourage
reproducibility of scientific results. When the scientific research is defined
in a version controlled system (for example NoiseChisel paper's reproduction
pipeline <https://gitlab.com/makhlaghi/NoiseChisel-paper>, keeping the Git
commit information that produced the data-products would be very helpful.
Recenly I have been doing this manually using Gnuastro's Header program on the
ultimate FITS image outputs (for example see bug #49274).
Since we want to encourage such reproducible research results, I think it
would be an interesting job do this automatically within Gnuastro. The
suggested scenario of this task would go like this: if Gnuastro is run within
a Git version controlled directory, then store the commit's description
(similar to the output of `git describe') in any Gnuastro output product (FITS
file or ASCII table).
Fortunately Git comes with the libgit <https://libgit2.github.com/libgit2>
library. So we don't need to make system calls, we can use the library to get
the commit information if Gnuastro's tools are run within a Git version
controlled directory.
Libgit can be set as an optional dependency and checked at configure time, so
the work above is only done if the user actually has libgit.
This feature can be put in `lib/fits.c' and `lib/txtarray.c' that create the
final outputs of all the programs, so the actual Gnuastro programs don't have
to worry about it. In this way, the library users can benefit from it.
Gnulib's `build-aux/git-version-gen' adds an interesting feature to `git
describe': if there is uncommited work in the version controlled directory, it
adds a `-dirty' suffix to Git's `describe' output. This is a very useful
sanity check. So the users of the research data-product (or the authors of the
research themselves) can be sure that when the higher-level products was
produced, everything was committed. I think this would be very useful and we
can also implement this feature while we are doing this task.
If you have any comments, concerns, or criticisms, please share them here
;-)....
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/task/?14172>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [gnuastro-devel] [task #14172] When in a Git repository, store commit describe in output,
Mohammad Akhlaghi <=