diff --git a/src/electron/frontend/core/components/BasicTable.js b/src/electron/frontend/core/components/BasicTable.js index 687c98807d..8ebc832b8f 100644 --- a/src/electron/frontend/core/components/BasicTable.js +++ b/src/electron/frontend/core/components/BasicTable.js @@ -509,7 +509,7 @@ export class BasicTable extends LitElement { size="small" @click=${() => { const input = document.createElement("input"); - input.type = "file"; + input.type = "file-path"; input.accept = "text/tab-separated-values"; input.click(); input.onchange = () => { diff --git a/src/electron/frontend/core/components/FileSystemSelector.js b/src/electron/frontend/core/components/FileSystemSelector.js index d9d444d8e4..89677b08ca 100644 --- a/src/electron/frontend/core/components/FileSystemSelector.js +++ b/src/electron/frontend/core/components/FileSystemSelector.js @@ -7,20 +7,41 @@ const { dialog } = remote; import restartSVG from "../../assets/icons/restart.svg?raw"; import { unsafeSVG } from "lit/directives/unsafe-svg.js"; -function getObjectTypeReferenceString(type, multiple, { nested, native } = {}) { - if (Array.isArray(type)) - return `${multiple ? "" : "a "}${type - .map((type) => getObjectTypeReferenceString(type, multiple, { native, nested: true })) - .join(" / ")}`; - - const isDir = type === "directory"; - return multiple && (!isDir || (isDir && !native) || dialog) - ? type === "directory" - ? "directories" - : "files" - : nested - ? type - : `a ${type}`; +/** + * Generates a human-readable reference string for filesystem object types. + * + * @param {string|Array} type - The filesystem object type(s). Can be "file-path", + * "directory-path", or an array ["file-path", "directory-path"]. + * @param {boolean} multiple - Whether multiple objects are expected (affects pluralization). + * + * @returns {string} A formatted reference string like "a file", "directories", + * "a file / directory", etc. + */ +function getObjectTypeReferenceString(type, multiple) { + if (Array.isArray(type)) { + const article = multiple ? "" : "a "; + return `${article}file / directory`; + } + + if (multiple) { + return type === "directory-path" ? "directories" : "files"; + } + + const cleanTypeName = type.replace("-path", ""); + return `a ${cleanTypeName}`; +} + +/** + * Generates a simple string representation of a filesystem object type. + * + * @param {string|Array} type - The filesystem object type(s). + * @returns {string} A simple string representation of the type(s): "file", "directory", or "file / directory". + */ +function getSimpleObjectTypeString(type) { + if (Array.isArray(type)) { + return "file / directory"; + } + return type.replace("-path", ""); } const componentCSS = css` @@ -113,7 +134,7 @@ export class FilesystemSelector extends LitElement { this.accept = props.accept; this.multiple = props.multiple; - this.type = props.type ?? "file"; + this.type = props.type ?? "file-path"; this.value = props.value ?? ""; this.dialogOptions = props.dialogOptions ?? {}; this.onChange = props.onChange ?? (() => {}); @@ -146,7 +167,7 @@ export class FilesystemSelector extends LitElement { } options.properties = [ - type === "file" ? "openFile" : "openDirectory", + type === "file-path" ? "openFile" : "openDirectory", "noResolveAliases", ...(options.properties ?? []), ]; @@ -165,8 +186,11 @@ export class FilesystemSelector extends LitElement { #check = (value) => { // Check type const isLikelyFile = fs ? fs.statSync(value).isFile() : value.split(".").length; - if ((this.type === "directory" && isLikelyFile) || (this.type === "file" && !isLikelyFile)) - this.#onThrow("Incorrect filesystem object", `Please provide a ${this.type} instead.`); + if ((this.type === "directory-path" && isLikelyFile) || (this.type === "file-path" && !isLikelyFile)) + this.#onThrow( + "Incorrect filesystem object", + `Please provide a ${this.type.replace("-path", "")} instead.` + ); }; #handleFiles = async (pathOrPaths, type) => { @@ -182,7 +206,7 @@ export class FilesystemSelector extends LitElement { if (Array.isArray(resolvedValue) && !this.multiple) { if (resolvedValue.length > 1) this.#onThrow( - `Too many ${resolvedType === "directory" ? "directories" : "files"} detected`, + `Too many ${resolvedType === "directory-path" ? "directories" : "files"} detected`, `This selector will only accept one.` ); resolvedValue = resolvedValue[0]; @@ -205,7 +229,7 @@ export class FilesystemSelector extends LitElement { this.#handleFiles(results.filePath ?? results.filePaths, type); } else { let handles = await ( - type === "directory" + type === "directory-path" ? window.showDirectoryPicker() : window.showOpenFilePicker({ multiple: this.multiple }) ).catch(() => []); // Call using the same options @@ -230,8 +254,6 @@ export class FilesystemSelector extends LitElement { : this.value[0] : this.value; - const objectTypeReference = getObjectTypeReferenceString(this.type, this.multiple); - const instanceThis = this; return html` @@ -261,20 +283,18 @@ export class FilesystemSelector extends LitElement { ${dialog ? "" : html`
Cannot get full ${isMultipleTypes ? this.type.join(" / ") : this.type} + >Cannot get full ${getSimpleObjectTypeString(this.type)} path${this.multiple ? "s" : ""} on web distribution`} ` : html`Drop ${objectTypeReference} + >Drop ${getObjectTypeReferenceString(this.type, this.multiple)} here${isMultipleTypes ? "" - : `, or click to choose ${getObjectTypeReferenceString(this.type, this.multiple, { - native: true, - })}`}${this.multiple && - (this.type === "directory" || - (isMultipleTypes && this.type.includes("directory") && !dialog)) + (this.type === "directory-path" || + (isMultipleTypes && this.type.includes("directory-path") && !dialog)) ? html`
Multiple directory support only available using drag-and-drop.` @@ -301,8 +321,7 @@ export class FilesystemSelector extends LitElement { ${this.type.map( (type) => html` this.selectFormat(type)} - >Select - ${getObjectTypeReferenceString(type, this.multiple, { native: true })}Select ${getObjectTypeReferenceString(type, this.multiple)}` )} ` diff --git a/src/electron/frontend/core/components/JSONSchemaInput.js b/src/electron/frontend/core/components/JSONSchemaInput.js index 2cbda00943..63ea2a06e4 100644 --- a/src/electron/frontend/core/components/JSONSchemaInput.js +++ b/src/electron/frontend/core/components/JSONSchemaInput.js @@ -314,8 +314,8 @@ const isFilesystemSelector = (name = "", format) => { if (Array.isArray(format)) return format.map((f) => isFilesystemSelector(name, f)).every(Boolean) ? format : null; const matched = name.match(/(.+_)?(.+)_paths?/); - if (!format && matched) format = matched[2] === "folder" ? "directory" : matched[2]; - return ["file", "directory"].includes(format) ? format : null; // Handle file and directory formats + if (!format && matched) format = matched[2] === "folder" ? "directory-path" : matched[2]; + return ["file-path", "directory-path"].includes(format) ? format : null; // Handle file and directory formats }; function getFirstFocusableElement(element) { diff --git a/src/electron/frontend/core/components/pages/guided-mode/data/GuidedPathExpansion.js b/src/electron/frontend/core/components/pages/guided-mode/data/GuidedPathExpansion.js index e8aef87d94..83e109f203 100644 --- a/src/electron/frontend/core/components/pages/guided-mode/data/GuidedPathExpansion.js +++ b/src/electron/frontend/core/components/pages/guided-mode/data/GuidedPathExpansion.js @@ -30,7 +30,7 @@ export async function autocompleteFormatString(path) { const schema = getSchema(path, this.info.globalState.schema.source_data); const isFile = "file_path" in schema.properties; - const pathType = isFile ? "file" : "directory"; + const pathType = isFile ? "file-path" : "directory-path"; const description = isFile ? schema.properties.file_path.description : schema.properties.folder_path.description; diff --git a/src/electron/frontend/core/components/pages/guided-mode/data/alignment/TimeAlignment.js b/src/electron/frontend/core/components/pages/guided-mode/data/alignment/TimeAlignment.js index 3bbb03c23c..3d5e9c4b2a 100644 --- a/src/electron/frontend/core/components/pages/guided-mode/data/alignment/TimeAlignment.js +++ b/src/electron/frontend/core/components/pages/guided-mode/data/alignment/TimeAlignment.js @@ -15,7 +15,7 @@ const options = { name: "Upload Timestamps", schema: { type: "string", - format: "file", + format: "file-path", description: "A CSV file containing the timestamps of the recording.", }, }, diff --git a/src/electron/frontend/core/components/pages/guided-mode/setup/Preform.js b/src/electron/frontend/core/components/pages/guided-mode/setup/Preform.js index 1b444a3c76..81fe44891c 100644 --- a/src/electron/frontend/core/components/pages/guided-mode/setup/Preform.js +++ b/src/electron/frontend/core/components/pages/guided-mode/setup/Preform.js @@ -53,7 +53,7 @@ const questions = { base_directory: { type: "string", - format: "directory", + format: "directory-path", title: "Where is your data located?", description: "A single directory where all data is contained. Can override for specific data formats.
Leave blank if unknown", diff --git a/src/electron/frontend/core/components/pages/inspect/InspectPage.js b/src/electron/frontend/core/components/pages/inspect/InspectPage.js index e711673b32..ab678477aa 100644 --- a/src/electron/frontend/core/components/pages/inspect/InspectPage.js +++ b/src/electron/frontend/core/components/pages/inspect/InspectPage.js @@ -132,7 +132,7 @@ export class InspectPage extends Page { type: "array", items: { type: "string", - format: ["file", "directory"], + format: ["file-path", "directory-path"], multiple: true, }, }, diff --git a/src/electron/frontend/core/components/pages/preview/PreviewPage.js b/src/electron/frontend/core/components/pages/preview/PreviewPage.js index 0b4c44ecad..397c9da5ef 100644 --- a/src/electron/frontend/core/components/pages/preview/PreviewPage.js +++ b/src/electron/frontend/core/components/pages/preview/PreviewPage.js @@ -34,7 +34,7 @@ export class PreviewPage extends Page { path: ["file_path"], schema: { type: "string", - format: "file", + format: "file-path", description: "Please provide a file path that you'd like to visualize using Neurosift. The GUIDE will serve this file and access the appropriate URL automatically.", }, diff --git a/src/schemas/json/dandi/standalone.json b/src/schemas/json/dandi/standalone.json index 748e7f6cf0..eb301598d3 100644 --- a/src/schemas/json/dandi/standalone.json +++ b/src/schemas/json/dandi/standalone.json @@ -7,7 +7,7 @@ "type": "array", "items":{ "type": "string", - "format": ["file", "directory"] + "format": ["file-path", "directory-path"] }, "minItems": 1 }, diff --git a/src/schemas/json/developer/globals.json b/src/schemas/json/developer/globals.json index 41b55fe517..8f657564f1 100644 --- a/src/schemas/json/developer/globals.json +++ b/src/schemas/json/developer/globals.json @@ -2,7 +2,7 @@ "properties": { "testing_data_folder": { "type": "string", - "format": "directory", + "format": "directory-path", "description": "Common folder where GIN testing data (e.g. ephy_testing_data, ophys_testing_data) can be found" } } diff --git a/src/schemas/json/path-expansion.schema.json b/src/schemas/json/path-expansion.schema.json index 103e80e2d5..c249aaf99a 100644 --- a/src/schemas/json/path-expansion.schema.json +++ b/src/schemas/json/path-expansion.schema.json @@ -2,7 +2,7 @@ "properties": { "base_directory": { "type": "string", - "format": "directory", + "format": "directory-path", "description": "Enter the base directory of your data." }, "format_string_path": { diff --git a/src/schemas/json/project/globals.json b/src/schemas/json/project/globals.json index aeadc6217c..cfa362a543 100644 --- a/src/schemas/json/project/globals.json +++ b/src/schemas/json/project/globals.json @@ -2,7 +2,7 @@ "properties": { "conversion_output_folder": { "type": "string", - "format": "directory", + "format": "directory-path", "description": "Provide a custom output location for your NWB files. Will default to ~/NWB_GUIDE/conversions" } }, diff --git a/src/schemas/json/tutorial.schema.json b/src/schemas/json/tutorial.schema.json index c3e7c7ed87..c8c45bd4a2 100644 --- a/src/schemas/json/tutorial.schema.json +++ b/src/schemas/json/tutorial.schema.json @@ -2,7 +2,7 @@ "properties": { "test_data_directory_path": { "type": "string", - "format": "directory", + "format": "directory-path", "description": "Enter the path to your local instance of the ephy_testing_data directory", "placeholder": "Enter testing directory path" } diff --git a/src/schemas/source-data.schema.ts b/src/schemas/source-data.schema.ts index 95f2afca02..b6c0964ff6 100644 --- a/src/schemas/source-data.schema.ts +++ b/src/schemas/source-data.schema.ts @@ -18,7 +18,7 @@ export default function preprocessSourceDataSchema (schema) { if (schema.properties.file_paths) { Object.assign(schema.properties.file_paths, { - items: { type: 'string' }, + items: { format: 'file-path', type: 'string' }, description: 'Only one file supported at this time. Multiple file support coming soon.', maxItems: 1, }) diff --git a/stories/components/FileSystemSelector.stories.js b/stories/components/FileSystemSelector.stories.js index 7ab7c0b389..8162770ab8 100644 --- a/stories/components/FileSystemSelector.stories.js +++ b/stories/components/FileSystemSelector.stories.js @@ -6,7 +6,7 @@ export default { const Template = (args) => new FilesystemSelector(args); -const types = ["file", "directory"]; +const types = ["file-path", "directory-path"]; export const File = Template.bind({}); export const Folder = Template.bind({}); diff --git a/stories/components/JSONSchemaForm.stories.js b/stories/components/JSONSchemaForm.stories.js index ce2922535c..a19152d8ad 100644 --- a/stories/components/JSONSchemaForm.stories.js +++ b/stories/components/JSONSchemaForm.stories.js @@ -22,13 +22,13 @@ const defaultSchema = { }, optional: { type: "string", - format: "file", + format: "file-path", }, list: { type: "array", items: { type: "string", - format: "file", + format: "file-path", }, }, }, diff --git a/stories/inputs/interface_schemas/AlphaOmegaRecordingInterface.json b/stories/inputs/interface_schemas/AlphaOmegaRecordingInterface.json index cfd2d72d51..203c5c399d 100644 --- a/stories/inputs/interface_schemas/AlphaOmegaRecordingInterface.json +++ b/stories/inputs/interface_schemas/AlphaOmegaRecordingInterface.json @@ -2,24 +2,24 @@ "required": [], "properties": { "AlphaOmegaRecordingInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "Path to the folder of .mpx files." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/AudioInterface.json b/stories/inputs/interface_schemas/AudioInterface.json index 9ffca2ef0f..9dcaca8c2e 100644 --- a/stories/inputs/interface_schemas/AudioInterface.json +++ b/stories/inputs/interface_schemas/AudioInterface.json @@ -2,18 +2,22 @@ "required": [], "properties": { "AudioInterface": { - "required": [ - "file_paths" - ], "properties": { "file_paths": { + "items": { + "format": "file-path", + "type": "string" + }, "type": "array" }, "verbose": { - "type": "boolean", - "default": false + "default": false, + "type": "boolean" } }, + "required": [ + "file_paths" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/AxonaRecordingInterface.json b/stories/inputs/interface_schemas/AxonaRecordingInterface.json index 5e703560a6..ae718921df 100644 --- a/stories/inputs/interface_schemas/AxonaRecordingInterface.json +++ b/stories/inputs/interface_schemas/AxonaRecordingInterface.json @@ -2,24 +2,24 @@ "required": [], "properties": { "AxonaRecordingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to .bin file." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/BiocamRecordingInterface.json b/stories/inputs/interface_schemas/BiocamRecordingInterface.json index 7a7fa27302..47fcf95b9c 100644 --- a/stories/inputs/interface_schemas/BiocamRecordingInterface.json +++ b/stories/inputs/interface_schemas/BiocamRecordingInterface.json @@ -2,24 +2,24 @@ "required": [], "properties": { "BiocamRecordingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to the .bwr file." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/BlackrockRecordingInterface.json b/stories/inputs/interface_schemas/BlackrockRecordingInterface.json index e14bcea726..73e5d708ed 100644 --- a/stories/inputs/interface_schemas/BlackrockRecordingInterface.json +++ b/stories/inputs/interface_schemas/BlackrockRecordingInterface.json @@ -2,28 +2,36 @@ "required": [], "properties": { "BlackrockRecordingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", - "description": "Path to the Blackrock file with suffix being .ns1, .ns2, .ns3, .ns4m .ns4, or .ns6.", - "type": "string" + "format": "file-path", + "type": "string", + "description": "Path to the Blackrock file with suffix being .ns1, .ns2, .ns3, .ns4m .ns4, or .ns6." }, "nsx_override": { - "format": "file", - "type": "string" + "anyOf": [ + { + "format": "file-path", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/BlackrockSortingInterface.json b/stories/inputs/interface_schemas/BlackrockSortingInterface.json index 98baa65846..d101083b6f 100644 --- a/stories/inputs/interface_schemas/BlackrockSortingInterface.json +++ b/stories/inputs/interface_schemas/BlackrockSortingInterface.json @@ -2,25 +2,26 @@ "required": [], "properties": { "BlackrockSortingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", - "description": "Path to Blackrock .nev file.", - "type": "string" + "format": "file-path", + "type": "string", + "description": "Path to Blackrock .nev file." }, "sampling_frequency": { - "description": "The sampling frequency for the sorting extractor. When the signal data is available (.ncs) those files will be", - "type": "number" + "default": null, + "type": "number", + "description": "The sampling frequency for the sorting extractor. When the signal data is available (.ncs) those files will be" }, "verbose": { - "description": "Enables verbosity", + "default": true, "type": "boolean", - "default": true + "description": "Enables verbosity" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": true } diff --git a/stories/inputs/interface_schemas/BrukerTiffMultiPlaneConverter.json b/stories/inputs/interface_schemas/BrukerTiffMultiPlaneConverter.json index 072c287f0e..d12570e222 100644 --- a/stories/inputs/interface_schemas/BrukerTiffMultiPlaneConverter.json +++ b/stories/inputs/interface_schemas/BrukerTiffMultiPlaneConverter.json @@ -2,26 +2,28 @@ "required": [], "properties": { "BrukerTiffMultiPlaneConverter": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "The folder that contains the Bruker TIF image files (.ome.tif) and configuration files (.xml, .env)." }, "plane_separation_type": { + "default": null, "enum": [ "disjoint", "contiguous" - ] + ], + "type": "string" }, "verbose": { - "type": "boolean", - "default": false + "default": false, + "type": "boolean" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/BrukerTiffMultiPlaneImagingInterface.json b/stories/inputs/interface_schemas/BrukerTiffMultiPlaneImagingInterface.json index 4aa3faca75..6e2b592262 100644 --- a/stories/inputs/interface_schemas/BrukerTiffMultiPlaneImagingInterface.json +++ b/stories/inputs/interface_schemas/BrukerTiffMultiPlaneImagingInterface.json @@ -2,23 +2,31 @@ "required": [], "properties": { "BrukerTiffMultiPlaneImagingInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "The folder that contains the Bruker TIF image files (.ome.tif) and configuration files (.xml, .env)." }, "stream_name": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/BrukerTiffSinglePlaneConverter.json b/stories/inputs/interface_schemas/BrukerTiffSinglePlaneConverter.json index a4a52ec3e5..9e37da925d 100644 --- a/stories/inputs/interface_schemas/BrukerTiffSinglePlaneConverter.json +++ b/stories/inputs/interface_schemas/BrukerTiffSinglePlaneConverter.json @@ -2,19 +2,19 @@ "required": [], "properties": { "BrukerTiffSinglePlaneConverter": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string" }, "verbose": { - "type": "boolean", - "default": false + "default": false, + "type": "boolean" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/BrukerTiffSinglePlaneImagingInterface.json b/stories/inputs/interface_schemas/BrukerTiffSinglePlaneImagingInterface.json index c04abec2df..846d4a4c52 100644 --- a/stories/inputs/interface_schemas/BrukerTiffSinglePlaneImagingInterface.json +++ b/stories/inputs/interface_schemas/BrukerTiffSinglePlaneImagingInterface.json @@ -2,23 +2,31 @@ "required": [], "properties": { "BrukerTiffSinglePlaneImagingInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "The folder containing the Bruker TIF image files and configuration files." }, "stream_name": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/CaimanSegmentationInterface.json b/stories/inputs/interface_schemas/CaimanSegmentationInterface.json index 1810b39b7e..ad10efa1d1 100644 --- a/stories/inputs/interface_schemas/CaimanSegmentationInterface.json +++ b/stories/inputs/interface_schemas/CaimanSegmentationInterface.json @@ -2,20 +2,20 @@ "required": [], "properties": { "CaimanSegmentationInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to .hdf5 file." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/CellExplorerRecordingInterface.json b/stories/inputs/interface_schemas/CellExplorerRecordingInterface.json index ff3ce4df57..9e6c786794 100644 --- a/stories/inputs/interface_schemas/CellExplorerRecordingInterface.json +++ b/stories/inputs/interface_schemas/CellExplorerRecordingInterface.json @@ -2,25 +2,25 @@ "required": [], "properties": { "CellExplorerRecordingInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", - "description": "Folder containing the .session.mat file", - "type": "string" + "format": "directory-path", + "type": "string", + "description": "Folder containing the .session.mat file" }, "verbose": { - "description": "Whether to output verbose text.", + "default": true, "type": "boolean", - "default": true + "description": "Whether to output verbose text." }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/CellExplorerSortingInterface.json b/stories/inputs/interface_schemas/CellExplorerSortingInterface.json index c51a65d4ee..7b6f880595 100644 --- a/stories/inputs/interface_schemas/CellExplorerSortingInterface.json +++ b/stories/inputs/interface_schemas/CellExplorerSortingInterface.json @@ -2,19 +2,19 @@ "required": [], "properties": { "CellExplorerSortingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string" }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/CnmfeSegmentationInterface.json b/stories/inputs/interface_schemas/CnmfeSegmentationInterface.json index 381a6c3a7c..f29cad94cf 100644 --- a/stories/inputs/interface_schemas/CnmfeSegmentationInterface.json +++ b/stories/inputs/interface_schemas/CnmfeSegmentationInterface.json @@ -2,19 +2,19 @@ "required": [], "properties": { "CnmfeSegmentationInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string" }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/DeepLabCutInterface.json b/stories/inputs/interface_schemas/DeepLabCutInterface.json index 7e2e5fa401..97b0a03c35 100644 --- a/stories/inputs/interface_schemas/DeepLabCutInterface.json +++ b/stories/inputs/interface_schemas/DeepLabCutInterface.json @@ -2,30 +2,30 @@ "required": [], "properties": { "DeepLabCutInterface": { - "required": [ - "file_path", - "config_file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to the .h5 file output by dlc." }, "config_file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to .yml config file" }, "subject_name": { - "type": "string", - "default": "ind1" + "default": "ind1", + "type": "string" }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "file_path", + "config_file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/EDFRecordingInterface.json b/stories/inputs/interface_schemas/EDFRecordingInterface.json index b7371462e0..c86cb641d4 100644 --- a/stories/inputs/interface_schemas/EDFRecordingInterface.json +++ b/stories/inputs/interface_schemas/EDFRecordingInterface.json @@ -2,24 +2,24 @@ "required": [], "properties": { "EDFRecordingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to the .edf file." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/ExtractSegmentationInterface.json b/stories/inputs/interface_schemas/ExtractSegmentationInterface.json index 6d488ff38a..05fe0fb185 100644 --- a/stories/inputs/interface_schemas/ExtractSegmentationInterface.json +++ b/stories/inputs/interface_schemas/ExtractSegmentationInterface.json @@ -2,26 +2,34 @@ "required": [], "properties": { "ExtractSegmentationInterface": { - "required": [ - "file_path", - "sampling_frequency" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string" }, "sampling_frequency": { "type": "number" }, "output_struct_name": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "file_path", + "sampling_frequency" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/FicTracDataInterface.json b/stories/inputs/interface_schemas/FicTracDataInterface.json index 6cd7f5f912..0ce14acdf3 100644 --- a/stories/inputs/interface_schemas/FicTracDataInterface.json +++ b/stories/inputs/interface_schemas/FicTracDataInterface.json @@ -2,27 +2,43 @@ "required": [], "properties": { "FicTracDataInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to the .dat file (the output of fictrac)" }, "radius": { - "type": "number" + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null }, "configuration_file_path": { - "format": "file", - "type": "string" + "anyOf": [ + { + "format": "file-path", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/IntanRecordingInterface.json b/stories/inputs/interface_schemas/IntanRecordingInterface.json index b7910b04ce..149286f4c8 100644 --- a/stories/inputs/interface_schemas/IntanRecordingInterface.json +++ b/stories/inputs/interface_schemas/IntanRecordingInterface.json @@ -2,27 +2,39 @@ "required": [], "properties": { "IntanRecordingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to either a .rhd or a .rhs file" }, "stream_id": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" + }, + "ignore_integrity_checks": { + "default": false, + "type": "boolean" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/KiloSortSortingInterface.json b/stories/inputs/interface_schemas/KiloSortSortingInterface.json index b386258234..edf2e799c6 100644 --- a/stories/inputs/interface_schemas/KiloSortSortingInterface.json +++ b/stories/inputs/interface_schemas/KiloSortSortingInterface.json @@ -2,24 +2,24 @@ "required": [], "properties": { "KiloSortSortingInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "Path to the output Phy folder (containing the params.py)" }, "keep_good_only": { - "type": "boolean", - "default": false + "default": false, + "type": "boolean" }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/MCSRawRecordingInterface.json b/stories/inputs/interface_schemas/MCSRawRecordingInterface.json index 58d5d63d11..4cdde3f823 100644 --- a/stories/inputs/interface_schemas/MCSRawRecordingInterface.json +++ b/stories/inputs/interface_schemas/MCSRawRecordingInterface.json @@ -2,24 +2,24 @@ "required": [], "properties": { "MCSRawRecordingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to the .raw file." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/MEArecRecordingInterface.json b/stories/inputs/interface_schemas/MEArecRecordingInterface.json index d8bb66224b..6a61a4d903 100644 --- a/stories/inputs/interface_schemas/MEArecRecordingInterface.json +++ b/stories/inputs/interface_schemas/MEArecRecordingInterface.json @@ -2,24 +2,24 @@ "required": [], "properties": { "MEArecRecordingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to the MEArec .h5 file." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/MicroManagerTiffImagingInterface.json b/stories/inputs/interface_schemas/MicroManagerTiffImagingInterface.json index 9791ad85b2..3e3dd52b43 100644 --- a/stories/inputs/interface_schemas/MicroManagerTiffImagingInterface.json +++ b/stories/inputs/interface_schemas/MicroManagerTiffImagingInterface.json @@ -2,20 +2,20 @@ "required": [], "properties": { "MicroManagerTiffImagingInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "The folder containing the OME-TIF image files." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/MiniscopeBehaviorInterface.json b/stories/inputs/interface_schemas/MiniscopeBehaviorInterface.json index 506b9f7d2c..8770c2d902 100644 --- a/stories/inputs/interface_schemas/MiniscopeBehaviorInterface.json +++ b/stories/inputs/interface_schemas/MiniscopeBehaviorInterface.json @@ -2,16 +2,16 @@ "required": [], "properties": { "MiniscopeBehaviorInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "The main Miniscope folder. The movie files are expected to be in sub folders within the main folder." } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/MiniscopeConverter.json b/stories/inputs/interface_schemas/MiniscopeConverter.json index 38f969e75a..67fb323d64 100644 --- a/stories/inputs/interface_schemas/MiniscopeConverter.json +++ b/stories/inputs/interface_schemas/MiniscopeConverter.json @@ -2,20 +2,20 @@ "required": [], "properties": { "MiniscopeConverter": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "The path to the main Miniscope folder." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/MiniscopeImagingInterface.json b/stories/inputs/interface_schemas/MiniscopeImagingInterface.json index cb5e3b55a5..36fb8cc314 100644 --- a/stories/inputs/interface_schemas/MiniscopeImagingInterface.json +++ b/stories/inputs/interface_schemas/MiniscopeImagingInterface.json @@ -2,16 +2,16 @@ "required": [], "properties": { "MiniscopeImagingInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "The main Miniscope folder. The microscope movie files are expected to be in sub folders within the main folder." } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/NeuralynxRecordingInterface.json b/stories/inputs/interface_schemas/NeuralynxRecordingInterface.json index 1bf31403fb..a188add17e 100644 --- a/stories/inputs/interface_schemas/NeuralynxRecordingInterface.json +++ b/stories/inputs/interface_schemas/NeuralynxRecordingInterface.json @@ -2,27 +2,35 @@ "required": [], "properties": { "NeuralynxRecordingInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", - "description": "Path to Neuralynx directory containing \".nse\", \".ntt\", \".nse\", or \".nev\" files." + "description": "Path to Neuralynx directory containing \".ncs\", \".nse\", \".ntt\", \".nse\", or \".nev\" files." }, "stream_name": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "verbose": { - "type": "boolean", - "default": false + "default": false, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/NeuroScopeLFPInterface.json b/stories/inputs/interface_schemas/NeuroScopeLFPInterface.json index 639985ff2e..b027efe194 100644 --- a/stories/inputs/interface_schemas/NeuroScopeLFPInterface.json +++ b/stories/inputs/interface_schemas/NeuroScopeLFPInterface.json @@ -2,23 +2,39 @@ "required": [], "properties": { "NeuroScopeLFPInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to .lfp or .eeg file." }, "gain": { - "type": "number" + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null }, "xml_file_path": { - "format": "file", - "type": "string" + "anyOf": [ + { + "format": "file-path", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/NeuroScopeRecordingInterface.json b/stories/inputs/interface_schemas/NeuroScopeRecordingInterface.json index 7afc396a6d..251d9ead9b 100644 --- a/stories/inputs/interface_schemas/NeuroScopeRecordingInterface.json +++ b/stories/inputs/interface_schemas/NeuroScopeRecordingInterface.json @@ -2,31 +2,47 @@ "required": [], "properties": { "NeuroScopeRecordingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to .dat file." }, "gain": { - "type": "number" + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null }, "xml_file_path": { - "format": "file", - "type": "string" + "anyOf": [ + { + "format": "file-path", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/NeuroScopeSortingInterface.json b/stories/inputs/interface_schemas/NeuroScopeSortingInterface.json index 10ebfe0695..37f8852bcc 100644 --- a/stories/inputs/interface_schemas/NeuroScopeSortingInterface.json +++ b/stories/inputs/interface_schemas/NeuroScopeSortingInterface.json @@ -2,34 +2,53 @@ "required": [], "properties": { "NeuroScopeSortingInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "Path to folder containing .res and .clu files." }, "keep_mua_units": { - "type": "boolean", "default": true, + "type": "boolean", "description": "Whether to return sorted spikes from multi-unit activity." }, "exclude_shanks": { - "type": "array", + "anyOf": [ + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, "description": "List of indices to ignore." }, "xml_file_path": { - "format": "file", - "type": "string", + "anyOf": [ + { + "format": "file-path", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "Path to .xml file containing device and electrode configuration." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/OpenEphysRecordingInterface.json b/stories/inputs/interface_schemas/OpenEphysRecordingInterface.json index caf2e25da6..9f58a64c8b 100644 --- a/stories/inputs/interface_schemas/OpenEphysRecordingInterface.json +++ b/stories/inputs/interface_schemas/OpenEphysRecordingInterface.json @@ -2,30 +2,46 @@ "required": [], "properties": { "OpenEphysRecordingInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "Path to OpenEphys directory (.continuous or .dat files)." }, "stream_name": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "block_index": { - "type": "number" + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/PhySortingInterface.json b/stories/inputs/interface_schemas/PhySortingInterface.json index cf03020e9c..e6b5d64ae7 100644 --- a/stories/inputs/interface_schemas/PhySortingInterface.json +++ b/stories/inputs/interface_schemas/PhySortingInterface.json @@ -2,26 +2,37 @@ "required": [], "properties": { "PhySortingInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "Path to the output Phy folder (containing the params.py)." }, "exclude_cluster_groups": { - "type": "array", + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, "items": { "type": "string" } }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/PlexonRecordingInterface.json b/stories/inputs/interface_schemas/PlexonRecordingInterface.json index 5d000b3a24..884ec9dacf 100644 --- a/stories/inputs/interface_schemas/PlexonRecordingInterface.json +++ b/stories/inputs/interface_schemas/PlexonRecordingInterface.json @@ -2,24 +2,24 @@ "required": [], "properties": { "PlexonRecordingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to the .plx file." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/PlexonSortingInterface.json b/stories/inputs/interface_schemas/PlexonSortingInterface.json index 5cc6bdc181..513dcf5b44 100644 --- a/stories/inputs/interface_schemas/PlexonSortingInterface.json +++ b/stories/inputs/interface_schemas/PlexonSortingInterface.json @@ -2,20 +2,20 @@ "required": [], "properties": { "PlexonSortingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to the plexon spiking data (.plx file)." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/SLEAPInterface.json b/stories/inputs/interface_schemas/SLEAPInterface.json index 77703778ba..75610c8f7a 100644 --- a/stories/inputs/interface_schemas/SLEAPInterface.json +++ b/stories/inputs/interface_schemas/SLEAPInterface.json @@ -2,28 +2,44 @@ "required": [], "properties": { "SLEAPInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to the .slp file (the output of sleap)" }, "video_file_path": { - "format": "file", - "type": "string", + "anyOf": [ + { + "format": "file-path", + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "Path of the video for extracting timestamps (optional)." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "frames_per_second": { - "type": "number" + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/SbxImagingInterface.json b/stories/inputs/interface_schemas/SbxImagingInterface.json index d02d2c0e74..4753dbf682 100644 --- a/stories/inputs/interface_schemas/SbxImagingInterface.json +++ b/stories/inputs/interface_schemas/SbxImagingInterface.json @@ -2,22 +2,31 @@ "required": [], "properties": { "SbxImagingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string" }, "sampling_frequency": { + "default": null, "type": "number" }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" + }, + "photon_series_type": { + "default": "TwoPhotonSeries", + "enum": [ + "OnePhotonSeries", + "TwoPhotonSeries" + ], + "type": "string" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/ScanImageImagingInterface.json b/stories/inputs/interface_schemas/ScanImageImagingInterface.json index 1affeb16b8..e1f0560bcb 100644 --- a/stories/inputs/interface_schemas/ScanImageImagingInterface.json +++ b/stories/inputs/interface_schemas/ScanImageImagingInterface.json @@ -2,29 +2,53 @@ "required": [], "properties": { "ScanImageImagingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to Tiff file." }, "channel_name": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "plane_name": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "fallback_sampling_frequency": { - "type": "number" + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/Spike2RecordingInterface.json b/stories/inputs/interface_schemas/Spike2RecordingInterface.json index ad5d913210..bcc8fcc856 100644 --- a/stories/inputs/interface_schemas/Spike2RecordingInterface.json +++ b/stories/inputs/interface_schemas/Spike2RecordingInterface.json @@ -2,24 +2,24 @@ "required": [], "properties": { "Spike2RecordingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", - "description": "Path to .smr or .smrx file.", - "type": "string" + "format": "file-path", + "type": "string", + "description": "Path to .smrx file." }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": true } diff --git a/stories/inputs/interface_schemas/SpikeGLXConverterPipe.json b/stories/inputs/interface_schemas/SpikeGLXConverterPipe.json index 4b2fb1eae9..22ffe99d4c 100644 --- a/stories/inputs/interface_schemas/SpikeGLXConverterPipe.json +++ b/stories/inputs/interface_schemas/SpikeGLXConverterPipe.json @@ -2,21 +2,21 @@ "required": [], "properties": { "SpikeGLXConverterPipe": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", - "description": "Path to the folder containing SpikeGLX streams.", - "type": "string" + "format": "directory-path", + "type": "string", + "description": "Path to the folder containing SpikeGLX streams." }, "verbose": { - "description": "Whether to output verbose text.", + "default": false, "type": "boolean", - "default": false + "description": "Whether to output verbose text." } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/SpikeGLXNIDQInterface.json b/stories/inputs/interface_schemas/SpikeGLXNIDQInterface.json index 0903b15800..1f99917842 100644 --- a/stories/inputs/interface_schemas/SpikeGLXNIDQInterface.json +++ b/stories/inputs/interface_schemas/SpikeGLXNIDQInterface.json @@ -2,30 +2,30 @@ "required": [], "properties": { "SpikeGLXNIDQInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", - "description": "Path to SpikeGLX .nidq file.", - "type": "string" + "format": "file-path", + "type": "string", + "description": "Path to SpikeGLX .nidq file." }, "verbose": { - "description": "Whether to output verbose text.", + "default": true, "type": "boolean", - "default": true + "description": "Whether to output verbose text." }, "load_sync_channel": { - "description": "Whether to load the last channel in the stream, which is typically used for synchronization.\nIf True, then the probe is not loaded.", + "default": false, "type": "boolean", - "default": false + "description": "Whether to load the last channel in the stream, which is typically used for synchronization.\nIf True, then the probe is not loaded." }, "es_key": { - "type": "string", - "default": "ElectricalSeriesNIDQ" + "default": "ElectricalSeriesNIDQ", + "type": "string" } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/SpikeGLXRecordingInterface.json b/stories/inputs/interface_schemas/SpikeGLXRecordingInterface.json index fe04f74eea..7da25e95a7 100644 --- a/stories/inputs/interface_schemas/SpikeGLXRecordingInterface.json +++ b/stories/inputs/interface_schemas/SpikeGLXRecordingInterface.json @@ -2,24 +2,32 @@ "required": [], "properties": { "SpikeGLXRecordingInterface": { - "required": [ - "file_path" - ], "properties": { "file_path": { - "format": "file", - "description": "Path to SpikeGLX ap.bin or lf.bin file.", - "type": "string" + "format": "file-path", + "type": "string", + "description": "Path to SpikeGLX ap.bin or lf.bin file." }, "verbose": { - "description": "Whether to output verbose text.", + "default": true, "type": "boolean", - "default": true + "description": "Whether to output verbose text." }, "es_key": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null } }, + "required": [ + "file_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/Suite2pSegmentationInterface.json b/stories/inputs/interface_schemas/Suite2pSegmentationInterface.json index 417ff557c6..cdd9008318 100644 --- a/stories/inputs/interface_schemas/Suite2pSegmentationInterface.json +++ b/stories/inputs/interface_schemas/Suite2pSegmentationInterface.json @@ -2,30 +2,54 @@ "required": [], "properties": { "Suite2pSegmentationInterface": { - "required": [ - "folder_path" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string", "description": "Path to the folder containing Suite2p segmentation data. Should contain 'plane#' subfolder(s)." }, "channel_name": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "plane_name": { - "type": "string", + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, "description": "The name of the plane to load. This interface only loads one plane at a time. Use the full name, e.g. 'plane0'. If this value is omitted, the first plane found will be loaded." }, "plane_segmentation_name": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" } }, + "required": [ + "folder_path" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/TdtRecordingInterface.json b/stories/inputs/interface_schemas/TdtRecordingInterface.json index d48e0f968e..66e1a8a17a 100644 --- a/stories/inputs/interface_schemas/TdtRecordingInterface.json +++ b/stories/inputs/interface_schemas/TdtRecordingInterface.json @@ -2,31 +2,31 @@ "required": [], "properties": { "TdtRecordingInterface": { - "required": [ - "folder_path", - "gain" - ], "properties": { "folder_path": { - "format": "directory", + "format": "directory-path", "type": "string" }, "gain": { "type": "number" }, "stream_id": { - "type": "string", - "default": "0" + "default": "0", + "type": "string" }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" }, "es_key": { - "type": "string", - "default": "ElectricalSeries" + "default": "ElectricalSeries", + "type": "string" } }, + "required": [ + "folder_path", + "gain" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/TiffImagingInterface.json b/stories/inputs/interface_schemas/TiffImagingInterface.json index 036de528ab..2650f41c60 100644 --- a/stories/inputs/interface_schemas/TiffImagingInterface.json +++ b/stories/inputs/interface_schemas/TiffImagingInterface.json @@ -2,13 +2,9 @@ "required": [], "properties": { "TiffImagingInterface": { - "required": [ - "file_path", - "sampling_frequency" - ], "properties": { "file_path": { - "format": "file", + "format": "file-path", "type": "string", "description": "Path to Tiff file." }, @@ -16,10 +12,22 @@ "type": "number" }, "verbose": { - "type": "boolean", - "default": true + "default": true, + "type": "boolean" + }, + "photon_series_type": { + "default": "TwoPhotonSeries", + "enum": [ + "OnePhotonSeries", + "TwoPhotonSeries" + ], + "type": "string" } }, + "required": [ + "file_path", + "sampling_frequency" + ], "type": "object", "additionalProperties": false } diff --git a/stories/inputs/interface_schemas/VideoInterface.json b/stories/inputs/interface_schemas/VideoInterface.json index 259c53a3da..0b9e5e08fc 100644 --- a/stories/inputs/interface_schemas/VideoInterface.json +++ b/stories/inputs/interface_schemas/VideoInterface.json @@ -2,18 +2,26 @@ "required": [], "properties": { "VideoInterface": { - "required": [ - "file_paths" - ], "properties": { "file_paths": { + "items": { + "format": "file-path", + "type": "string" + }, "type": "array" }, "verbose": { - "type": "boolean", - "default": false + "default": false, + "type": "boolean" + }, + "metadata_key_name": { + "default": "Videos", + "type": "string" } }, + "required": [ + "file_paths" + ], "type": "object", "additionalProperties": false } diff --git a/stories/pages/storyStates.ts b/stories/pages/storyStates.ts index c2f62a301d..61ae6a28a3 100644 --- a/stories/pages/storyStates.ts +++ b/stories/pages/storyStates.ts @@ -59,7 +59,7 @@ export const globalState = { file_path: { type: "string", description: "Enter the path to the source data file.", - format: "file", + format: "file-path", }, }, required: ["file_path"],