Expanding ClowderFileSystem to select Folders as well #1219
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.
The FileSystemViewer's functionality has been expanded to support the selection of folders. This enhancement enables passing folders as parameters to extractors that require folder inputs. For instance, a fine-tuning extractor might need a folder containing multiple photos.
Testing this feature is similar to the process outlined in PR #1103.
How to Test
Prepare an extractor:
extractor-info.json
file under theschema
field ofparameters
. If using the wordcount extractor, modify the file here:Create test data:
Run the extractor:
Execute the extractor within the dataset. Open the extractor interface and access the file selector. The file system will be displayed, allowing selection of both files and folders. However, since
selectFolder
is set totrue
, the "Confirm" button will be disabled when files are selected.Select a folder:
Choose a folder, confirm the selection and submit the extractor
Verify extractor logs:
Check the extractor logs to confirm that
FOLDER_SELECTION
appears as a parameter in the default check message. It is ok if the extractor gives an error, we are just testing the component is working as requested. The JSON is sent as a stringTest additional behavior:
Re-run the extractor after setting
showOnlyDatasetFiles
totrue
(or removing it). This change restricts the file system view to show only files and folders within the dataset being processed.