Admin CLI for managing medical imaging datasets in S3/MinIO for DataSHIELD
Project description
dsimaging-admin
Admin CLI for creating and operating dsimaging-store deployments and the
medical imaging datasets stored in them.
Install
pip install dsimaging-admin
Create a store
dsimaging-admin store init writes a Docker Compose project for MinIO plus the
dsimaging-store controller.
dsimaging-admin store init ./study-store \
--controller-image davidsarratgonzalez/dsimaging-store:latest
dsimaging-admin store up ./study-store
dsimaging-admin store doctor ./study-store
For local controller development, build from a checked-out dsimaging-store
repo instead of using an image:
dsimaging-admin store init ./study-store \
--store-source /path/to/dsimaging-store
dsimaging-admin store up ./study-store
Use the generated connection details as a reusable CLI profile:
dsimaging-admin init \
--endpoint http://127.0.0.1:9000 \
--controller-url http://127.0.0.1:8080 \
--bucket imaging-data
Dataset operations
# Publish with staging, publish lock, skip-if-hash-matches and DICOM checks.
dsimaging-admin publish \
--dataset-id study_ct_v1 \
--source /data/study_ct \
--metadata /data/study_ct/clinical.csv \
--modality ct
# Inspect and verify.
dsimaging-admin list
dsimaging-admin status study_ct_v1
dsimaging-admin verify study_ct_v1
dsimaging-admin doctor
# Rebuild artifacts from S3, copy, download or delete.
dsimaging-admin rescan study_ct_v1
dsimaging-admin copy study_ct_v1 study_ct_v2 --yes
dsimaging-admin download study_ct_v1 ./debug/study_ct_v1
dsimaging-admin delete study_ct_v1 --yes --purge-versions
All reporting commands that are useful for automation support JSON output:
dsimaging-admin list --output json
dsimaging-admin status study_ct_v1 --output json
dsimaging-admin verify study_ct_v1 --output json
dsimaging-admin doctor --output json
What publish does
- Scans your local image directory and optional masks under
source/masks/,masks/,source/labels/, orlabels/. - Runs basic DICOM sanity checks for series UID, modality and instance order.
- Computes SHA-256 content hashes.
- Skips uploads that already match the current dataset hash indexes.
- Uploads through
datasets/<id>/.staging-*and a.publish-lock, then copies intodatasets/<id>/source/.... - Generates and uploads:
manifest.yamlindexes/content_hash_index.parquetindexes/masks_content_hash_index.parquetwhen masks existmetadata/sample_manifests.parquetmetadata/samples.parquet
Use --dry-run to scan and show the upload plan without S3 writes, --no-skip
to force uploads, or --no-atomic to disable staging.
Configuration
~/.dsimaging.yaml supports multiple profiles:
default_profile: default
profiles:
default:
endpoint: http://127.0.0.1:9000
controller_url: http://127.0.0.1:8080
bucket: imaging-data
access_key: minioadmin
secret_key: minioadmin123
region: ""
Environment variables override profile values:
| Variable | Default | Description |
|---|---|---|
DSIMAGING_PROFILE |
default |
Config profile |
DSIMAGING_ENDPOINT |
http://127.0.0.1:9000 |
S3/MinIO endpoint |
DSIMAGING_CONTROLLER_URL |
(empty) | dsimaging-store controller URL |
DSIMAGING_ACCESS_KEY |
minioadmin |
S3 access key |
DSIMAGING_SECRET_KEY |
minioadmin123 |
S3 secret key |
DSIMAGING_BUCKET |
imaging-data |
Bucket name |
DSIMAGING_REGION |
(empty) | S3 region |
Dataset layout in S3
s3://<bucket>/datasets/<dataset_id>/
manifest.yaml
metadata/
samples.parquet
sample_manifests.parquet
indexes/
content_hash_index.parquet
masks_content_hash_index.parquet
source/
images/
masks/
derived/
qc/
Store creation and dataset management only target dsimaging-store deployments.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dsimaging_admin-0.3.5.tar.gz.
File metadata
- Download URL: dsimaging_admin-0.3.5.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd55c8e7ca75b9f04189f77dfd85027d8a445fc538c1aa80d6a5d0fa53177bbe
|
|
| MD5 |
19e2657372635f5eb673d038f0009eb0
|
|
| BLAKE2b-256 |
e88e317c6f0e1d189ba62d7668474e0af9b0fb562d920e9bc6e5b03729d7aea3
|
File details
Details for the file dsimaging_admin-0.3.5-py3-none-any.whl.
File metadata
- Download URL: dsimaging_admin-0.3.5-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80e4d846c6afaa00ea4d4592418ac3d10516c4263b2c3cf73d37b01e28e652f3
|
|
| MD5 |
c6271571185595d2b03a12d2ee0dc837
|
|
| BLAKE2b-256 |
bfa5fa04a9c5870c098ad63264466176df7c21c7f5c52774e9e4796d535459bf
|