datalad / datalad-ria

Adds functionality for RIA stores to DataLad
http://datalad.org
Other
0 stars 1 forks source link

Custom post-receive hook in RIA store? #17

Open mih opened 4 years ago

mih commented 4 years ago

Via @dickscheid

Do we have a way to customize a remote sibling with a custom post-receive hook?

Use case here is to trigger custom QC for a dataset update.

bpoldrack commented 3 years ago

Just stumbled upon this and obviously missed it then. We don't have anything for that ATM. Could be made available via create-sibling-ria. I do wonder though, whether that is not best left to be done on the store end after creation rather than channeling through when creating the sibling. AFAICT, the only advantage of doing this in a datalad command on a clone is easy access to its ID and the location resolution based on it. Seems easier and more useful to me, to provide a small helper script (to be executed on the store end), that would take a dataset id and return in-store location based on the store's ria-layout.

dickscheid commented 3 years ago

We have a solution now in place for our QC workflows, by scripting the setup of a default hook on our image datasets. Not very streamlined, though. It would be great to have kind of a template mechanism for such things, similar to the -c text2git, which would pull the hook from somewhere and probably replace some keywords. Not sure though wether this is out of scope for the main datalad code and more on the use side to implement this.

bpoldrack commented 3 years ago

@dickscheid

It would be great to have kind of a template mechanism for such things, similar to the -c text2git, which would pull the hook from somewhere and probably replace some keywords.

I think that can and probably should be done user side. You could turn your script in a datalad procedure, that could be called the same way (-c your-procedure-name). Can help with that.

However, the issue really is (from my point of view), whether that should be run on a clone but really execute something on the remote in-store (like the initial post suggests) or better be something to be executed in-store directly. I am currently setting up a dedicated repository with docs and helper scripts for RIA stores. Such a routine could be integrated there.