From 80e0ff14f15649e6336a6806117a1b734524fb78 Mon Sep 17 00:00:00 2001 From: Garrett Date: Thu, 28 Sep 2023 13:22:31 -0700 Subject: [PATCH 1/3] Add interface --- guideGlobalMetadata.json | 3 +- .../generated/BiocamRecordingInterface.json | 2 +- .../BlackrockRecordingInterface.json | 2 +- .../generated/BlackrockSortingInterface.json | 2 +- ...BrukerTiffSinglePlaneImagingInterface.json | 2 +- .../CellExplorerSortingInterface.json | 2 +- .../generated/IntanRecordingInterface.json | 2 +- .../generated/KiloSortSortingInterface.json | 2 +- .../MicroManagerTiffImagingInterface.json | 30 +++ .../generated/NeuroScopeLFPInterface.json | 2 +- .../NeuroScopeRecordingInterface.json | 2 +- .../generated/NeuroScopeSortingInterface.json | 2 +- .../OpenEphysRecordingInterface.json | 2 +- .../json/generated/PhySortingInterface.json | 2 +- .../generated/Spike2RecordingInterface.json | 2 +- .../json/generated/SpikeGLXNIDQInterface.json | 2 +- .../generated/SpikeGLXRecordingInterface.json | 2 +- .../pages/guided-mode/SourceData.stories.js | 198 +++++++++--------- 18 files changed, 142 insertions(+), 119 deletions(-) create mode 100644 schemas/json/generated/MicroManagerTiffImagingInterface.json diff --git a/guideGlobalMetadata.json b/guideGlobalMetadata.json index 1b4fabc8d..355ce488f 100644 --- a/guideGlobalMetadata.json +++ b/guideGlobalMetadata.json @@ -14,6 +14,7 @@ "CellExplorerSortingInterface", "KiloSortSortingInterface", "Spike2RecordingInterface", - "BrukerTiffSinglePlaneImagingInterface" + "BrukerTiffSinglePlaneImagingInterface", + "MicroManagerTiffImagingInterface" ] } diff --git a/schemas/json/generated/BiocamRecordingInterface.json b/schemas/json/generated/BiocamRecordingInterface.json index 8d51c7b06..3265fe263 100644 --- a/schemas/json/generated/BiocamRecordingInterface.json +++ b/schemas/json/generated/BiocamRecordingInterface.json @@ -30,4 +30,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/BlackrockRecordingInterface.json b/schemas/json/generated/BlackrockRecordingInterface.json index 25190ebf2..32de2a224 100644 --- a/schemas/json/generated/BlackrockRecordingInterface.json +++ b/schemas/json/generated/BlackrockRecordingInterface.json @@ -35,4 +35,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/BlackrockSortingInterface.json b/schemas/json/generated/BlackrockSortingInterface.json index 02661e794..1b0b34068 100644 --- a/schemas/json/generated/BlackrockSortingInterface.json +++ b/schemas/json/generated/BlackrockSortingInterface.json @@ -30,4 +30,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json b/schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json index 844834ff9..50cea61c2 100644 --- a/schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json +++ b/schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json @@ -30,4 +30,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/CellExplorerSortingInterface.json b/schemas/json/generated/CellExplorerSortingInterface.json index c51a65d4e..e2cc689b1 100644 --- a/schemas/json/generated/CellExplorerSortingInterface.json +++ b/schemas/json/generated/CellExplorerSortingInterface.json @@ -26,4 +26,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/IntanRecordingInterface.json b/schemas/json/generated/IntanRecordingInterface.json index 07904ada2..b75b39eda 100644 --- a/schemas/json/generated/IntanRecordingInterface.json +++ b/schemas/json/generated/IntanRecordingInterface.json @@ -34,4 +34,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/KiloSortSortingInterface.json b/schemas/json/generated/KiloSortSortingInterface.json index a31d22b75..5ef66d490 100644 --- a/schemas/json/generated/KiloSortSortingInterface.json +++ b/schemas/json/generated/KiloSortSortingInterface.json @@ -30,4 +30,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/MicroManagerTiffImagingInterface.json b/schemas/json/generated/MicroManagerTiffImagingInterface.json new file mode 100644 index 000000000..218c8c281 --- /dev/null +++ b/schemas/json/generated/MicroManagerTiffImagingInterface.json @@ -0,0 +1,30 @@ +{ + "required": [], + "properties": { + "MicroManagerTiffImagingInterface": { + "required": [ + "folder_path" + ], + "properties": { + "folder_path": { + "format": "directory", + "type": "string", + "description": "The path that points to the folder containing the OME-TIF image files." + }, + "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" +} \ No newline at end of file diff --git a/schemas/json/generated/NeuroScopeLFPInterface.json b/schemas/json/generated/NeuroScopeLFPInterface.json index d42a885ab..3c6224cf0 100644 --- a/schemas/json/generated/NeuroScopeLFPInterface.json +++ b/schemas/json/generated/NeuroScopeLFPInterface.json @@ -29,4 +29,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/NeuroScopeRecordingInterface.json b/schemas/json/generated/NeuroScopeRecordingInterface.json index 3e95a33d0..2077b287a 100644 --- a/schemas/json/generated/NeuroScopeRecordingInterface.json +++ b/schemas/json/generated/NeuroScopeRecordingInterface.json @@ -37,4 +37,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/NeuroScopeSortingInterface.json b/schemas/json/generated/NeuroScopeSortingInterface.json index 680fcbce9..fe3d76fe6 100644 --- a/schemas/json/generated/NeuroScopeSortingInterface.json +++ b/schemas/json/generated/NeuroScopeSortingInterface.json @@ -37,4 +37,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/OpenEphysRecordingInterface.json b/schemas/json/generated/OpenEphysRecordingInterface.json index f6193ea0c..f3affa4d3 100644 --- a/schemas/json/generated/OpenEphysRecordingInterface.json +++ b/schemas/json/generated/OpenEphysRecordingInterface.json @@ -33,4 +33,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/PhySortingInterface.json b/schemas/json/generated/PhySortingInterface.json index edcc2183d..182494ca2 100644 --- a/schemas/json/generated/PhySortingInterface.json +++ b/schemas/json/generated/PhySortingInterface.json @@ -29,4 +29,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/Spike2RecordingInterface.json b/schemas/json/generated/Spike2RecordingInterface.json index 81c785ad8..3b143bf75 100644 --- a/schemas/json/generated/Spike2RecordingInterface.json +++ b/schemas/json/generated/Spike2RecordingInterface.json @@ -31,4 +31,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/SpikeGLXNIDQInterface.json b/schemas/json/generated/SpikeGLXNIDQInterface.json index 14ad82eb8..8a38f1387 100644 --- a/schemas/json/generated/SpikeGLXNIDQInterface.json +++ b/schemas/json/generated/SpikeGLXNIDQInterface.json @@ -35,4 +35,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file diff --git a/schemas/json/generated/SpikeGLXRecordingInterface.json b/schemas/json/generated/SpikeGLXRecordingInterface.json index 4b2034df8..603158605 100644 --- a/schemas/json/generated/SpikeGLXRecordingInterface.json +++ b/schemas/json/generated/SpikeGLXRecordingInterface.json @@ -30,4 +30,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} +} \ No newline at end of file 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 59b3acc74..ce4d3f10a 100644 --- a/src/renderer/src/stories/pages/guided-mode/SourceData.stories.js +++ b/src/renderer/src/stories/pages/guided-mode/SourceData.stories.js @@ -1,159 +1,151 @@ import { globalState, PageTemplate } from "./storyStates"; -import SpikeGLXRecordingInterfaceSchema from "../../../../../../schemas/json/generated/SpikeGLXRecordingInterface.json"; -import SpikeGLXNIDQInterfaceSchema from "../../../../../../schemas/json/generated/SpikeGLXNIDQInterface.json"; -import PhySortingInterfaceSchema from "../../../../../../schemas/json/generated/PhySortingInterface.json"; -import NeuroScopeRecordingInterfaceSchema from "../../../../../../schemas/json/generated/NeuroScopeRecordingInterface.json"; -import NeuroScopeLFPInterfaceSchema from "../../../../../../schemas/json/generated/NeuroScopeLFPInterface.json"; -import NeuroScopeSortingInterfaceSchema from "../../../../../../schemas/json/generated/NeuroScopeSortingInterface.json"; -import BiocamRecordingInterfaceSchema from "../../../../../../schemas/json/generated/BiocamRecordingInterface.json"; -import IntanRecordingInterfaceSchema from "../../../../../../schemas/json/generated/IntanRecordingInterface.json"; -import OpenEphysRecordingInterfaceSchema from "../../../../../../schemas/json/generated/OpenEphysRecordingInterface.json"; -import BlackrockRecordingInterfaceSchema from "../../../../../../schemas/json/generated/BlackrockRecordingInterface.json"; -import BlackrockSortingInterfaceSchema from "../../../../../../schemas/json/generated/BlackrockSortingInterface.json"; -import CellExplorerSortingInterfaceSchema from "../../../../../../schemas/json/generated/CellExplorerSortingInterface.json"; -import KiloSortSortingInterfaceSchema from "../../../../../../schemas/json/generated/KiloSortSortingInterface.json"; -import Spike2RecordingInterfaceSchema from "../../../../../../schemas/json/generated/Spike2RecordingInterface.json"; -import BrukerTiffSinglePlaneImagingInterfaceSchema from "../../../../../../schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json"; +import SpikeGLXRecordingInterfaceSchema from '../../../../../../schemas/json/generated/SpikeGLXRecordingInterface.json' +import SpikeGLXNIDQInterfaceSchema from '../../../../../../schemas/json/generated/SpikeGLXNIDQInterface.json' +import PhySortingInterfaceSchema from '../../../../../../schemas/json/generated/PhySortingInterface.json' +import NeuroScopeRecordingInterfaceSchema from '../../../../../../schemas/json/generated/NeuroScopeRecordingInterface.json' +import NeuroScopeLFPInterfaceSchema from '../../../../../../schemas/json/generated/NeuroScopeLFPInterface.json' +import NeuroScopeSortingInterfaceSchema from '../../../../../../schemas/json/generated/NeuroScopeSortingInterface.json' +import BiocamRecordingInterfaceSchema from '../../../../../../schemas/json/generated/BiocamRecordingInterface.json' +import IntanRecordingInterfaceSchema from '../../../../../../schemas/json/generated/IntanRecordingInterface.json' +import OpenEphysRecordingInterfaceSchema from '../../../../../../schemas/json/generated/OpenEphysRecordingInterface.json' +import BlackrockRecordingInterfaceSchema from '../../../../../../schemas/json/generated/BlackrockRecordingInterface.json' +import BlackrockSortingInterfaceSchema from '../../../../../../schemas/json/generated/BlackrockSortingInterface.json' +import CellExplorerSortingInterfaceSchema from '../../../../../../schemas/json/generated/CellExplorerSortingInterface.json' +import KiloSortSortingInterfaceSchema from '../../../../../../schemas/json/generated/KiloSortSortingInterface.json' +import Spike2RecordingInterfaceSchema from '../../../../../../schemas/json/generated/Spike2RecordingInterface.json' +import BrukerTiffSinglePlaneImagingInterfaceSchema from '../../../../../../schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json' +import MicroManagerTiffImagingInterfaceSchema from '../../../../../../schemas/json/generated/MicroManagerTiffImagingInterface.json' export default { title: "Pages/Guided Mode/Source Data", parameters: { chromatic: { disableSnapshot: false }, - }, + } }; -const activePage = "conversion/sourcedata"; - -const globalStateCopy = JSON.parse(JSON.stringify(globalState)); -globalStateCopy.schema.source_data.properties.SpikeGLXRecordingInterface = - SpikeGLXRecordingInterfaceSchema.properties.SpikeGLXRecordingInterface; -globalStateCopy.schema.source_data.properties.SpikeGLXNIDQInterface = - SpikeGLXNIDQInterfaceSchema.properties.SpikeGLXNIDQInterface; -globalStateCopy.schema.source_data.properties.PhySortingInterface = - PhySortingInterfaceSchema.properties.PhySortingInterface; -globalStateCopy.schema.source_data.properties.NeuroScopeRecordingInterface = - NeuroScopeRecordingInterfaceSchema.properties.NeuroScopeRecordingInterface; -globalStateCopy.schema.source_data.properties.NeuroScopeLFPInterface = - NeuroScopeLFPInterfaceSchema.properties.NeuroScopeLFPInterface; -globalStateCopy.schema.source_data.properties.NeuroScopeSortingInterface = - NeuroScopeSortingInterfaceSchema.properties.NeuroScopeSortingInterface; -globalStateCopy.schema.source_data.properties.BiocamRecordingInterface = - BiocamRecordingInterfaceSchema.properties.BiocamRecordingInterface; -globalStateCopy.schema.source_data.properties.IntanRecordingInterface = - IntanRecordingInterfaceSchema.properties.IntanRecordingInterface; -globalStateCopy.schema.source_data.properties.OpenEphysRecordingInterface = - OpenEphysRecordingInterfaceSchema.properties.OpenEphysRecordingInterface; -globalStateCopy.schema.source_data.properties.BlackrockRecordingInterface = - BlackrockRecordingInterfaceSchema.properties.BlackrockRecordingInterface; -globalStateCopy.schema.source_data.properties.BlackrockSortingInterface = - BlackrockSortingInterfaceSchema.properties.BlackrockSortingInterface; -globalStateCopy.schema.source_data.properties.CellExplorerSortingInterface = - CellExplorerSortingInterfaceSchema.properties.CellExplorerSortingInterface; -globalStateCopy.schema.source_data.properties.KiloSortSortingInterface = - KiloSortSortingInterfaceSchema.properties.KiloSortSortingInterface; -globalStateCopy.schema.source_data.properties.Spike2RecordingInterface = - Spike2RecordingInterfaceSchema.properties.Spike2RecordingInterface; -globalStateCopy.schema.source_data.properties.BrukerTiffSinglePlaneImagingInterface = - BrukerTiffSinglePlaneImagingInterfaceSchema.properties.BrukerTiffSinglePlaneImagingInterface; - -const results = globalStateCopy.results; -for (let sub in results) { - for (let ses in results[sub]) - results[sub][ses].source_data = { SpikeGLXNIDQInterface: { file_path: "/dummy/file/path" } }; +const activePage = "conversion/sourcedata" + + +const globalStateCopy = JSON.parse(JSON.stringify(globalState)) +globalStateCopy.schema.source_data.properties.SpikeGLXRecordingInterface = SpikeGLXRecordingInterfaceSchema.properties.SpikeGLXRecordingInterface +globalStateCopy.schema.source_data.properties.SpikeGLXNIDQInterface = SpikeGLXNIDQInterfaceSchema.properties.SpikeGLXNIDQInterface +globalStateCopy.schema.source_data.properties.PhySortingInterface = PhySortingInterfaceSchema.properties.PhySortingInterface +globalStateCopy.schema.source_data.properties.NeuroScopeRecordingInterface = NeuroScopeRecordingInterfaceSchema.properties.NeuroScopeRecordingInterface +globalStateCopy.schema.source_data.properties.NeuroScopeLFPInterface = NeuroScopeLFPInterfaceSchema.properties.NeuroScopeLFPInterface +globalStateCopy.schema.source_data.properties.NeuroScopeSortingInterface = NeuroScopeSortingInterfaceSchema.properties.NeuroScopeSortingInterface +globalStateCopy.schema.source_data.properties.BiocamRecordingInterface = BiocamRecordingInterfaceSchema.properties.BiocamRecordingInterface +globalStateCopy.schema.source_data.properties.IntanRecordingInterface = IntanRecordingInterfaceSchema.properties.IntanRecordingInterface +globalStateCopy.schema.source_data.properties.OpenEphysRecordingInterface = OpenEphysRecordingInterfaceSchema.properties.OpenEphysRecordingInterface +globalStateCopy.schema.source_data.properties.BlackrockRecordingInterface = BlackrockRecordingInterfaceSchema.properties.BlackrockRecordingInterface +globalStateCopy.schema.source_data.properties.BlackrockSortingInterface = BlackrockSortingInterfaceSchema.properties.BlackrockSortingInterface +globalStateCopy.schema.source_data.properties.CellExplorerSortingInterface = CellExplorerSortingInterfaceSchema.properties.CellExplorerSortingInterface +globalStateCopy.schema.source_data.properties.KiloSortSortingInterface = KiloSortSortingInterfaceSchema.properties.KiloSortSortingInterface +globalStateCopy.schema.source_data.properties.Spike2RecordingInterface = Spike2RecordingInterfaceSchema.properties.Spike2RecordingInterface +globalStateCopy.schema.source_data.properties.BrukerTiffSinglePlaneImagingInterface = BrukerTiffSinglePlaneImagingInterfaceSchema.properties.BrukerTiffSinglePlaneImagingInterface +globalStateCopy.schema.source_data.properties.MicroManagerTiffImagingInterface = MicroManagerTiffImagingInterfaceSchema.properties.MicroManagerTiffImagingInterface + +const results = globalStateCopy.results +for (let sub in results){ + for (let ses in results[sub]) results[sub][ses].source_data = {SpikeGLXNIDQInterface: {file_path: '/dummy/file/path'}} } + export const All = PageTemplate.bind({}); All.args = { activePage, globalState: globalStateCopy }; export const SpikeGLXRecordingInterface = PageTemplate.bind({}); -const SpikeGLXRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -SpikeGLXRecordingInterfaceGlobalCopy.interfaces.interface = SpikeGLXRecordingInterface; -SpikeGLXRecordingInterfaceGlobalCopy.schema.source_data = SpikeGLXRecordingInterfaceSchema; +const SpikeGLXRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +SpikeGLXRecordingInterfaceGlobalCopy.interfaces.interface = SpikeGLXRecordingInterface +SpikeGLXRecordingInterfaceGlobalCopy.schema.source_data = SpikeGLXRecordingInterfaceSchema SpikeGLXRecordingInterface.args = { activePage, globalState: SpikeGLXRecordingInterfaceGlobalCopy }; export const SpikeGLXNIDQInterface = PageTemplate.bind({}); -const SpikeGLXNIDQInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -SpikeGLXNIDQInterfaceGlobalCopy.interfaces.interface = SpikeGLXNIDQInterface; -SpikeGLXNIDQInterfaceGlobalCopy.schema.source_data = SpikeGLXNIDQInterfaceSchema; +const SpikeGLXNIDQInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +SpikeGLXNIDQInterfaceGlobalCopy.interfaces.interface = SpikeGLXNIDQInterface +SpikeGLXNIDQInterfaceGlobalCopy.schema.source_data = SpikeGLXNIDQInterfaceSchema SpikeGLXNIDQInterface.args = { activePage, globalState: SpikeGLXNIDQInterfaceGlobalCopy }; export const PhySortingInterface = PageTemplate.bind({}); -const PhySortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -PhySortingInterfaceGlobalCopy.interfaces.interface = PhySortingInterface; -PhySortingInterfaceGlobalCopy.schema.source_data = PhySortingInterfaceSchema; +const PhySortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +PhySortingInterfaceGlobalCopy.interfaces.interface = PhySortingInterface +PhySortingInterfaceGlobalCopy.schema.source_data = PhySortingInterfaceSchema PhySortingInterface.args = { activePage, globalState: PhySortingInterfaceGlobalCopy }; export const NeuroScopeRecordingInterface = PageTemplate.bind({}); -const NeuroScopeRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -NeuroScopeRecordingInterfaceGlobalCopy.interfaces.interface = NeuroScopeRecordingInterface; -NeuroScopeRecordingInterfaceGlobalCopy.schema.source_data = NeuroScopeRecordingInterfaceSchema; +const NeuroScopeRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +NeuroScopeRecordingInterfaceGlobalCopy.interfaces.interface = NeuroScopeRecordingInterface +NeuroScopeRecordingInterfaceGlobalCopy.schema.source_data = NeuroScopeRecordingInterfaceSchema NeuroScopeRecordingInterface.args = { activePage, globalState: NeuroScopeRecordingInterfaceGlobalCopy }; export const NeuroScopeLFPInterface = PageTemplate.bind({}); -const NeuroScopeLFPInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -NeuroScopeLFPInterfaceGlobalCopy.interfaces.interface = NeuroScopeLFPInterface; -NeuroScopeLFPInterfaceGlobalCopy.schema.source_data = NeuroScopeLFPInterfaceSchema; +const NeuroScopeLFPInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +NeuroScopeLFPInterfaceGlobalCopy.interfaces.interface = NeuroScopeLFPInterface +NeuroScopeLFPInterfaceGlobalCopy.schema.source_data = NeuroScopeLFPInterfaceSchema NeuroScopeLFPInterface.args = { activePage, globalState: NeuroScopeLFPInterfaceGlobalCopy }; export const NeuroScopeSortingInterface = PageTemplate.bind({}); -const NeuroScopeSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -NeuroScopeSortingInterfaceGlobalCopy.interfaces.interface = NeuroScopeSortingInterface; -NeuroScopeSortingInterfaceGlobalCopy.schema.source_data = NeuroScopeSortingInterfaceSchema; +const NeuroScopeSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +NeuroScopeSortingInterfaceGlobalCopy.interfaces.interface = NeuroScopeSortingInterface +NeuroScopeSortingInterfaceGlobalCopy.schema.source_data = NeuroScopeSortingInterfaceSchema NeuroScopeSortingInterface.args = { activePage, globalState: NeuroScopeSortingInterfaceGlobalCopy }; export const BiocamRecordingInterface = PageTemplate.bind({}); -const BiocamRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -BiocamRecordingInterfaceGlobalCopy.interfaces.interface = BiocamRecordingInterface; -BiocamRecordingInterfaceGlobalCopy.schema.source_data = BiocamRecordingInterfaceSchema; +const BiocamRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +BiocamRecordingInterfaceGlobalCopy.interfaces.interface = BiocamRecordingInterface +BiocamRecordingInterfaceGlobalCopy.schema.source_data = BiocamRecordingInterfaceSchema BiocamRecordingInterface.args = { activePage, globalState: BiocamRecordingInterfaceGlobalCopy }; export const IntanRecordingInterface = PageTemplate.bind({}); -const IntanRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -IntanRecordingInterfaceGlobalCopy.interfaces.interface = IntanRecordingInterface; -IntanRecordingInterfaceGlobalCopy.schema.source_data = IntanRecordingInterfaceSchema; +const IntanRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +IntanRecordingInterfaceGlobalCopy.interfaces.interface = IntanRecordingInterface +IntanRecordingInterfaceGlobalCopy.schema.source_data = IntanRecordingInterfaceSchema IntanRecordingInterface.args = { activePage, globalState: IntanRecordingInterfaceGlobalCopy }; export const OpenEphysRecordingInterface = PageTemplate.bind({}); -const OpenEphysRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -OpenEphysRecordingInterfaceGlobalCopy.interfaces.interface = OpenEphysRecordingInterface; -OpenEphysRecordingInterfaceGlobalCopy.schema.source_data = OpenEphysRecordingInterfaceSchema; +const OpenEphysRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +OpenEphysRecordingInterfaceGlobalCopy.interfaces.interface = OpenEphysRecordingInterface +OpenEphysRecordingInterfaceGlobalCopy.schema.source_data = OpenEphysRecordingInterfaceSchema OpenEphysRecordingInterface.args = { activePage, globalState: OpenEphysRecordingInterfaceGlobalCopy }; export const BlackrockRecordingInterface = PageTemplate.bind({}); -const BlackrockRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -BlackrockRecordingInterfaceGlobalCopy.interfaces.interface = BlackrockRecordingInterface; -BlackrockRecordingInterfaceGlobalCopy.schema.source_data = BlackrockRecordingInterfaceSchema; +const BlackrockRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +BlackrockRecordingInterfaceGlobalCopy.interfaces.interface = BlackrockRecordingInterface +BlackrockRecordingInterfaceGlobalCopy.schema.source_data = BlackrockRecordingInterfaceSchema BlackrockRecordingInterface.args = { activePage, globalState: BlackrockRecordingInterfaceGlobalCopy }; export const BlackrockSortingInterface = PageTemplate.bind({}); -const BlackrockSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -BlackrockSortingInterfaceGlobalCopy.interfaces.interface = BlackrockSortingInterface; -BlackrockSortingInterfaceGlobalCopy.schema.source_data = BlackrockSortingInterfaceSchema; +const BlackrockSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +BlackrockSortingInterfaceGlobalCopy.interfaces.interface = BlackrockSortingInterface +BlackrockSortingInterfaceGlobalCopy.schema.source_data = BlackrockSortingInterfaceSchema BlackrockSortingInterface.args = { activePage, globalState: BlackrockSortingInterfaceGlobalCopy }; export const CellExplorerSortingInterface = PageTemplate.bind({}); -const CellExplorerSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -CellExplorerSortingInterfaceGlobalCopy.interfaces.interface = CellExplorerSortingInterface; -CellExplorerSortingInterfaceGlobalCopy.schema.source_data = CellExplorerSortingInterfaceSchema; +const CellExplorerSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +CellExplorerSortingInterfaceGlobalCopy.interfaces.interface = CellExplorerSortingInterface +CellExplorerSortingInterfaceGlobalCopy.schema.source_data = CellExplorerSortingInterfaceSchema CellExplorerSortingInterface.args = { activePage, globalState: CellExplorerSortingInterfaceGlobalCopy }; export const KiloSortSortingInterface = PageTemplate.bind({}); -const KiloSortSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -KiloSortSortingInterfaceGlobalCopy.interfaces.interface = KiloSortSortingInterface; -KiloSortSortingInterfaceGlobalCopy.schema.source_data = KiloSortSortingInterfaceSchema; +const KiloSortSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +KiloSortSortingInterfaceGlobalCopy.interfaces.interface = KiloSortSortingInterface +KiloSortSortingInterfaceGlobalCopy.schema.source_data = KiloSortSortingInterfaceSchema KiloSortSortingInterface.args = { activePage, globalState: KiloSortSortingInterfaceGlobalCopy }; export const Spike2RecordingInterface = PageTemplate.bind({}); -const Spike2RecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -Spike2RecordingInterfaceGlobalCopy.interfaces.interface = Spike2RecordingInterface; -Spike2RecordingInterfaceGlobalCopy.schema.source_data = Spike2RecordingInterfaceSchema; +const Spike2RecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +Spike2RecordingInterfaceGlobalCopy.interfaces.interface = Spike2RecordingInterface +Spike2RecordingInterfaceGlobalCopy.schema.source_data = Spike2RecordingInterfaceSchema Spike2RecordingInterface.args = { activePage, globalState: Spike2RecordingInterfaceGlobalCopy }; export const BrukerTiffSinglePlaneImagingInterface = PageTemplate.bind({}); -const BrukerTiffSinglePlaneImagingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); -BrukerTiffSinglePlaneImagingInterfaceGlobalCopy.interfaces.interface = BrukerTiffSinglePlaneImagingInterface; -BrukerTiffSinglePlaneImagingInterfaceGlobalCopy.schema.source_data = BrukerTiffSinglePlaneImagingInterfaceSchema; -BrukerTiffSinglePlaneImagingInterface.args = { - activePage, - globalState: BrukerTiffSinglePlaneImagingInterfaceGlobalCopy, -}; +const BrukerTiffSinglePlaneImagingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +BrukerTiffSinglePlaneImagingInterfaceGlobalCopy.interfaces.interface = BrukerTiffSinglePlaneImagingInterface +BrukerTiffSinglePlaneImagingInterfaceGlobalCopy.schema.source_data = BrukerTiffSinglePlaneImagingInterfaceSchema +BrukerTiffSinglePlaneImagingInterface.args = { activePage, globalState: BrukerTiffSinglePlaneImagingInterfaceGlobalCopy }; + +export const MicroManagerTiffImagingInterface = PageTemplate.bind({}); +const MicroManagerTiffImagingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) +MicroManagerTiffImagingInterfaceGlobalCopy.interfaces.interface = MicroManagerTiffImagingInterface +MicroManagerTiffImagingInterfaceGlobalCopy.schema.source_data = MicroManagerTiffImagingInterfaceSchema +MicroManagerTiffImagingInterface.args = { activePage, globalState: MicroManagerTiffImagingInterfaceGlobalCopy }; + From c44547c05c6f10773e4fee21248d466d23e229f2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 20:25:58 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../generated/BiocamRecordingInterface.json | 2 +- .../BlackrockRecordingInterface.json | 2 +- .../generated/BlackrockSortingInterface.json | 2 +- ...BrukerTiffSinglePlaneImagingInterface.json | 2 +- .../CellExplorerSortingInterface.json | 2 +- .../generated/IntanRecordingInterface.json | 2 +- .../generated/KiloSortSortingInterface.json | 2 +- .../MicroManagerTiffImagingInterface.json | 2 +- .../generated/NeuroScopeLFPInterface.json | 2 +- .../NeuroScopeRecordingInterface.json | 2 +- .../generated/NeuroScopeSortingInterface.json | 2 +- .../OpenEphysRecordingInterface.json | 2 +- .../json/generated/PhySortingInterface.json | 2 +- .../generated/Spike2RecordingInterface.json | 2 +- .../json/generated/SpikeGLXNIDQInterface.json | 2 +- .../generated/SpikeGLXRecordingInterface.json | 2 +- src/main/main.ts | 2 +- .../pages/guided-mode/SourceData.stories.js | 201 ++++++++++-------- 18 files changed, 126 insertions(+), 109 deletions(-) diff --git a/schemas/json/generated/BiocamRecordingInterface.json b/schemas/json/generated/BiocamRecordingInterface.json index 3265fe263..8d51c7b06 100644 --- a/schemas/json/generated/BiocamRecordingInterface.json +++ b/schemas/json/generated/BiocamRecordingInterface.json @@ -30,4 +30,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/BlackrockRecordingInterface.json b/schemas/json/generated/BlackrockRecordingInterface.json index 32de2a224..25190ebf2 100644 --- a/schemas/json/generated/BlackrockRecordingInterface.json +++ b/schemas/json/generated/BlackrockRecordingInterface.json @@ -35,4 +35,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/BlackrockSortingInterface.json b/schemas/json/generated/BlackrockSortingInterface.json index 1b0b34068..02661e794 100644 --- a/schemas/json/generated/BlackrockSortingInterface.json +++ b/schemas/json/generated/BlackrockSortingInterface.json @@ -30,4 +30,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json b/schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json index 50cea61c2..844834ff9 100644 --- a/schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json +++ b/schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json @@ -30,4 +30,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/CellExplorerSortingInterface.json b/schemas/json/generated/CellExplorerSortingInterface.json index e2cc689b1..c51a65d4e 100644 --- a/schemas/json/generated/CellExplorerSortingInterface.json +++ b/schemas/json/generated/CellExplorerSortingInterface.json @@ -26,4 +26,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/IntanRecordingInterface.json b/schemas/json/generated/IntanRecordingInterface.json index b75b39eda..07904ada2 100644 --- a/schemas/json/generated/IntanRecordingInterface.json +++ b/schemas/json/generated/IntanRecordingInterface.json @@ -34,4 +34,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/KiloSortSortingInterface.json b/schemas/json/generated/KiloSortSortingInterface.json index 5ef66d490..a31d22b75 100644 --- a/schemas/json/generated/KiloSortSortingInterface.json +++ b/schemas/json/generated/KiloSortSortingInterface.json @@ -30,4 +30,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/MicroManagerTiffImagingInterface.json b/schemas/json/generated/MicroManagerTiffImagingInterface.json index 218c8c281..fb0cd8876 100644 --- a/schemas/json/generated/MicroManagerTiffImagingInterface.json +++ b/schemas/json/generated/MicroManagerTiffImagingInterface.json @@ -27,4 +27,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/NeuroScopeLFPInterface.json b/schemas/json/generated/NeuroScopeLFPInterface.json index 3c6224cf0..d42a885ab 100644 --- a/schemas/json/generated/NeuroScopeLFPInterface.json +++ b/schemas/json/generated/NeuroScopeLFPInterface.json @@ -29,4 +29,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/NeuroScopeRecordingInterface.json b/schemas/json/generated/NeuroScopeRecordingInterface.json index 2077b287a..3e95a33d0 100644 --- a/schemas/json/generated/NeuroScopeRecordingInterface.json +++ b/schemas/json/generated/NeuroScopeRecordingInterface.json @@ -37,4 +37,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/NeuroScopeSortingInterface.json b/schemas/json/generated/NeuroScopeSortingInterface.json index fe3d76fe6..680fcbce9 100644 --- a/schemas/json/generated/NeuroScopeSortingInterface.json +++ b/schemas/json/generated/NeuroScopeSortingInterface.json @@ -37,4 +37,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/OpenEphysRecordingInterface.json b/schemas/json/generated/OpenEphysRecordingInterface.json index f3affa4d3..f6193ea0c 100644 --- a/schemas/json/generated/OpenEphysRecordingInterface.json +++ b/schemas/json/generated/OpenEphysRecordingInterface.json @@ -33,4 +33,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/PhySortingInterface.json b/schemas/json/generated/PhySortingInterface.json index 182494ca2..edcc2183d 100644 --- a/schemas/json/generated/PhySortingInterface.json +++ b/schemas/json/generated/PhySortingInterface.json @@ -29,4 +29,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/Spike2RecordingInterface.json b/schemas/json/generated/Spike2RecordingInterface.json index 3b143bf75..81c785ad8 100644 --- a/schemas/json/generated/Spike2RecordingInterface.json +++ b/schemas/json/generated/Spike2RecordingInterface.json @@ -31,4 +31,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/SpikeGLXNIDQInterface.json b/schemas/json/generated/SpikeGLXNIDQInterface.json index 8a38f1387..14ad82eb8 100644 --- a/schemas/json/generated/SpikeGLXNIDQInterface.json +++ b/schemas/json/generated/SpikeGLXNIDQInterface.json @@ -35,4 +35,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/schemas/json/generated/SpikeGLXRecordingInterface.json b/schemas/json/generated/SpikeGLXRecordingInterface.json index 603158605..4b2034df8 100644 --- a/schemas/json/generated/SpikeGLXRecordingInterface.json +++ b/schemas/json/generated/SpikeGLXRecordingInterface.json @@ -30,4 +30,4 @@ "title": "Source data schema", "description": "Schema for the source data, files and directories", "version": "0.1.0" -} \ No newline at end of file +} diff --git a/src/main/main.ts b/src/main/main.ts index 0f78f25c1..f15f363fb 100755 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -184,7 +184,7 @@ const exitPyProc = async () => { const killAllPreviousProcesses = async () => { const fetch = globalThis.fetch - + if (fetch){ console.log("Killing all previous processes"); 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 ce4d3f10a..11a8f696c 100644 --- a/src/renderer/src/stories/pages/guided-mode/SourceData.stories.js +++ b/src/renderer/src/stories/pages/guided-mode/SourceData.stories.js @@ -1,151 +1,168 @@ import { globalState, PageTemplate } from "./storyStates"; -import SpikeGLXRecordingInterfaceSchema from '../../../../../../schemas/json/generated/SpikeGLXRecordingInterface.json' -import SpikeGLXNIDQInterfaceSchema from '../../../../../../schemas/json/generated/SpikeGLXNIDQInterface.json' -import PhySortingInterfaceSchema from '../../../../../../schemas/json/generated/PhySortingInterface.json' -import NeuroScopeRecordingInterfaceSchema from '../../../../../../schemas/json/generated/NeuroScopeRecordingInterface.json' -import NeuroScopeLFPInterfaceSchema from '../../../../../../schemas/json/generated/NeuroScopeLFPInterface.json' -import NeuroScopeSortingInterfaceSchema from '../../../../../../schemas/json/generated/NeuroScopeSortingInterface.json' -import BiocamRecordingInterfaceSchema from '../../../../../../schemas/json/generated/BiocamRecordingInterface.json' -import IntanRecordingInterfaceSchema from '../../../../../../schemas/json/generated/IntanRecordingInterface.json' -import OpenEphysRecordingInterfaceSchema from '../../../../../../schemas/json/generated/OpenEphysRecordingInterface.json' -import BlackrockRecordingInterfaceSchema from '../../../../../../schemas/json/generated/BlackrockRecordingInterface.json' -import BlackrockSortingInterfaceSchema from '../../../../../../schemas/json/generated/BlackrockSortingInterface.json' -import CellExplorerSortingInterfaceSchema from '../../../../../../schemas/json/generated/CellExplorerSortingInterface.json' -import KiloSortSortingInterfaceSchema from '../../../../../../schemas/json/generated/KiloSortSortingInterface.json' -import Spike2RecordingInterfaceSchema from '../../../../../../schemas/json/generated/Spike2RecordingInterface.json' -import BrukerTiffSinglePlaneImagingInterfaceSchema from '../../../../../../schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json' -import MicroManagerTiffImagingInterfaceSchema from '../../../../../../schemas/json/generated/MicroManagerTiffImagingInterface.json' +import SpikeGLXRecordingInterfaceSchema from "../../../../../../schemas/json/generated/SpikeGLXRecordingInterface.json"; +import SpikeGLXNIDQInterfaceSchema from "../../../../../../schemas/json/generated/SpikeGLXNIDQInterface.json"; +import PhySortingInterfaceSchema from "../../../../../../schemas/json/generated/PhySortingInterface.json"; +import NeuroScopeRecordingInterfaceSchema from "../../../../../../schemas/json/generated/NeuroScopeRecordingInterface.json"; +import NeuroScopeLFPInterfaceSchema from "../../../../../../schemas/json/generated/NeuroScopeLFPInterface.json"; +import NeuroScopeSortingInterfaceSchema from "../../../../../../schemas/json/generated/NeuroScopeSortingInterface.json"; +import BiocamRecordingInterfaceSchema from "../../../../../../schemas/json/generated/BiocamRecordingInterface.json"; +import IntanRecordingInterfaceSchema from "../../../../../../schemas/json/generated/IntanRecordingInterface.json"; +import OpenEphysRecordingInterfaceSchema from "../../../../../../schemas/json/generated/OpenEphysRecordingInterface.json"; +import BlackrockRecordingInterfaceSchema from "../../../../../../schemas/json/generated/BlackrockRecordingInterface.json"; +import BlackrockSortingInterfaceSchema from "../../../../../../schemas/json/generated/BlackrockSortingInterface.json"; +import CellExplorerSortingInterfaceSchema from "../../../../../../schemas/json/generated/CellExplorerSortingInterface.json"; +import KiloSortSortingInterfaceSchema from "../../../../../../schemas/json/generated/KiloSortSortingInterface.json"; +import Spike2RecordingInterfaceSchema from "../../../../../../schemas/json/generated/Spike2RecordingInterface.json"; +import BrukerTiffSinglePlaneImagingInterfaceSchema from "../../../../../../schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json"; +import MicroManagerTiffImagingInterfaceSchema from "../../../../../../schemas/json/generated/MicroManagerTiffImagingInterface.json"; export default { title: "Pages/Guided Mode/Source Data", parameters: { chromatic: { disableSnapshot: false }, - } + }, }; -const activePage = "conversion/sourcedata" - - -const globalStateCopy = JSON.parse(JSON.stringify(globalState)) -globalStateCopy.schema.source_data.properties.SpikeGLXRecordingInterface = SpikeGLXRecordingInterfaceSchema.properties.SpikeGLXRecordingInterface -globalStateCopy.schema.source_data.properties.SpikeGLXNIDQInterface = SpikeGLXNIDQInterfaceSchema.properties.SpikeGLXNIDQInterface -globalStateCopy.schema.source_data.properties.PhySortingInterface = PhySortingInterfaceSchema.properties.PhySortingInterface -globalStateCopy.schema.source_data.properties.NeuroScopeRecordingInterface = NeuroScopeRecordingInterfaceSchema.properties.NeuroScopeRecordingInterface -globalStateCopy.schema.source_data.properties.NeuroScopeLFPInterface = NeuroScopeLFPInterfaceSchema.properties.NeuroScopeLFPInterface -globalStateCopy.schema.source_data.properties.NeuroScopeSortingInterface = NeuroScopeSortingInterfaceSchema.properties.NeuroScopeSortingInterface -globalStateCopy.schema.source_data.properties.BiocamRecordingInterface = BiocamRecordingInterfaceSchema.properties.BiocamRecordingInterface -globalStateCopy.schema.source_data.properties.IntanRecordingInterface = IntanRecordingInterfaceSchema.properties.IntanRecordingInterface -globalStateCopy.schema.source_data.properties.OpenEphysRecordingInterface = OpenEphysRecordingInterfaceSchema.properties.OpenEphysRecordingInterface -globalStateCopy.schema.source_data.properties.BlackrockRecordingInterface = BlackrockRecordingInterfaceSchema.properties.BlackrockRecordingInterface -globalStateCopy.schema.source_data.properties.BlackrockSortingInterface = BlackrockSortingInterfaceSchema.properties.BlackrockSortingInterface -globalStateCopy.schema.source_data.properties.CellExplorerSortingInterface = CellExplorerSortingInterfaceSchema.properties.CellExplorerSortingInterface -globalStateCopy.schema.source_data.properties.KiloSortSortingInterface = KiloSortSortingInterfaceSchema.properties.KiloSortSortingInterface -globalStateCopy.schema.source_data.properties.Spike2RecordingInterface = Spike2RecordingInterfaceSchema.properties.Spike2RecordingInterface -globalStateCopy.schema.source_data.properties.BrukerTiffSinglePlaneImagingInterface = BrukerTiffSinglePlaneImagingInterfaceSchema.properties.BrukerTiffSinglePlaneImagingInterface -globalStateCopy.schema.source_data.properties.MicroManagerTiffImagingInterface = MicroManagerTiffImagingInterfaceSchema.properties.MicroManagerTiffImagingInterface - -const results = globalStateCopy.results -for (let sub in results){ - for (let ses in results[sub]) results[sub][ses].source_data = {SpikeGLXNIDQInterface: {file_path: '/dummy/file/path'}} +const activePage = "conversion/sourcedata"; + +const globalStateCopy = JSON.parse(JSON.stringify(globalState)); +globalStateCopy.schema.source_data.properties.SpikeGLXRecordingInterface = + SpikeGLXRecordingInterfaceSchema.properties.SpikeGLXRecordingInterface; +globalStateCopy.schema.source_data.properties.SpikeGLXNIDQInterface = + SpikeGLXNIDQInterfaceSchema.properties.SpikeGLXNIDQInterface; +globalStateCopy.schema.source_data.properties.PhySortingInterface = + PhySortingInterfaceSchema.properties.PhySortingInterface; +globalStateCopy.schema.source_data.properties.NeuroScopeRecordingInterface = + NeuroScopeRecordingInterfaceSchema.properties.NeuroScopeRecordingInterface; +globalStateCopy.schema.source_data.properties.NeuroScopeLFPInterface = + NeuroScopeLFPInterfaceSchema.properties.NeuroScopeLFPInterface; +globalStateCopy.schema.source_data.properties.NeuroScopeSortingInterface = + NeuroScopeSortingInterfaceSchema.properties.NeuroScopeSortingInterface; +globalStateCopy.schema.source_data.properties.BiocamRecordingInterface = + BiocamRecordingInterfaceSchema.properties.BiocamRecordingInterface; +globalStateCopy.schema.source_data.properties.IntanRecordingInterface = + IntanRecordingInterfaceSchema.properties.IntanRecordingInterface; +globalStateCopy.schema.source_data.properties.OpenEphysRecordingInterface = + OpenEphysRecordingInterfaceSchema.properties.OpenEphysRecordingInterface; +globalStateCopy.schema.source_data.properties.BlackrockRecordingInterface = + BlackrockRecordingInterfaceSchema.properties.BlackrockRecordingInterface; +globalStateCopy.schema.source_data.properties.BlackrockSortingInterface = + BlackrockSortingInterfaceSchema.properties.BlackrockSortingInterface; +globalStateCopy.schema.source_data.properties.CellExplorerSortingInterface = + CellExplorerSortingInterfaceSchema.properties.CellExplorerSortingInterface; +globalStateCopy.schema.source_data.properties.KiloSortSortingInterface = + KiloSortSortingInterfaceSchema.properties.KiloSortSortingInterface; +globalStateCopy.schema.source_data.properties.Spike2RecordingInterface = + Spike2RecordingInterfaceSchema.properties.Spike2RecordingInterface; +globalStateCopy.schema.source_data.properties.BrukerTiffSinglePlaneImagingInterface = + BrukerTiffSinglePlaneImagingInterfaceSchema.properties.BrukerTiffSinglePlaneImagingInterface; +globalStateCopy.schema.source_data.properties.MicroManagerTiffImagingInterface = + MicroManagerTiffImagingInterfaceSchema.properties.MicroManagerTiffImagingInterface; + +const results = globalStateCopy.results; +for (let sub in results) { + for (let ses in results[sub]) + results[sub][ses].source_data = { SpikeGLXNIDQInterface: { file_path: "/dummy/file/path" } }; } - export const All = PageTemplate.bind({}); All.args = { activePage, globalState: globalStateCopy }; export const SpikeGLXRecordingInterface = PageTemplate.bind({}); -const SpikeGLXRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -SpikeGLXRecordingInterfaceGlobalCopy.interfaces.interface = SpikeGLXRecordingInterface -SpikeGLXRecordingInterfaceGlobalCopy.schema.source_data = SpikeGLXRecordingInterfaceSchema +const SpikeGLXRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +SpikeGLXRecordingInterfaceGlobalCopy.interfaces.interface = SpikeGLXRecordingInterface; +SpikeGLXRecordingInterfaceGlobalCopy.schema.source_data = SpikeGLXRecordingInterfaceSchema; SpikeGLXRecordingInterface.args = { activePage, globalState: SpikeGLXRecordingInterfaceGlobalCopy }; export const SpikeGLXNIDQInterface = PageTemplate.bind({}); -const SpikeGLXNIDQInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -SpikeGLXNIDQInterfaceGlobalCopy.interfaces.interface = SpikeGLXNIDQInterface -SpikeGLXNIDQInterfaceGlobalCopy.schema.source_data = SpikeGLXNIDQInterfaceSchema +const SpikeGLXNIDQInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +SpikeGLXNIDQInterfaceGlobalCopy.interfaces.interface = SpikeGLXNIDQInterface; +SpikeGLXNIDQInterfaceGlobalCopy.schema.source_data = SpikeGLXNIDQInterfaceSchema; SpikeGLXNIDQInterface.args = { activePage, globalState: SpikeGLXNIDQInterfaceGlobalCopy }; export const PhySortingInterface = PageTemplate.bind({}); -const PhySortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -PhySortingInterfaceGlobalCopy.interfaces.interface = PhySortingInterface -PhySortingInterfaceGlobalCopy.schema.source_data = PhySortingInterfaceSchema +const PhySortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +PhySortingInterfaceGlobalCopy.interfaces.interface = PhySortingInterface; +PhySortingInterfaceGlobalCopy.schema.source_data = PhySortingInterfaceSchema; PhySortingInterface.args = { activePage, globalState: PhySortingInterfaceGlobalCopy }; export const NeuroScopeRecordingInterface = PageTemplate.bind({}); -const NeuroScopeRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -NeuroScopeRecordingInterfaceGlobalCopy.interfaces.interface = NeuroScopeRecordingInterface -NeuroScopeRecordingInterfaceGlobalCopy.schema.source_data = NeuroScopeRecordingInterfaceSchema +const NeuroScopeRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +NeuroScopeRecordingInterfaceGlobalCopy.interfaces.interface = NeuroScopeRecordingInterface; +NeuroScopeRecordingInterfaceGlobalCopy.schema.source_data = NeuroScopeRecordingInterfaceSchema; NeuroScopeRecordingInterface.args = { activePage, globalState: NeuroScopeRecordingInterfaceGlobalCopy }; export const NeuroScopeLFPInterface = PageTemplate.bind({}); -const NeuroScopeLFPInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -NeuroScopeLFPInterfaceGlobalCopy.interfaces.interface = NeuroScopeLFPInterface -NeuroScopeLFPInterfaceGlobalCopy.schema.source_data = NeuroScopeLFPInterfaceSchema +const NeuroScopeLFPInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +NeuroScopeLFPInterfaceGlobalCopy.interfaces.interface = NeuroScopeLFPInterface; +NeuroScopeLFPInterfaceGlobalCopy.schema.source_data = NeuroScopeLFPInterfaceSchema; NeuroScopeLFPInterface.args = { activePage, globalState: NeuroScopeLFPInterfaceGlobalCopy }; export const NeuroScopeSortingInterface = PageTemplate.bind({}); -const NeuroScopeSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -NeuroScopeSortingInterfaceGlobalCopy.interfaces.interface = NeuroScopeSortingInterface -NeuroScopeSortingInterfaceGlobalCopy.schema.source_data = NeuroScopeSortingInterfaceSchema +const NeuroScopeSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +NeuroScopeSortingInterfaceGlobalCopy.interfaces.interface = NeuroScopeSortingInterface; +NeuroScopeSortingInterfaceGlobalCopy.schema.source_data = NeuroScopeSortingInterfaceSchema; NeuroScopeSortingInterface.args = { activePage, globalState: NeuroScopeSortingInterfaceGlobalCopy }; export const BiocamRecordingInterface = PageTemplate.bind({}); -const BiocamRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -BiocamRecordingInterfaceGlobalCopy.interfaces.interface = BiocamRecordingInterface -BiocamRecordingInterfaceGlobalCopy.schema.source_data = BiocamRecordingInterfaceSchema +const BiocamRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +BiocamRecordingInterfaceGlobalCopy.interfaces.interface = BiocamRecordingInterface; +BiocamRecordingInterfaceGlobalCopy.schema.source_data = BiocamRecordingInterfaceSchema; BiocamRecordingInterface.args = { activePage, globalState: BiocamRecordingInterfaceGlobalCopy }; export const IntanRecordingInterface = PageTemplate.bind({}); -const IntanRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -IntanRecordingInterfaceGlobalCopy.interfaces.interface = IntanRecordingInterface -IntanRecordingInterfaceGlobalCopy.schema.source_data = IntanRecordingInterfaceSchema +const IntanRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +IntanRecordingInterfaceGlobalCopy.interfaces.interface = IntanRecordingInterface; +IntanRecordingInterfaceGlobalCopy.schema.source_data = IntanRecordingInterfaceSchema; IntanRecordingInterface.args = { activePage, globalState: IntanRecordingInterfaceGlobalCopy }; export const OpenEphysRecordingInterface = PageTemplate.bind({}); -const OpenEphysRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -OpenEphysRecordingInterfaceGlobalCopy.interfaces.interface = OpenEphysRecordingInterface -OpenEphysRecordingInterfaceGlobalCopy.schema.source_data = OpenEphysRecordingInterfaceSchema +const OpenEphysRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +OpenEphysRecordingInterfaceGlobalCopy.interfaces.interface = OpenEphysRecordingInterface; +OpenEphysRecordingInterfaceGlobalCopy.schema.source_data = OpenEphysRecordingInterfaceSchema; OpenEphysRecordingInterface.args = { activePage, globalState: OpenEphysRecordingInterfaceGlobalCopy }; export const BlackrockRecordingInterface = PageTemplate.bind({}); -const BlackrockRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -BlackrockRecordingInterfaceGlobalCopy.interfaces.interface = BlackrockRecordingInterface -BlackrockRecordingInterfaceGlobalCopy.schema.source_data = BlackrockRecordingInterfaceSchema +const BlackrockRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +BlackrockRecordingInterfaceGlobalCopy.interfaces.interface = BlackrockRecordingInterface; +BlackrockRecordingInterfaceGlobalCopy.schema.source_data = BlackrockRecordingInterfaceSchema; BlackrockRecordingInterface.args = { activePage, globalState: BlackrockRecordingInterfaceGlobalCopy }; export const BlackrockSortingInterface = PageTemplate.bind({}); -const BlackrockSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -BlackrockSortingInterfaceGlobalCopy.interfaces.interface = BlackrockSortingInterface -BlackrockSortingInterfaceGlobalCopy.schema.source_data = BlackrockSortingInterfaceSchema +const BlackrockSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +BlackrockSortingInterfaceGlobalCopy.interfaces.interface = BlackrockSortingInterface; +BlackrockSortingInterfaceGlobalCopy.schema.source_data = BlackrockSortingInterfaceSchema; BlackrockSortingInterface.args = { activePage, globalState: BlackrockSortingInterfaceGlobalCopy }; export const CellExplorerSortingInterface = PageTemplate.bind({}); -const CellExplorerSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -CellExplorerSortingInterfaceGlobalCopy.interfaces.interface = CellExplorerSortingInterface -CellExplorerSortingInterfaceGlobalCopy.schema.source_data = CellExplorerSortingInterfaceSchema +const CellExplorerSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +CellExplorerSortingInterfaceGlobalCopy.interfaces.interface = CellExplorerSortingInterface; +CellExplorerSortingInterfaceGlobalCopy.schema.source_data = CellExplorerSortingInterfaceSchema; CellExplorerSortingInterface.args = { activePage, globalState: CellExplorerSortingInterfaceGlobalCopy }; export const KiloSortSortingInterface = PageTemplate.bind({}); -const KiloSortSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -KiloSortSortingInterfaceGlobalCopy.interfaces.interface = KiloSortSortingInterface -KiloSortSortingInterfaceGlobalCopy.schema.source_data = KiloSortSortingInterfaceSchema +const KiloSortSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +KiloSortSortingInterfaceGlobalCopy.interfaces.interface = KiloSortSortingInterface; +KiloSortSortingInterfaceGlobalCopy.schema.source_data = KiloSortSortingInterfaceSchema; KiloSortSortingInterface.args = { activePage, globalState: KiloSortSortingInterfaceGlobalCopy }; export const Spike2RecordingInterface = PageTemplate.bind({}); -const Spike2RecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -Spike2RecordingInterfaceGlobalCopy.interfaces.interface = Spike2RecordingInterface -Spike2RecordingInterfaceGlobalCopy.schema.source_data = Spike2RecordingInterfaceSchema +const Spike2RecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +Spike2RecordingInterfaceGlobalCopy.interfaces.interface = Spike2RecordingInterface; +Spike2RecordingInterfaceGlobalCopy.schema.source_data = Spike2RecordingInterfaceSchema; Spike2RecordingInterface.args = { activePage, globalState: Spike2RecordingInterfaceGlobalCopy }; export const BrukerTiffSinglePlaneImagingInterface = PageTemplate.bind({}); -const BrukerTiffSinglePlaneImagingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -BrukerTiffSinglePlaneImagingInterfaceGlobalCopy.interfaces.interface = BrukerTiffSinglePlaneImagingInterface -BrukerTiffSinglePlaneImagingInterfaceGlobalCopy.schema.source_data = BrukerTiffSinglePlaneImagingInterfaceSchema -BrukerTiffSinglePlaneImagingInterface.args = { activePage, globalState: BrukerTiffSinglePlaneImagingInterfaceGlobalCopy }; +const BrukerTiffSinglePlaneImagingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +BrukerTiffSinglePlaneImagingInterfaceGlobalCopy.interfaces.interface = BrukerTiffSinglePlaneImagingInterface; +BrukerTiffSinglePlaneImagingInterfaceGlobalCopy.schema.source_data = BrukerTiffSinglePlaneImagingInterfaceSchema; +BrukerTiffSinglePlaneImagingInterface.args = { + activePage, + globalState: BrukerTiffSinglePlaneImagingInterfaceGlobalCopy, +}; export const MicroManagerTiffImagingInterface = PageTemplate.bind({}); -const MicroManagerTiffImagingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)) -MicroManagerTiffImagingInterfaceGlobalCopy.interfaces.interface = MicroManagerTiffImagingInterface -MicroManagerTiffImagingInterfaceGlobalCopy.schema.source_data = MicroManagerTiffImagingInterfaceSchema +const MicroManagerTiffImagingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState)); +MicroManagerTiffImagingInterfaceGlobalCopy.interfaces.interface = MicroManagerTiffImagingInterface; +MicroManagerTiffImagingInterfaceGlobalCopy.schema.source_data = MicroManagerTiffImagingInterfaceSchema; MicroManagerTiffImagingInterface.args = { activePage, globalState: MicroManagerTiffImagingInterfaceGlobalCopy }; - From bb7e2211f1931cf65b7126dc9b3a8e2cf3b532a5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:26:15 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/renderer/src/progress/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/src/progress/index.js b/src/renderer/src/progress/index.js index b30fb5eb7..14bc2a2f1 100644 --- a/src/renderer/src/progress/index.js +++ b/src/renderer/src/progress/index.js @@ -42,7 +42,7 @@ function decode(message) { function drill(o, callback) { if (o && typeof o === "object") { - const copy = Array.isArray(o) ? [...o] : { ...o } ; + const copy = Array.isArray(o) ? [...o] : { ...o }; for (let k in copy) copy[k] = drill(copy[k], callback); return copy; } else return callback(o);