feat: implement migration for NMA_Radionuclides table and add transfer logic#375
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements support for migrating and transferring radionuclides data from a legacy database table. The changes add a new NMA_Radionuclides table with appropriate relationships to existing chemistry sample data, along with the transfer logic to populate it.
Changes:
- Added database migration to create the
NMA_Radionuclidestable with proper foreign key relationships - Implemented
RadionuclidesTransfererclass to handle data transfer from legacy sources - Integrated radionuclides transfer into the parallel and sequential transfer workflows
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| alembic/versions/f3b4c5d6e7f8_create_nma_radionuclides.py | Database migration script to create the NMA_Radionuclides table with indexes |
| db/nma_legacy.py | Added NMARadionuclides model class with relationships to ChemistrySampleInfo and Thing |
| transfers/radionuclides.py | New transferer implementation for migrating radionuclides data with validation and batch processing |
| transfers/transfer.py | Integrated radionuclides transfer into existing transfer workflows |
| transfers/metrics.py | Added metrics tracking method for radionuclides transfers |
| tests/test_radionuclides_legacy.py | Comprehensive test suite for NMARadionuclides model CRUD operations |
| alembic/env.py | Added role management for database permissions during migrations |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80b242c135
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Why
This PR addresses the following problem / context:
How
Implementation summary - the following was changed / added / removed:
Notes
Any special considerations, workarounds, or follow-up work to note?