matthew-brett / xibabel

Piloting a new image object for neuroimaging based on XArray
BSD 2-Clause "Simplified" License
6 stars 0 forks source link

MRG: refactor testing, add datalad testing rig #6

Closed matthew-brett closed 8 months ago

matthew-brett commented 8 months ago

I've started with the testing machinery, to debug. Next maybe think about getting test files via datalad.

codecov[bot] commented 8 months ago

Welcome to Codecov :tada:

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered :open_umbrella:

effigies commented 8 months ago

LMK if you want comments on anything specific. Just browsing to get my head around what y'all have been up to so far.

matthew-brett commented 8 months ago

LMK if you want comments on anything specific. Just browsing to get my head around what y'all have been up to so far.

Thanks - the key current stuff is in experiements/scripting_again.py - I'm just trying to put that into the tests. Any thoughts you have there would be very good. Are you around in the next few days to discuss?

effigies commented 8 months ago

Currently staying with family. If the last couple days are an indication, I'll have about 6-7am CST (UTC-6) between when I'm lucid and others get up. Shall we try tomorrow?

matthew-brett commented 8 months ago

Currently staying with family. If the last couple days are an indication, I'll have about 6-7am CST (UTC-6) between when I'm lucid and others get up. Shall we try tomorrow?

:) - sounds good - speak to you then.

matthew-brett commented 8 months ago

I sent a Zoom invite.

ivanov commented 8 months ago

The submodules as written (without a trailing /.git) don't work for me (git version 2.39.2, datalad 0.18.1)

Submodule 'src/xibabel/testing/ds000009' (https://datasets.datalad.org/openneuro/ds000009) registered for path 'src/xibabel/testing/ds000009' Cloning into '/data/pi/fmri/xib2/src/xibabel/testing/ds000009'... fatal: repository 'https://datasets.datalad.org/openneuro/ds000009/' not found fatal: clone of 'https://datasets.datalad.org/openneuro/ds000009' into submodule path '/data/pi/fmri/xib2/src/xibabel/testing/ds000009' failed Failed to clone 'src/xibabel/testing/ds000009'. Retry scheduled Cloning into '/data/pi/fmri/xib2/src/xibabel/testing/ds000105'... fatal: repository 'https://datasets.datalad.org/openneuro/ds000105/' not found fatal: clone of 'https://datasets.datalad.org/openneuro/ds000105' into submodule path '/data/pi/fmri/xib2/src/xibabel/testing/ds000105' failed Failed to clone 'src/xibabel/testing/ds000105'. Retry scheduled

I see that the actions running here use git 2.43.0, so I wonder if that's the only difference

[INFO] Attempting a clone into /Users/runner/work/xibabel/xibabel/src/xibabel/testing/ds000105 [INFO] Attempting to clone from https://datasets.datalad.org/openneuro/ds000105 to /Users/runner/work/xibabel/xibabel/src/xibabel/testing/ds000105 [INFO] Attempting to clone from https://datasets.datalad.org/openneuro/ds000105/.git to /Users/runner/work/xibabel/xibabel/src/xibabel/testing/ds000105

ivanov commented 8 months ago

had to rerun a test, apparently fetching minimal data can be flaky (failed on macos this time)

  • Run python -m xibabel.testing minimal CommandError: 'git -c diff.ignoreSubmodules=none -c core.quotepath=false annex get -c annex.retry=3 --json --json-error-messages --json-progress -c annex.dotfiles=true -- sub-07/anat/sub-07_T1w.nii.gz' failed with exitcode 139 under /Users/runner/.xibabel/data/ds000009 [info keys: stdout_json] error: git-annex died of signal 11 Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/Users/runner/work/xibabel/xibabel/src/xibabel/testing/main.py", line 26, in main() File "/Users/runner/work/xibabel/xibabel/src/xibabel/testing/main.py", line 22, in main fetcher.get_set(test_set) File "/Users/runner/work/xibabel/xibabel/src/xibabel/testing/fetcher.py", line 124, in get_set out_paths.add(self.get_file(path_str)) ^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/runner/work/xibabel/xibabel/src/xibabel/testing/fetcher.py", line 113, in get_file return self._get_datalad_file(path_str, source['repo']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/runner/work/xibabel/xibabel/src/xibabel/testing/fetcher.py", line 96, in _get_datalad_file check_call(['datalad', 'get', file_str], cwd=repo_path) File "/usr/local/miniconda/lib/python3.11/subprocess.py", line 413, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['datalad', 'get', 'sub-07/anat/sub-07_T1w.nii.gz']' returned non-zero exit status 139. Error: Process completed with exit code 1.

anyway, that's just for posterity, well done here, merging!