diff --git a/guideGlobalMetadata.json b/guideGlobalMetadata.json index 024027209..90a03e799 100644 --- a/guideGlobalMetadata.json +++ b/guideGlobalMetadata.json @@ -30,6 +30,7 @@ "PlexonSortingInterface", "AxonaRecordingInterface", "NeuralynxRecordingInterface", - "AlphaOmegaRecordingInterface" + "AlphaOmegaRecordingInterface", + "DeepLabCutInterface" ] } diff --git a/schemas/json/generated/DeepLabCutInterface.json b/schemas/json/generated/DeepLabCutInterface.json new file mode 100644 index 000000000..29cbcd0bd --- /dev/null +++ b/schemas/json/generated/DeepLabCutInterface.json @@ -0,0 +1,38 @@ +{ + "required": [], + "properties": { + "DeepLabCutInterface": { + "required": [ + "file_path", + "config_file_path" + ], + "properties": { + "file_path": { + "format": "file", + "type": "string" + }, + "config_file_path": { + "format": "file", + "type": "string" + }, + "subject_name": { + "type": "string", + "default": "ind1" + }, + "verbose": { + "type": "boolean", + "default": true + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "source.schema.json", + "title": "Source data schema", + "description": "Schema for the source data, files and directories", + "version": "0.1.0" +} diff --git a/src/renderer/src/stories/JSONSchemaForm.js b/src/renderer/src/stories/JSONSchemaForm.js index 195d6cbfb..2a375271e 100644 --- a/src/renderer/src/stories/JSONSchemaForm.js +++ b/src/renderer/src/stories/JSONSchemaForm.js @@ -620,7 +620,6 @@ export class JSONSchemaForm extends LitElement { // For non-links, throw a basic requirement error if the property is required if (!errors.length && isRequired && !parent[name]) { const schema = this.getSchema(localPath); - console.log(schema); errors.push({ message: `${schema.title ?? header(name)} is a required property.`, type: "error", diff --git a/src/renderer/src/stories/pages/guided-mode/SourceData.stories.js b/src/renderer/src/stories/pages/guided-mode/SourceData.stories.js index 8c0a55781..7324b1b63 100644 --- a/src/renderer/src/stories/pages/guided-mode/SourceData.stories.js +++ b/src/renderer/src/stories/pages/guided-mode/SourceData.stories.js @@ -30,6 +30,7 @@ import PlexonSortingInterfaceSchema from "../../../../../../schemas/json/generat import AxonaRecordingInterfaceSchema from "../../../../../../schemas/json/generated/AxonaRecordingInterface.json"; import NeuralynxRecordingInterfaceSchema from "../../../../../../schemas/json/generated/NeuralynxRecordingInterface.json"; import AlphaOmegaRecordingInterfaceSchema from "../../../../../../schemas/json/generated/AlphaOmegaRecordingInterface.json"; +import DeepLabCutInterfaceSchema from "../../../../../../schemas/json/generated/DeepLabCutInterface.json"; export default { title: "Pages/Guided Mode/Source Data", @@ -71,7 +72,6 @@ globalStateCopy.schema.source_data.properties.Spike2RecordingInterface = Spike2RecordingInterfaceSchema.properties.Spike2RecordingInterface; globalStateCopy.schema.source_data.properties.BrukerTiffSinglePlaneImagingInterface = BrukerTiffSinglePlaneImagingInterfaceSchema.properties.BrukerTiffSinglePlaneImagingInterface; -sd; globalStateCopy.schema.source_data.properties.ExtractSegmentationInterface = ExtractSegmentationInterfaceSchema.properties.ExtractSegmentationInterface; globalStateCopy.schema.source_data.properties.CnmfeSegmentationInterface = @@ -104,6 +104,8 @@ globalStateCopy.schema.source_data.properties.NeuralynxRecordingInterface = NeuralynxRecordingInterfaceSchema.properties.NeuralynxRecordingInterface; globalStateCopy.schema.source_data.properties.AlphaOmegaRecordingInterface = AlphaOmegaRecordingInterfaceSchema.properties.AlphaOmegaRecordingInterface; +globalStateCopy.schema.source_data.properties.DeepLabCutInterface = + DeepLabCutInterfaceSchema.properties.DeepLabCutInterface; const results = globalStateCopy.results; for (let sub in results) { @@ -302,3 +304,9 @@ const AlphaOmegaRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalS AlphaOmegaRecordingInterfaceGlobalCopy.interfaces.interface = AlphaOmegaRecordingInterface; AlphaOmegaRecordingInterfaceGlobalCopy.schema.source_data = AlphaOmegaRecordingInterfaceSchema; AlphaOmegaRecordingInterface.args = { activePage, globalState: AlphaOmegaRecordingInterfaceGlobalCopy }; + +export const DeepLabCutInterface = PageTemplate.bind({}); +const DeepLabCutInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +DeepLabCutInterfaceGlobalCopy.interfaces.interface = DeepLabCutInterface; +DeepLabCutInterfaceGlobalCopy.schema.source_data = DeepLabCutInterfaceSchema; +DeepLabCutInterface.args = { activePage, globalState: DeepLabCutInterfaceGlobalCopy };