Support multiple files for a single Girder-resource input#257
Open
PaulHax wants to merge 1 commit into
Open
Conversation
An input parameter declared with multiple="true" in the CLI XML now accepts a comma-separated list of Girder ids. Each file is resolved through its own volume transform -- a direct read-only bind mount when the direct path setting allows it, otherwise the existing download fallback -- and the container receives a single comma-separated list of container paths, preserving the submitted order. Names are prefixed with their model id so same-named series files cannot collide in the mounted volume, and commas are stripped from them so a legal Girder name cannot corrupt the joined path list. All files in a list share one Girder client, so the number of tokens minted per submission does not grow with the length of the list, and callers that only need the primary (first) model of a multiple input load just that one. The primary input bookkeeping (job title, upload reference file/item ids, template parameters) keys off the first file of the list. Inputs with multiple set were already excluded from batch processing. This removes the need for CLIs to fetch multi-file inputs through the REST api with an in-container Girder token.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Item 2 of #256.
Lets a single Girder-resource input accept multiple files.
multiple="true"accepts a comma-separated list of Girder ids.The motivating case is a multi-file DICOM series as one input: today a CLI has to fetch the files itself through the REST API with an in-container Girder token; with this it just receives N local read-only paths.
Single-file inputs and existing CLIs are untouched — a
multipleinput given one id behaves exactly as before.multipleis the existing Slicer Execution Model attribute (already parsed by the vendored ctk_cli, and already excluded from batch mode). Tests included at the REST and transform level.Notes for review:
multiple="true"becomes the public way a CLI declares this, so the spelling is your call. Happy to use a different attribute, marker, or mechanism.multipleinput (its multi-file button is batch mode, correctly hidden here) — the feature is REST-level; UI parity could be a follow-up if you want it.