Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #608 +/- ##
==========================================
- Coverage 87.89% 87.54% -0.35%
==========================================
Files 76 77 +1
Lines 3619 3694 +75
==========================================
+ Hits 3181 3234 +53
- Misses 438 460 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6215016 to
dabc3df
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR introduces support for uploading to the ARC TRE API, complete with a new Uploader subclass and accompanying tests, and also refactors some existing FTPS tests and registration.
- Implements
TreApiUploaderand a_create_zip_archivehelper to handle DICOM and Parquet uploads via the TRE API. - Adds a full test suite for the TRE API uploader (
test_treapi.py) and adjusts FTPS tests to use a singleuid. - Registers
TreApiUploaderin the uploader factory and fixes a typo in the module doc.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pixl_core/src/core/uploader/_treapi.py | New TreApiUploader class with send, upload, flush methods and zip creation helper |
| pixl_core/tests/uploader/test_treapi.py | Unit tests covering token validation, DICOM/Parquet upload flows, and the zip utility |
| pixl_core/src/core/uploader/init.py | Added TreApiUploader to get_uploader factory and corrected a typo |
| pixl_core/tests/uploader/test_ftps.py | Refactored test_update_exported_and_save to use a single uid variable |
Comments suppressed due to low confidence (2)
pixl_core/src/core/uploader/_treapi.py:167
- Add tests for the upload failure path when
response.status_codeis notHTTP_CREATEDto ensureRuntimeErroris raised with the expected message.
if response.status_code != HTTP_CREATED:
pixl_core/src/core/uploader/_treapi.py:197
- Add tests for the flush failure path when
response.status_codeis notHTTP_CREATEDto validate error handling inflush().
if response.status_code != HTTP_CREATED:
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
We should be able to test private members
Patch coverage is low, mainly because I don't want to mock out the whole TRE API... 🫠 |
Though should only have the change in 0.8
|
Failing when uploading a 150 MB zip of parquet files either with an SSL error or bad gateway. Had a quick try of a couple of things to debug. Unsure if anything was taken down over christmas on the TRE side. Manually copied over file to TRE so not a huge rush.
|
Co-authored-by: Stef Piatek <s.piatek@ucl.ac.uk>
…AFEHR-data/PIXL into milanmlft/606-add-api-uploader
|
Parquet upload works, merging! |
Closes #606
Adds the
TreApiUploaderclass to handle uploads to the ARC TRE API ingress