Skip to content

python/scripts/run_dicom_archive_loader.py testing (+ addition of other automated tests) #1245

@cmadjar

Description

@cmadjar

Manual checks

  • run run_dicom_archive_loader.py -h on a session with fieldmaps + BOLD images (or fieldmaps + DWI images)
    => should print the help of the script. Make sure the help documentation is up to date.
  • run run_dicom_archive_loader.py -p database_config.py -u <UPLOAD ID> on a valid Upload ID and ensure the following:
    • if there are fieldmap and resting state scans, ensure that the IntendedFor field of the fieldmap files has been updated to include the path to the BOLD images
    • once the script is done running, ensure that the temporary directory that was used to run the script has been cleared out
  • BONUS POINTS: verify that automated checks listed below are still implemented

Bugs found

  • [ ]

Automatic checks

List of automatic checks to implement:

  • run script on an invalid Upload ID
  • run script on an invalid Tarchive Path
  • run script on a tarchive that will result in a successful run and:
    • check Inserting=0 in the mri_upload table
    • check InsertionComplete=1 in the mri_upload table
    • check that the SessionID field of the mri_upload and tarchive tables has been updated properly
    • check that if a series description of a NIfTI file matches one of the regex listed in the excluded_series_description config, the NIfTI file is skipped from insertion (therefore cannot be found in files nor any of the violation tables) [tarchive_series count = 2 and files count = 1]
    • if this is the first time run_dicom_archive_loader.py is run on the upload ID and the tarchive, check that the tarchive has been moved into a year subdirectory and the path has been updated in the tarchive table

Metadata

Metadata

Assignees

Labels

27.0-testingArea: CIPR or issue related to continuous integration, including automated tests and static checks

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions