Skip to content

Commit

Permalink
Merge pull request #830 from NeurodataWithoutBorders/update-stories-w…
Browse files Browse the repository at this point in the history
…ith-new-format-descriptions

Generate all stories again given new descriptions
  • Loading branch information
CodyCBakerPhD authored Jun 5, 2024
2 parents 1057450 + 14ba221 commit db12c65
Show file tree
Hide file tree
Showing 34 changed files with 77 additions and 50 deletions.
4 changes: 1 addition & 3 deletions generateInterfaceSchema.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ class CustomNWBConverter(NWBConverter):

sourceDataStoryPath = Path("stories/pages/SourceData.stories.js")

importCode = "\n".join(
map(lambda arr: f"import {arr[0]}Schema from '../inputs/interface_schemas/{arr[1]}'", paths.items())
)
importCode = "\n".join(map(lambda arr: f"import {arr[0]}Schema from '../{Path(*arr[1].parts[1:])}'", paths.items()))
storyCode = "\n".join(
map(
lambda arr: f"""export const {arr[0]} = PageTemplate.bind({{}});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
"type": "string",
"description": "Path to the folder of .mpx files."
},
"verbose": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to .bin file."
},
"verbose": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to the .bwr file."
},
"verbose": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"properties": {
"file_path": {
"format": "file",
"description": "Path to Blackrock file.",
"description": "Path to the Blackrock file with suffix being .ns1, .ns2, .ns3, .ns4m .ns4, or .ns6.",
"type": "string"
},
"nsx_override": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"properties": {
"file_path": {
"format": "file",
"description": "Path to Blackrock file.",
"description": "Path to Blackrock .nev file.",
"type": "string"
},
"sampling_frequency": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
"type": "string",
"description": "The folder that contains the Bruker TIF image files (.ome.tif) and configuration files (.xml, .env)."
},
"plane_separation_type": {
"enum": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"folder_path": {
"format": "directory",
"type": "string",
"description": "The path that points to the folder containing the Bruker volumetric TIF image files and configuration files."
"description": "The folder that contains the Bruker TIF image files (.ome.tif) and configuration files (.xml, .env)."
},
"stream_name": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"folder_path": {
"format": "directory",
"type": "string",
"description": "The path that points to the folder containing the Bruker TIF image files and configuration files."
"description": "The folder containing the Bruker TIF image files and configuration files."
},
"stream_name": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to .hdf5 file."
},
"verbose": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"properties": {
"folder_path": {
"format": "directory",
"description": "The folder where the session data is located. It should contain a\n`{folder.name}.session.mat` file and the binary files `{folder.name}.dat`\nor `{folder.name}.lfp` for the LFP interface.",
"description": "Folder containing the .session.mat file",
"type": "string"
},
"verbose": {
Expand Down
6 changes: 4 additions & 2 deletions stories/inputs/interface_schemas/DeepLabCutInterface.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to the .h5 file output by dlc."
},
"config_file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to .yml config file"
},
"subject_name": {
"type": "string",
Expand Down
3 changes: 2 additions & 1 deletion stories/inputs/interface_schemas/EDFRecordingInterface.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to the .edf file."
},
"verbose": {
"type": "boolean",
Expand Down
3 changes: 2 additions & 1 deletion stories/inputs/interface_schemas/FicTracDataInterface.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to the .dat file (the output of fictrac)"
},
"radius": {
"type": "number"
Expand Down
6 changes: 3 additions & 3 deletions stories/inputs/interface_schemas/IntanRecordingInterface.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to either a .rhd or a .rhs file"
},
"stream_id": {
"type": "string",
"default": "0"
"type": "string"
},
"verbose": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
"type": "string",
"description": "Path to the output Phy folder (containing the params.py)"
},
"keep_good_only": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to the .raw file."
},
"verbose": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to the MEArec .h5 file."
},
"verbose": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"folder_path": {
"format": "directory",
"type": "string",
"description": "The path that points to the folder containing the OME-TIF image files."
"description": "The folder containing the OME-TIF image files."
},
"verbose": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
"type": "string",
"description": "The main Miniscope folder. The movie files are expected to be in sub folders within the main folder."
}
},
"type": "object",
Expand Down
3 changes: 2 additions & 1 deletion stories/inputs/interface_schemas/MiniscopeConverter.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
"type": "string",
"description": "The path to the main Miniscope folder."
},
"verbose": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
"type": "string",
"description": "The main Miniscope folder. The microscope movie files are expected to be in sub folders within the main folder."
}
},
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
"type": "string",
"description": "Path to Neuralynx directory containing \".nse\", \".ntt\", \".nse\", or \".nev\" files."
},
"stream_name": {
"type": "string"
Expand Down
3 changes: 2 additions & 1 deletion stories/inputs/interface_schemas/NeuroScopeLFPInterface.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to .lfp or .eeg file."
},
"gain": {
"type": "number"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to .dat file."
},
"gain": {
"type": "number"
Expand Down
12 changes: 8 additions & 4 deletions stories/inputs/interface_schemas/NeuroScopeSortingInterface.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
"type": "string",
"description": "Path to folder containing .res and .clu files."
},
"keep_mua_units": {
"type": "boolean",
"default": true
"default": true,
"description": "Whether to return sorted spikes from multi-unit activity."
},
"exclude_shanks": {
"type": "array"
"type": "array",
"description": "List of indices to ignore."
},
"xml_file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to .xml file containing device and electrode configuration."
},
"verbose": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
"type": "string",
"description": "Path to OpenEphys directory (.continuous or .dat files)."
},
"stream_name": {
"type": "string"
Expand Down
3 changes: 2 additions & 1 deletion stories/inputs/interface_schemas/PhySortingInterface.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
"type": "string",
"description": "Path to the output Phy folder (containing the params.py)."
},
"exclude_cluster_groups": {
"type": "array",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to the .plx file."
},
"verbose": {
"type": "boolean",
Expand Down
3 changes: 2 additions & 1 deletion stories/inputs/interface_schemas/PlexonSortingInterface.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to the plexon spiking data (.plx file)."
},
"verbose": {
"type": "boolean",
Expand Down
6 changes: 4 additions & 2 deletions stories/inputs/interface_schemas/SLEAPInterface.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
"properties": {
"file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path to the .slp file (the output of sleap)"
},
"video_file_path": {
"format": "file",
"type": "string"
"type": "string",
"description": "Path of the video for extracting timestamps (optional)."
},
"verbose": {
"type": "boolean",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"type": "string",
"description": "Path to Tiff file."
},
"channel_name": {
"type": "string"
},
"plane_name": {
"type": "string"
},
"fallback_sampling_frequency": {
"type": "number"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"properties": {
"file_path": {
"format": "file",
"description": "Path to CED data file.",
"description": "Path to .smr or .smrx file.",
"type": "string"
},
"verbose": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,22 @@
"properties": {
"folder_path": {
"format": "directory",
"type": "string"
"type": "string",
"description": "Path to the folder containing Suite2p segmentation data. Should contain 'plane#' subfolder(s)."
},
"channel_name": {
"type": "string"
},
"plane_name": {
"type": "string"
"type": "string",
"description": "The name of the plane to load. This interface only loads one plane at a time. Use the full name, e.g. 'plane0'. If this value is omitted, the first plane found will be loaded."
},
"plane_segmentation_name": {
"type": "string"
},
"verbose": {
"type": "boolean",
"default": true
},
"combined": {
"type": "boolean",
"default": false
},
"plane_no": {
"type": "number"
}
},
"type": "object",
Expand Down

0 comments on commit db12c65

Please sign in to comment.