Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DeepLabCut Interface #450

Merged
merged 7 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion guideGlobalMetadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"PlexonSortingInterface",
"AxonaRecordingInterface",
"NeuralynxRecordingInterface",
"AlphaOmegaRecordingInterface"
"AlphaOmegaRecordingInterface",
"DeepLabCutInterface"
]
}
38 changes: 38 additions & 0 deletions schemas/json/generated/DeepLabCutInterface.json
Original file line number Diff line number Diff line change
@@ -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"
}
1 change: 0 additions & 1 deletion src/renderer/src/stories/JSONSchemaForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 };
Loading