datalad / datalad-gooey

A graphical user interface for DataLad (datalad.org)
https://docs.datalad.org/projects/gooey
Other
4 stars 6 forks source link

`get` on an absent subdataset fails #336

Closed mih closed 1 year ago

mih commented 1 year ago

-> Failed: Dataset('/tmp/myproject/input').get(get_data=False, recursive=True)

 datalad.support.exceptions.NoDatasetFound: No installed dataset found at /tmp/myproject/input

Users would need to specify the containing dataset and then limit to the subdataset of interest. This is rather cumbersome.

mih commented 1 year ago

https://github.com/datalad/datalad-gooey/blob/27e0a0474db8cb33bba34cef1117be907f3fa605/datalad_gooey/fsbrowser.py#L533-L534

This is the culprit, I think. It makes no sense to unconditionally use the location of an absent (sub)dataset as the dataset argument. I think the rule should be

maybe the code needs additional protection against a "dataset" command not actually having a path argument, but I am not aware of any that would also work with an absent (sub)dataset.

adswa commented 1 year ago

see also https://github.com/datalad/datalad-gooey/issues/238

The safeguard you propose sounds good to me

mih commented 1 year ago

see also #238

Thanks for linking that!

The safeguard you propose sounds good to me

Sadly, it also has side-effect. Suppose a user click on an absent dataset to drop it against -- even if that makes no sense. They will end up with a preconfigured drop dialog trying to drop the entire super dataset, because the path is not "added" to the multi-value path widget, it is only placed into its editor.