From 29f04b0f26f30255e28ae53207bae01f25dab610 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Mon, 8 Apr 2024 17:11:02 +1000 Subject: [PATCH] fixed up upload CLI --- real-tests/usyd_upload.py | 14 +++++++------- xnat_ingest/cli/upload.py | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/real-tests/usyd_upload.py b/real-tests/usyd_upload.py index 3c58d23..2a498fa 100644 --- a/real-tests/usyd_upload.py +++ b/real-tests/usyd_upload.py @@ -12,13 +12,13 @@ "XNAT_INGEST_UPLOAD_HOST": "https://xnat.sydney.edu.au", "XNAT_INGEST_UPLOAD_USER": "", "XNAT_INGEST_UPLOAD_PASS": "", - # "XNAT_INGEST_UPLOAD_ALWAYSINCLUDE": "medimage/dicom-series", - # "XNAT_INGEST_UPLOAD_STORE_CREDENTIALS": ",", - # "XNAT_INGEST_UPLOAD_LOGFILE": ",INFO", - # "XNAT_INGEST_UPLOAD_DELETE": "0", - # "XNAT_INGEST_UPLOAD_TEMPDIR": "", - # "XNAT_INGEST_UPLOAD_REQUIRE_MANIFEST": "1", - # "XNAT_INGEST_UPLOAD_CLEANUP_OLDER_THAN": "30", + "XNAT_INGEST_UPLOAD_ALWAYSINCLUDE": "medimage/dicom-series", + "XNAT_INGEST_UPLOAD_STORE_CREDENTIALS": ",", + "XNAT_INGEST_UPLOAD_LOGFILE": ",INFO", + "XNAT_INGEST_UPLOAD_DELETE": "0", + "XNAT_INGEST_UPLOAD_TEMPDIR": "", + "XNAT_INGEST_UPLOAD_REQUIRE_MANIFEST": "1", + "XNAT_INGEST_UPLOAD_CLEANUP_OLDER_THAN": "30", }, catch_exceptions=False, ) diff --git a/xnat_ingest/cli/upload.py b/xnat_ingest/cli/upload.py index 2ffa5b4..8f470a0 100644 --- a/xnat_ingest/cli/upload.py +++ b/xnat_ingest/cli/upload.py @@ -25,6 +25,7 @@ set_logger_handling, get_checksums, calculate_checksums, + StoreCredentials, ) @@ -121,7 +122,7 @@ ) @click.option( "--store-credentials", - type=str, + type=StoreCredentials.cli_type, metavar=" ", envvar="XNAT_INGEST_UPLOAD_STORE_CREDENTIALS", default=None,