datalad / datalad

Keep code, data, containers under control with git and git-annex
http://datalad.org
Other
542 stars 111 forks source link

foreach-dataset: move posarg cmd into --cmd? #6305

Open yarikoptic opened 2 years ago

yarikoptic commented 2 years ago

I would like to continue prior discussion in https://github.com/datalad/datalad/pull/5517#issuecomment-966651403 to get a final decision before we cut a release with new foreach-dataset command.

That would open the possibility to add path as the positional argument, since it

cons'ish like

an "alternative" was voiced in https://github.com/datalad/datalad/pull/5517#issuecomment-966651403 -- to add --path kwarg in case we do decide to add path-based limiting. But it still sounds to me suboptimal that would make it inconsistent with the rest of the interfaces.

WDYT?

adswa commented 2 years ago

Given that @yarikoptic said he

would like to continue prior discussion in #5517 (comment) to get a final decision before we cut a release with new foreach-dataset command

I wanted to comment to get this needed discussion going. I don't have any strong opinions, though. I can see some advantages in a dedicated --cmd parameter, if only for making the command call more verbose/readable.

yarikoptic commented 2 years ago

I have no strong opinion given pros cons stated in the description. May be leaning more toward "just let it be positional" due to the pros, and the main motivation for making it --cmd (consistency on having path as the first (or all) positional(s)) being a bit superficial since nobody raised even desire in having path restriction so far.