Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed Oct 17, 2023
2 parents 33f8a3c + 5b7fd7c commit 529d6de
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
3 changes: 2 additions & 1 deletion guideGlobalMetadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"AlphaOmegaRecordingInterface",
"DeepLabCutInterface",
"SLEAPInterface",
"FicTracDataInterface"
"FicTracDataInterface",
"AudioInterface"
]
}
28 changes: 28 additions & 0 deletions schemas/json/generated/AudioInterface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"required": [],
"properties": {
"AudioInterface": {
"required": [
"file_paths"
],
"properties": {
"file_paths": {
"type": "array"
},
"verbose": {
"type": "boolean",
"default": false
}
},
"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 @@ -33,6 +33,7 @@ import AlphaOmegaRecordingInterfaceSchema from "../../../../../../schemas/json/g
import DeepLabCutInterfaceSchema from "../../../../../../schemas/json/generated/DeepLabCutInterface.json";
import SLEAPInterfaceSchema from "../../../../../../schemas/json/generated/SLEAPInterface.json";
import FicTracDataInterfaceSchema from "../../../../../../schemas/json/generated/FicTracDataInterface.json";
import AudioInterfaceSchema from "../../../../../../schemas/json/generated/AudioInterface.json";

export default {
title: "Pages/Guided Mode/Source Data",
Expand Down Expand Up @@ -111,6 +112,7 @@ globalStateCopy.schema.source_data.properties.DeepLabCutInterface =
globalStateCopy.schema.source_data.properties.SLEAPInterface = SLEAPInterfaceSchema.properties.SLEAPInterface;
globalStateCopy.schema.source_data.properties.FicTracDataInterface =
FicTracDataInterfaceSchema.properties.FicTracDataInterface;
globalStateCopy.schema.source_data.properties.AudioInterface = AudioInterfaceSchema.properties.AudioInterface;

const results = globalStateCopy.results;
for (let sub in results) {
Expand Down Expand Up @@ -327,3 +329,9 @@ const FicTracDataInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState));
FicTracDataInterfaceGlobalCopy.interfaces.interface = FicTracDataInterface;
FicTracDataInterfaceGlobalCopy.schema.source_data = FicTracDataInterfaceSchema;
FicTracDataInterface.args = { activePage, globalState: FicTracDataInterfaceGlobalCopy };

export const AudioInterface = PageTemplate.bind({});
const AudioInterfaceGlobalCopy = JSON.parse(JSON.stringify(globalState));
AudioInterfaceGlobalCopy.interfaces.interface = AudioInterface;
AudioInterfaceGlobalCopy.schema.source_data = AudioInterfaceSchema;
AudioInterface.args = { activePage, globalState: AudioInterfaceGlobalCopy };

0 comments on commit 529d6de

Please sign in to comment.