Skip to content

Commit

Permalink
Merge pull request #413 from NeurodataWithoutBorders/plexon
Browse files Browse the repository at this point in the history
Add Plexon interfaces
  • Loading branch information
CodyCBakerPhD authored Oct 13, 2023
2 parents efad883 + 6b679db commit 0c6dfd9
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 1 deletion.
4 changes: 3 additions & 1 deletion guideGlobalMetadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"SbxImagingInterface",
"CaimanSegmentationInterface",
"MCSRawRecordingInterface",
"MEArecRecordingInterface"
"MEArecRecordingInterface",
"PlexonRecordingInterface",
"PlexonSortingInterface"
]
}
33 changes: 33 additions & 0 deletions schemas/json/generated/PlexonRecordingInterface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"required": [],
"properties": {
"PlexonRecordingInterface": {
"required": [
"file_path"
],
"properties": {
"file_path": {
"format": "file",
"type": "string"
},
"verbose": {
"type": "boolean",
"default": true
},
"es_key": {
"type": "string",
"default": "ElectricalSeries"
}
},
"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"
}
29 changes: 29 additions & 0 deletions schemas/json/generated/PlexonSortingInterface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"required": [],
"properties": {
"PlexonSortingInterface": {
"required": [
"file_path"
],
"properties": {
"file_path": {
"format": "file",
"type": "string"
},
"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"
}
18 changes: 18 additions & 0 deletions src/renderer/src/stories/pages/guided-mode/SourceData.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import SbxImagingInterfaceSchema from "../../../../../../schemas/json/generated/
import CaimanSegmentationInterfaceSchema from "../../../../../../schemas/json/generated/CaimanSegmentationInterface.json";
import MCSRawRecordingInterfaceSchema from "../../../../../../schemas/json/generated/MCSRawRecordingInterface.json";
import MEArecRecordingInterfaceSchema from "../../../../../../schemas/json/generated/MEArecRecordingInterface.json";
import PlexonRecordingInterfaceSchema from "../../../../../../schemas/json/generated/PlexonRecordingInterface.json";
import PlexonSortingInterfaceSchema from "../../../../../../schemas/json/generated/PlexonSortingInterface.json";

export default {
title: "Pages/Guided Mode/Source Data",
Expand Down Expand Up @@ -82,6 +84,10 @@ globalStateCopy.schema.source_data.properties.MCSRawRecordingInterface =
MCSRawRecordingInterfaceSchema.properties.MCSRawRecordingInterface;
globalStateCopy.schema.source_data.properties.MEArecRecordingInterface =
MEArecRecordingInterfaceSchema.properties.MEArecRecordingInterface;
globalStateCopy.schema.source_data.properties.PlexonRecordingInterface =
PlexonRecordingInterfaceSchema.properties.PlexonRecordingInterface;
globalStateCopy.schema.source_data.properties.PlexonSortingInterface =
PlexonSortingInterfaceSchema.properties.PlexonSortingInterface;

const results = globalStateCopy.results;
for (let sub in results) {
Expand Down Expand Up @@ -238,3 +244,15 @@ const MEArecRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState
MEArecRecordingInterfaceGlobalCopy.interfaces.interface = MEArecRecordingInterface;
MEArecRecordingInterfaceGlobalCopy.schema.source_data = MEArecRecordingInterfaceSchema;
MEArecRecordingInterface.args = { activePage, globalState: MEArecRecordingInterfaceGlobalCopy };

export const PlexonRecordingInterface = PageTemplate.bind({});
const PlexonRecordingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState));
PlexonRecordingInterfaceGlobalCopy.interfaces.interface = PlexonRecordingInterface;
PlexonRecordingInterfaceGlobalCopy.schema.source_data = PlexonRecordingInterfaceSchema;
PlexonRecordingInterface.args = { activePage, globalState: PlexonRecordingInterfaceGlobalCopy };

export const PlexonSortingInterface = PageTemplate.bind({});
const PlexonSortingInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState));
PlexonSortingInterfaceGlobalCopy.interfaces.interface = PlexonSortingInterface;
PlexonSortingInterfaceGlobalCopy.schema.source_data = PlexonSortingInterfaceSchema;
PlexonSortingInterface.args = { activePage, globalState: PlexonSortingInterfaceGlobalCopy };

0 comments on commit 0c6dfd9

Please sign in to comment.