Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate ImagingUpload and MriUploadDB to the new database abstraction #1224

Merged
merged 4 commits into from
Feb 19, 2025

Conversation

maximemulder
Copy link
Contributor

@maximemulder maximemulder commented Jan 8, 2025

Migrate ImagingUpload and MriUploadDB to the new database abstraction.

The current input checking is very complex and this should simplify it a little. The previous code seems to sometimes accept or forget to check if the DICOM archive or MRI upload is null in a few specific places, but I do not see how it can work as a whole in these conditions. I therefore assume the DICOM archive and MRI upload must not be null.

The integration test will check if this works broadly, but since this touches the argument validation, I will need to test the pipeline manually with:

  • ✅ Correct DICOM archive path and correct MRI upload ID.
  • ✅ Correct DICOM archive path.
  • ✅ Correct MRI upload ID.
  • ✅ Incorrect DICOM archive path.
  • ✅ Incorrect MRI upload ID.
  • ✅ Correct DICOM archive path but incorrect MRI upload ID.
  • ✅ Correct MRI upload ID but incorrect DICOM archive path.
  • ✅ Correct DICOM archive path but no associated MRI upload.
  • ✅ Correct MRI upload ID but no associated DICOM archive.
  • ✅ No DICOM archive path or MRI upload ID.

Tested and there does not seem to be any regression: run_dicom_archive_loader.py expects either (exclusive) --upload_id or --tarchive_path, and requires the DICOM archive to be associated with exactly one MRI upload.

@maximemulder maximemulder changed the title Migrate ImagingUpload and MriUploadDB to sqlalchemy Migrate ImagingUpload and MriUploadDB to the new database abstraction Jan 8, 2025
@maximemulder maximemulder force-pushed the sqlalchemy_mri_upload branch 4 times, most recently from 2b5499e to c26a276 Compare January 9, 2025 00:24
@maximemulder maximemulder marked this pull request as ready for review February 14, 2025 01:58
@maximemulder maximemulder added Area: BIDS PR or issue related to the handling of BIDS datasets Area: ORM PR or issue related to the SQLAlchemy integration Difficulty: Medium PR or issue that require a moderate effort or expertise to implement, review, or test labels Feb 14, 2025
Copy link
Collaborator

@cmadjar cmadjar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maximemulder very nice!! A few minor suggestions/questions. I did not test it yet.

use dicom archive id instead of tarchiveid because it is prettier

ruff check
@cmadjar cmadjar merged commit ba8ca1d into aces:main Feb 19, 2025
9 checks passed
@cmadjar cmadjar added this to the 27.0 milestone Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: BIDS PR or issue related to the handling of BIDS datasets Area: ORM PR or issue related to the SQLAlchemy integration Difficulty: Medium PR or issue that require a moderate effort or expertise to implement, review, or test Refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants