Skip to content

xASL_test_Flavors crashes in several instances #1194

@HenkMutsaerts

Description

@HenkMutsaerts

Description

Most of the points here are because of unclear comments/header, the need for merging the two testing scripts that interleave one another, and the need for checking for empty folders (from updating the local FlavorDatabase)

Tasks fixed:

  • line 115: logContent seems a variable that is not used. Fixed in cedf18d
  • line 110: it says that it removes existing data (spelling error though), but in fact it removes the output, the tested data right? Not the input testdata. Was confusing to me ;) Fixed in cedf18d
  • onlyRemoveResults should be a boolean; the code looks a bit quick and dirty all together? Fixed in cedf18d
  • Why does xASL_test_Flavors exists as intermediary? It would increase readability if xASL_test_FullPipelineTest and xASL_test_Flavors would be merged, and renamed to xASL_test_Flavors. Done in 6361d45 a19027d d5b7c0e
  • After going through all this, I note the issue is the empty folders. When git updates, it will keep the previous folders. So we simply have to include a check for empty folders, generate a warning, and skip them (remove them from the flavorlist). This should check for empty subfolders as well, so only check for the existence of files. If no files exist, don't include a folder to the flavor list for testing. Fixed in macOS dcm2nii hotfix #1271

Tasks answered:

  • xASL_test_EscapeToUnixshould be merged with xASL_adm_UnixPath? JAN: It actually crawls across the whole BIDS structure. And also removes double backslash. So it has a bit broader functionality. So it cannot be simply replaced. Since it is just an internal function available in this script, I would keep it.
  • line 40 xASL_test_Flavors_DCM2BIDSshould probably be x = ExploreASL; instead of ExploreASL; JAN: Fine as it is - x-struct shouldn't be there, because it is not used later in this function. ExploreASL is called as a short for ExploreASL_Initialize.

Tasks todo

  • Am I right that the user is expected to put a non-repository file testConfig.json inside of the local clone of the repository? I thought we wanted to avoid this.
  • For HENK:
    There is an illegal character issue for [ ]. Perhaps we can fix this by putting the paths in strings for Linux/macOS: " ", or by removing more illegal characters from the path with our replacement functions. But the latter would involve overwriting the sourcedata which should be read-only, so it has to be the " ". Or first testing if the folder names don't have illegal characters (BTW: Windows should be much worse for illegal characters...)

executing: [/Users/henk/ExploreASL/ExploreASL/External/MRIcron/20220720/dcm2niix-osx -o /Users/henk/ExploreASL/FlavorDatabase/GE_PCASL_3Dspiral_DV25.0_product_1/derivatives/ExploreASL/temp/001/ASL_1/dcm2nii_temp_ASL4D /Users/henk/ExploreASL/FlavorDatabase/GE_PCASL_3Dspiral_DV25.0_product_1/sourcedata/sub-001/20/S 007 [3D ASL]/Im181.0.dcm]
zsh:1: bad pattern: [3D

Release notes

Review issue, nothing to mention.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions