datalad / datalad-gooey

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

Initial dataset configuration from start-up location #145

Closed adswa closed 2 years ago

adswa commented 2 years ago

I opened the GUI from the terminal in /home/adina/repos/datalad-gooey, and picked home/adina/containers as the directory to be opened. I filled the parameter widget of clone with /tmp/mynewdataset for path (a new directory created within the path picker) and /home/adina/repos/data/human-connectome-project-openaccess for source. I left the Dataset location field empty. Cloning failed with the following, suggesting that my CWD (/home/adina/repos/datalad-gooey) would be set as a dataset when it wasn't:

install(error): ../../../../tmp (dataset) [clone target path '/tmp' not in specified target dataset 'Dataset(/home/adina/repos/datalad-gooey)']
Traceback (most recent call last): File "/home/adina/repos/datalad-gooey/datalad_gooey/dataladcmd_exec.py", line 138, in _cmdexec_thread for res in cmd(**cmdkwargs): File "/home/adina/env/gooey/lib/python3.9/site-packages/datalad/interface/utils.py", line 424, in generator_func raise IncompleteResultsError( datalad.support.exceptions.IncompleteResultsError: Command did not complete successfully. 1 failed: [{'action': 'install', 'message': ("clone target path '%s' not in specified target dataset '%s'", PosixPath('/tmp'), Dataset('/home/adina/repos/datalad-gooey')), 'path': '/tmp', 'refds': '/home/adina/repos/datalad-gooey', 'source_url': '/home/adina/repos/data/human-connectome-project-openaccess', 'status': 'error', 'type': 'dataset'}] 

Screenshot from 2022-09-19 12-17-49

Importantly, when I retried the exact command again afterwards it worked: Screenshot from 2022-09-19 12-26-27 It looks like an internal dataset might have gotten unset between the two commands.

adswa commented 2 years ago

I am not able to reproduce this anymore. The thing I did between opening this issue and now is having lunch - no code change, branch switches, etc. Very weird. Closing, and fingers crossed it doesn't show up anymore.

adswa commented 2 years ago

I saw it again on Windows, this time with get: In the simplified interface, upon selecting get from the right-click menu of a subjects subdirectory in a clone of the studyforrest dataset, dataset and path were nicely and correctly preconfigured. However, the command failure suggests that the dataset passed to the command is the location I had invoked the gooey from, which in my case was the datalad-gooey source repo. gooeyds

adswa commented 2 years ago

I triggered it with a save as well: I selected a subdataset in the directory picker, and ran a save command without any further configuration. It reported success:


Running: Dataset('/home/adina/containers/artwork').save(to_git=False)

add(ok): .idea/$CACHE_FILE$ (file)
add(ok): .idea/.gitignore (file)
add(ok): .idea/codeStyles/Project.xml (file)
add(ok): .idea/codeStyles/codeStyleConfig.xml (file)
add(ok): .idea/datalad-gooey.iml (file)
add(ok): .idea/inspectionProfiles/Project_Default.xml (file)
add(ok): .idea/inspectionProfiles/profiles_settings.xml (file)
add(ok): .idea/libraries/R_User_Library.xml (file)
add(ok): .idea/misc.xml (file)
add(ok): .idea/modules.xml (file)
  [1 similar message has been suppressed; disable with datalad.ui.suppress-similar-results=off]
  [1 similar message has been suppressed; disable with datalad.ui.suppress-similar-results=off]
save(ok): . (dataset)
action summary:
  add (ok: 11)
  save (ok: 1)

But the actual dataset where contents were saved was the ~/repos/datalad-gooey repo from which I started the gooey from:

adina@muninn in ~/containers on git:master!
❱ git -C ~/repos/datalad-gooey/ log .idea
commit ca19316ac57a0f9dcd00e16f8d858590dfeb6b19 (HEAD -> dynparams)
Author: adina <adina@muninn.inm7.de>
Date:   Tue Sep 20 11:15:09 2022 +0200

    [DATALAD] Recorded changes

Screenshot from 2022-09-20 11-21-13

mih commented 2 years ago

Is this observed before or after #151?

adswa commented 2 years ago

With both, the latest tests are on top of #151

mih commented 2 years ago

caused by https://github.com/datalad/datalad-gooey/issues/159