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

Fix the DICOMweb uploader and its tests #381

Merged
merged 58 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
4d01044
Rework dicomweb
stefpiatek Apr 26, 2024
ce6d3cf
Update dicomweb tests after rework
milanmlft Apr 26, 2024
d224ea5
Docker compose `version` is obsolete
milanmlft Apr 29, 2024
19ec2c1
Fix dicomweb-server healthcheck; use correct credentials
milanmlft Apr 29, 2024
bdbb1df
Fix the DicomWebUploader tests
milanmlft Apr 29, 2024
2a91054
Simplify services setup for core tests
milanmlft Apr 29, 2024
70182af
Fix volume path
milanmlft Apr 29, 2024
2f6ff49
Clean up orphan containers at startup
milanmlft Apr 29, 2024
262ffee
Fix typo
milanmlft Apr 29, 2024
be15576
Add negative checks in case of wrong DICOMweb credentials
milanmlft Apr 29, 2024
0e1aa3a
Remove obsolete function
milanmlft Apr 29, 2024
a0c7f50
Fix orthanc credentials
milanmlft Apr 29, 2024
baf54e9
Use different credentials for DICOMweb test server and fix volume paths
milanmlft Apr 29, 2024
53fb47f
Fix system test: actually check for presence of studies on DICOMweb
milanmlft Apr 29, 2024
9514521
Better log message
milanmlft Apr 29, 2024
ebfbe1b
Fix module docstring
milanmlft Apr 29, 2024
3215d3a
Add clarifying comment
milanmlft Apr 29, 2024
0a05664
Use lowercase for local variable
milanmlft Apr 29, 2024
59e36b8
Fix outdated comment
milanmlft Apr 30, 2024
b840885
Docker compose 'version is obsolete'
milanmlft Apr 30, 2024
131ba35
Formatting: 4-space indents
milanmlft Apr 30, 2024
53c5686
Use content type json for stow request
milanmlft Apr 30, 2024
deaedd7
Update comment about the `orthanc_dicomweb_url`
milanmlft Apr 30, 2024
ce2182a
Fix typos
milanmlft Apr 30, 2024
f161d16
Add `raise_for_status()` calls in tests
milanmlft Apr 30, 2024
bde47de
Another `raise_for_status()`
milanmlft Apr 30, 2024
36005d6
Query for study ID directly
milanmlft Apr 30, 2024
0aae10a
Set http timeout as class field for `DicomWebUploader`
milanmlft Apr 30, 2024
d820549
Hardcode DICOMweb config values in tests instead of using envvars
milanmlft Apr 30, 2024
365173d
Set `http_timeout` for mock Dicomweb uploader
milanmlft Apr 30, 2024
94d34d4
Validate DICOMweb server before attempting upload
milanmlft Apr 30, 2024
918ba87
Update comment
milanmlft Apr 30, 2024
76c6a17
Add another `response.raise_status()`
milanmlft Apr 30, 2024
bbcc133
Refactor: move checks for already exported images to base uploader
milanmlft Apr 30, 2024
afbb78f
Add test for DICOMweb uploader to check failure if image already expo…
milanmlft Apr 30, 2024
db9233d
Implement checking for image already uploaded in dicomweb uploader
milanmlft Apr 30, 2024
82596f5
Merge branch 'main' into milanmlft/fix-dicomweb-uploader
milanmlft Apr 30, 2024
f886059
Move Orthanc helpers to `core.uploader`
milanmlft Apr 30, 2024
9ba5775
Make `Uploader.upload_dicom_image` methods work with Orthanc study ID…
milanmlft Apr 30, 2024
5ede1a6
Move FTPS-specific fixtures to its own test file
milanmlft Apr 30, 2024
abf25ff
Fix orthanc-anon related envvar references
milanmlft Apr 30, 2024
c177902
`ORTHANC_URL` -> `ORTHANC_ANON_URL`, which is more accurate
milanmlft Apr 30, 2024
d469acf
Fix `TEST_DIR` path
milanmlft Apr 30, 2024
1ece0ee
Fix return type for fixture
milanmlft Apr 30, 2024
6a401d8
Refactor `FTPSUploader.upload_dicom_image()`; extract FTPS specific f…
milanmlft Apr 30, 2024
34cc6ef
Fix return types for fixtures
milanmlft Apr 30, 2024
45c056a
Rename fixture so it doesn't get detected as a test
milanmlft Apr 30, 2024
0b27ae6
Move 'already exported' check to `send_via_ftps()`
milanmlft Apr 30, 2024
16f57bc
Refactor: let `get_uploader()` work with just the project slug
milanmlft Apr 30, 2024
b500442
Add missing envvars for tests
milanmlft Apr 30, 2024
a10fa3d
Fix import
milanmlft Apr 30, 2024
f438a1a
Fix docker compose, messed up during merge
milanmlft Apr 30, 2024
00ed2da
Implement `DicomWebUploader.upload_dicom_image()`
milanmlft Apr 30, 2024
4d6eeda
Set `ORTHANC_ANON_*` envvars in the `orthanc-anon` container
milanmlft Apr 30, 2024
5cf8d39
Avoid loading envvars when they're not needed
milanmlft Apr 30, 2024
a8d8d17
And another missing envvar
milanmlft Apr 30, 2024
5ba4f59
Why did I even do this
milanmlft Apr 30, 2024
2641ae2
Update pixl_core/src/core/uploader/_dicomweb.py
stefpiatek May 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cli/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
os.environ["POSTGRES_PORT"] = "7001"
os.environ["PIXL_DB_NAME"] = "pixl"

os.environ["ORTHANC_ANON_USERNAME"] = "orthanc"
os.environ["ORTHANC_ANON_PASSWORD"] = "orthanc" # noqa: S105, hardcoded password


@pytest.fixture(autouse=True)
def export_dir(tmp_path_factory: pytest.TempPathFactory) -> Path:
Expand Down
Loading