Open yarikoptic opened 4 years ago
Q to me is whether git-annex metadata is the right receptacle for this information, but that would depend on the desired use-cases. In metalad there is already a custom
extractor that has the ability to pull metadata for individual files from a configurable location. This approach could be generalized.
However, if the desire is to make annex aware of metadata, e.g. to be able to use it in wanted expressions that wouldn't help much.
yes, annex wanted
has been my primary usecase for this field for awhile now. Quite a number of datasets on ///
are setup that way and it generally works great! I hope that eventually we will come back to our discussion on create-sibling
(#925) and now found an earlier sibling of this issue (#921).
I am thinking about creating a procedure such as
annex-metadata-outputs
which should take as its parameters options forgit annex metadata -s
call(s) which would be ran on the (annexed) files in the last commit.The idea came from the fact that unlikely we would extend
datalad save
with some options to specifygit annex
metadata to be set for the saved files. So may be then I could use--proc-post
to do that. Such procedure should get a list of modified files in the last commit, and rungit annex metadata -s
on them. Then we should be able to use it with a regulardatalad save
ordatalad run
(may be! since it might happen thatrun
doesn't save any new results.. not yet sure what to do about that). It is also partially due to the inability to specify those via.gitattributes
: https://git-annex.branchable.com/git-annex-metadata/#comment-fde59930f108af0fff842f5e25351e93Sample use cases
I still feel that simply specifying in
.gitattributes
some action to do on the matching files would be the most consistent and reliable way. That is why I am still wondering if such a procedure worth pursuing. May be in the scope ofmetalad
it needs to generalize even further (attach not only git annex metadata) anyways.So -- the issue is open for discussion