Closed ivanov closed 4 months ago
This might be a separate issue, but flit install -s
installation worked ok, but does not permit datalad to do its magic
$ python -m xibabel.testing minimal
get(error): /home/pi/.pyenv/versions/xib2/lib/python3.11/site-packages/xibabel/testing/ds000105/sub-1/func/sub-1_task-objectviewing_run-01_bold.nii.gz [path not associated with dataset Dataset(/data/pi/fmri/take2/xibabel)]
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/pi/.pyenv/versions/xib2/lib/python3.11/site-packages/xibabel/testing/__main__.py", line 26, in <module>
main()
File "/home/pi/.pyenv/versions/xib2/lib/python3.11/site-packages/xibabel/testing/__main__.py", line 22, in main
get_set(test_set)
File "/home/pi/.pyenv/versions/xib2/lib/python3.11/site-packages/xibabel/testing/__init__.py", line 75, in get_set
out_paths.add(get_file(path_str))
^^^^^^^^^^^^^^^^^^
File "/home/pi/.pyenv/versions/xib2/lib/python3.11/site-packages/xibabel/testing/__init__.py", line 64, in get_file
return _SOURCE2FETCHER[source](path_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.pyenv/versions/xib2/lib/python3.11/site-packages/xibabel/testing/__init__.py", line 41, in get_datalad_file
check_call(['datalad', 'get', str(rel_path)])
File "/home/pi/.pyenv/versions/3.11.0/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['datalad', 'get', '/home/pi/.pyenv/versions/xib2/lib/python3.11/site-packages/xibabel/testing/ds000105/sub-1/func/sub-1_task-objectviewing_run-01_bold.nii.gz']' returned non-zero exit status 1.
Yeah - at the moment - the tests and data installation only work for in-place install - because an install to your site-packages won't take across the submodules. I wonder whether we should just refactor this out to let datalad do its own git initialization.
Is this working now?
Ping @ivanov - I was still getting the error from some residual datalad files in the repository tree, doing an install from the repository. When I cleaned out those files, I no longer got the error. Can you confirm that a clean checkout does not generate the error?
I think this is fixed, and tested. Reopen if I'm wrong?
running
flit install
on f2967a57ee78c5ce194e0c02cf9c3806ea56ea20 (https://github.com/matthew-brett/xibabel/pull/6)results in