Recent comments posted to this site:

comment 17 360caa8972c2daa94044cc95188306e9
[[!comment Error: unsupported page format sh]]
comment 23 70dcb7e7ffdd14351adaf4c40ee7fdd0
[[!comment Error: unsupported page format hs]]
comment 3 e6ce9bb92c973350852c9498b7ffb50f
[[!comment Error: unsupported page format sh]]
Re: Special use case for Scientific application

Sure it will work fine to have different versions of annexed files. git-annex will know the url it can use to get whichever version is checked out in the current git branch.

As for an easier way, it's possible to use git-annex-import with certian special remotes, which imports a tree of files from them, and re-running it imports whatever files are new or changed. This needs a special remote that supports it, and it would perhaps be possible to write such a special remote for Zenodo. Dunno if it would be worth the work to implement, but it may be worth seeing if Datalad could support that, if you use Datalad.

Comment by joey
failing with `Operation not petmitted`

I also found the answer on my own.

The trick was hidden under my redaction. The filenames had special characters which are problematic under Android. Removing them solved the issue.

Comment by octvs
Re: just thinking out loud

And there could be some generic "helper" (or a number of them) which would then provide desired CLI interfacing over arbitrary command

Absolutely!

You do need to use "--" before your own custom dashed options.

And bear in mind that "field=value" parameters passed to initremote will be passed on to the program. So you can have a generic helper that is instantiated with a parameter like --command=, which then gets used automatically when running addcompute:

git-annex initremote foo type=compute program=git-annex-compute-generic-helper -- --command='convert {inputs} {outputs}'
git-annex addcomputed --to=foo -- -i foo.jpeg -o foo.gif
Comment by joey
just thinking out loud

it was more flexible to have a more freeform command line, which the compute program parses

agree. And there could be some generic "helper" (or a number of them) which would then provide desired CLI interfacing over arbitrary command, smth like (mimicing datalad-run interface here):

git-annex addcomputed --to=runcmd -i foo.jpeg -o foo.gif 

as long as we can pass options like that or after --, e.g.

git-annex addcomputed --to=runcmd -- -i foo.jpeg -o foo.gif -- convert {inputs} {outputs}`

which would then - ensure no stdout from convert - follow the compute special remote interface to let git-annex know what inputs/outputs were

Comment by yarikoptic
Re: Any way to annotate what are input files?

git-annex does know what both the input and the output files are. It learns this by running the compute program and seeing what INPUT and OUTPUT lines it emits.

I considered having some --input= option, but decided that it was more flexible to have a more freeform command line, which the compute program parses.

Comment by joey
Any way to annotate what are input files?
I don't see an option to specify which annexed files are input files, so annex could get them for comparing to happen to produce output file. That's what we do in datalad run, and it is very handy since allows to not worry about figuring out what to get first
Comment by yarikoptic