Skip to content

Commit

Permalink
Merge pull request #453 from NeurodataWithoutBorders/FicTracDataInter…
Browse files Browse the repository at this point in the history
…face

Add FicTracDataInterface
  • Loading branch information
CodyCBakerPhD authored Oct 17, 2023
2 parents c84139e + 0da12f2 commit 3395f1c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
3 changes: 2 additions & 1 deletion guideGlobalMetadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"NeuralynxRecordingInterface",
"AlphaOmegaRecordingInterface",
"DeepLabCutInterface",
"SLEAPInterface"
"SLEAPInterface",
"FicTracDataInterface"
]
}
29 changes: 29 additions & 0 deletions schemas/json/generated/FicTracDataInterface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"required": [],
"properties": {
"FicTracDataInterface": {
"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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import NeuralynxRecordingInterfaceSchema from "../../../../../../schemas/json/ge
import AlphaOmegaRecordingInterfaceSchema from "../../../../../../schemas/json/generated/AlphaOmegaRecordingInterface.json";
import DeepLabCutInterfaceSchema from "../../../../../../schemas/json/generated/DeepLabCutInterface.json";
import SLEAPInterfaceSchema from "../../../../../../schemas/json/generated/SLEAPInterface.json";
import FicTracDataInterfaceSchema from "../../../../../../schemas/json/generated/FicTracDataInterface.json";

export default {
title: "Pages/Guided Mode/Source Data",
Expand Down Expand Up @@ -108,6 +109,8 @@ globalStateCopy.schema.source_data.properties.AlphaOmegaRecordingInterface =
globalStateCopy.schema.source_data.properties.DeepLabCutInterface =
DeepLabCutInterfaceSchema.properties.DeepLabCutInterface;
globalStateCopy.schema.source_data.properties.SLEAPInterface = SLEAPInterfaceSchema.properties.SLEAPInterface;
globalStateCopy.schema.source_data.properties.FicTracDataInterface =
FicTracDataInterfaceSchema.properties.FicTracDataInterface;

const results = globalStateCopy.results;
for (let sub in results) {
Expand Down Expand Up @@ -318,3 +321,9 @@ const SLEAPInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState));
SLEAPInterfaceGlobalCopy.interfaces.interface = SLEAPInterface;
SLEAPInterfaceGlobalCopy.schema.source_data = SLEAPInterfaceSchema;
SLEAPInterface.args = { activePage, globalState: SLEAPInterfaceGlobalCopy };

export const FicTracDataInterface = PageTemplate.bind({});
const FicTracDataInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState));
FicTracDataInterfaceGlobalCopy.interfaces.interface = FicTracDataInterface;
FicTracDataInterfaceGlobalCopy.schema.source_data = FicTracDataInterfaceSchema;
FicTracDataInterface.args = { activePage, globalState: FicTracDataInterfaceGlobalCopy };

0 comments on commit 3395f1c

Please sign in to comment.