diff --git a/docs/developer_guide.rst b/docs/developer_guide.rst index e191ff894..0eae33f35 100644 --- a/docs/developer_guide.rst +++ b/docs/developer_guide.rst @@ -75,7 +75,7 @@ This will automatically add the new page to the sidebar. The page itself can be constructor(...args) { super(...args); - console.log(this.info.globalState) // This will print the global state that is currently being passed between subpages (i.e. within guided mode) + console.log(this.info.globalState) // This will print the global state that is currently being passed between subpages } render() { diff --git a/guideGlobalMetadata.json b/guideGlobalMetadata.json index 68450ee9e..4f1d6d2a7 100644 --- a/guideGlobalMetadata.json +++ b/guideGlobalMetadata.json @@ -15,6 +15,8 @@ "KiloSortSortingInterface", "Spike2RecordingInterface", "BrukerTiffSinglePlaneImagingInterface", + "ExtractSegmentationInterface", + "CnmfeSegmentationInterface", "BrukerTiffMultiPlaneImagingInterface", "MicroManagerTiffImagingInterface", "ScanImageImagingInterface", @@ -27,6 +29,10 @@ "PlexonRecordingInterface", "PlexonSortingInterface", "AxonaRecordingInterface", + "NeuralynxRecordingInterface", + "AlphaOmegaRecordingInterface", + "DeepLabCutInterface", + "SLEAPInterface", "FicTracDataInterface" ] } diff --git a/pyflask/manageNeuroconv/manage_neuroconv.py b/pyflask/manageNeuroconv/manage_neuroconv.py index 2f7073897..d72b5361f 100644 --- a/pyflask/manageNeuroconv/manage_neuroconv.py +++ b/pyflask/manageNeuroconv/manage_neuroconv.py @@ -341,11 +341,7 @@ def convert_to_nwb(info: dict) -> str: resolved_output_path = resolved_output_directory / nwbfile_path # Remove symlink placed at the default_output_directory if this will hold real data - if ( - not run_stub_test - and resolved_output_directory == default_output_directory - and default_output_directory.is_symlink() - ): + if resolved_output_directory == default_output_directory and default_output_directory.is_symlink(): default_output_directory.unlink() resolved_output_path.parent.mkdir(exist_ok=True, parents=True) # Ensure all parent directories exist @@ -401,7 +397,7 @@ def update_conversion_progress(**kwargs): ) # Create a symlink between the fake data and custom data - if not run_stub_test and not resolved_output_directory == default_output_directory: + if not resolved_output_directory == default_output_directory: if default_output_directory.exists(): # If default default_output_directory is not a symlink, delete all contents and create a symlink there if not default_output_directory.is_symlink(): diff --git a/schemas/json/dandi/global.json b/schemas/json/dandi/global.json index 1680fd34d..e44e06df6 100644 --- a/schemas/json/dandi/global.json +++ b/schemas/json/dandi/global.json @@ -14,7 +14,7 @@ "description": "From the staging (testing) server" } }, - "required": ["main_api_key", "staging_api_key"] + "required": ["main_api_key"] } } } diff --git a/schemas/json/generated/AlphaOmegaRecordingInterface.json b/schemas/json/generated/AlphaOmegaRecordingInterface.json new file mode 100644 index 000000000..420bf7378 --- /dev/null +++ b/schemas/json/generated/AlphaOmegaRecordingInterface.json @@ -0,0 +1,33 @@ +{ + "required": [], + "properties": { + "AlphaOmegaRecordingInterface": { + "required": [ + "folder_path" + ], + "properties": { + "folder_path": { + "format": "directory", + "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" +} diff --git a/schemas/json/generated/CnmfeSegmentationInterface.json b/schemas/json/generated/CnmfeSegmentationInterface.json new file mode 100644 index 000000000..381a6c3a7 --- /dev/null +++ b/schemas/json/generated/CnmfeSegmentationInterface.json @@ -0,0 +1,29 @@ +{ + "required": [], + "properties": { + "CnmfeSegmentationInterface": { + "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" +} diff --git a/schemas/json/generated/DeepLabCutInterface.json b/schemas/json/generated/DeepLabCutInterface.json new file mode 100644 index 000000000..29cbcd0bd --- /dev/null +++ b/schemas/json/generated/DeepLabCutInterface.json @@ -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" +} diff --git a/schemas/json/generated/ExtractSegmentationInterface.json b/schemas/json/generated/ExtractSegmentationInterface.json new file mode 100644 index 000000000..6d488ff38 --- /dev/null +++ b/schemas/json/generated/ExtractSegmentationInterface.json @@ -0,0 +1,36 @@ +{ + "required": [], + "properties": { + "ExtractSegmentationInterface": { + "required": [ + "file_path", + "sampling_frequency" + ], + "properties": { + "file_path": { + "format": "file", + "type": "string" + }, + "sampling_frequency": { + "type": "number" + }, + "output_struct_name": { + "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" +} diff --git a/schemas/json/generated/NeuralynxRecordingInterface.json b/schemas/json/generated/NeuralynxRecordingInterface.json new file mode 100644 index 000000000..dfd28cada --- /dev/null +++ b/schemas/json/generated/NeuralynxRecordingInterface.json @@ -0,0 +1,36 @@ +{ + "required": [], + "properties": { + "NeuralynxRecordingInterface": { + "required": [ + "folder_path" + ], + "properties": { + "folder_path": { + "format": "directory", + "type": "string" + }, + "stream_name": { + "type": "string" + }, + "verbose": { + "type": "boolean", + "default": false + }, + "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" +} diff --git a/schemas/json/generated/SLEAPInterface.json b/schemas/json/generated/SLEAPInterface.json new file mode 100644 index 000000000..57242afdc --- /dev/null +++ b/schemas/json/generated/SLEAPInterface.json @@ -0,0 +1,36 @@ +{ + "required": [], + "properties": { + "SLEAPInterface": { + "required": [ + "file_path" + ], + "properties": { + "file_path": { + "format": "file", + "type": "string" + }, + "video_file_path": { + "format": "file", + "type": "string" + }, + "verbose": { + "type": "boolean", + "default": true + }, + "frames_per_second": { + "type": "number" + } + }, + "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" +} diff --git a/src/renderer/assets/css/global.css b/src/renderer/assets/css/global.css index a238aa68f..bb44ffba5 100755 --- a/src/renderer/assets/css/global.css +++ b/src/renderer/assets/css/global.css @@ -10,7 +10,7 @@ /* Notfy */ .notyf__toast { - max-width: clamp(300px, 40vw, min-content) !important; + max-width: 40vw !important; } .notyf__message { diff --git a/src/renderer/assets/css/guided.css b/src/renderer/assets/css/guided.css index fef0872e0..9aed292f1 100644 --- a/src/renderer/assets/css/guided.css +++ b/src/renderer/assets/css/guided.css @@ -27,7 +27,6 @@ width: 100%; height: 100%; border-radius: 5px; - margin-top: 15px; } .guided--nav-bar-dropdown { @@ -434,14 +433,6 @@ margin: 6px; } -.guided--main-tab, -.guided--parent-tab { - height: 100%; - width: 100%; - display: flex; - flex-direction: column; -} - .guided--page, .guided--panel { width: 100%; @@ -900,9 +891,10 @@ h1.guided--text-sub-step { background-color: var(--color-border); border: none; display: inline-block; - cursor: pointer; border-radius: 16px; + cursor: pointer; } + .guided--capsule.active { background-color: var(--color-light-green); } @@ -922,7 +914,6 @@ h1.guided--text-sub-step { background-color: #d5eaff; border: none; display: inline-block; - cursor: pointer; transform: skewx(-25deg); } .guided--capsule-sub-page.active { @@ -1196,7 +1187,6 @@ h1.guided--text-sub-step { margin-bottom: 15px; border-bottom: 5px solid #b80d49; width: 100%; - margin-top: -0.5rem !important; } .guided--button-tab-container { diff --git a/src/renderer/assets/css/main.css b/src/renderer/assets/css/main.css index e7da66550..b1eb0db0a 100644 --- a/src/renderer/assets/css/main.css +++ b/src/renderer/assets/css/main.css @@ -1471,43 +1471,12 @@ details[open] > summary::before { box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); } -.getting-started-overview { - padding-left: 0 !important; - padding-right: 0 !important; - height: 100%; - text-align: center; - display: flex; - flex-direction: column; - /* display: grid; - grid-template-rows: 68% 14% 15%; */ -} - -.getting-started-header { - width: auto; - height: 18rem; +.standalone-section { + width: 100%; display: flex; flex-direction: column; - justify-content: center; - margin: 0 auto; - margin-top: 3rem; align-items: center; - margin-bottom: 0rem; -} - -.front-page_logo { - margin-top: 0.5rem; - display: flex; - align-items: center; - flex-direction: row; - width: 63rem; - flex-direction: column; - justify-content: center; -} - -.header-text { - font-size: 18px; - margin-top: 1rem; - font-weight: bold; + margin-bottom: 20px; } .overview-card-layout { diff --git a/src/renderer/assets/css/section.css b/src/renderer/assets/css/section.css index af8b679f0..ce05dcc80 100755 --- a/src/renderer/assets/css/section.css +++ b/src/renderer/assets/css/section.css @@ -1,22 +1,12 @@ /* Section ------------------ */ .section { - /* position: absolute; */ - top: 0; - left: 210px; - right: 0; - bottom: 0; height: 100%; width: 100%; margin-right: 0; padding: 0px 50px 50px 50px; display: flex; flex-direction: column; - /* display: grid; - grid-template-rows: min-content auto; - grid-template-columns: 1fr; */ - /* padding-top: 7px; - padding-left: 30px; */ box-sizing: border-box; overflow-x: hidden; overflow-y: auto; diff --git a/src/renderer/assets/css/variables.css b/src/renderer/assets/css/variables.css index d38aac2c4..f311607cd 100755 --- a/src/renderer/assets/css/variables.css +++ b/src/renderer/assets/css/variables.css @@ -32,9 +32,7 @@ .u-category-windows { --color-accent: hsl(190, 60%, 36%); } -.u-category-menu { - --color-accent: hsl(190, 60%, 36%); -} + .u-category-native-ui { --color-accent: hsl(222, 53%, 50%); } diff --git a/src/renderer/src/stories/FileSystemSelector.js b/src/renderer/src/stories/FileSystemSelector.js index 5bdc10c9d..fc94871fe 100644 --- a/src/renderer/src/stories/FileSystemSelector.js +++ b/src/renderer/src/stories/FileSystemSelector.js @@ -1,6 +1,6 @@ import { LitElement, css, html } from "lit"; -import { remote } from "../electron/index"; +import { fs, remote } from "../electron/index"; const { dialog } = remote; function getObjectTypeReferenceString(type, multiple, { nested, native } = {}) { @@ -126,7 +126,7 @@ export class FilesystemSelector extends LitElement { }; #checkType = (value) => { - const isLikelyFile = value.split(".").length !== 1; + const isLikelyFile = fs ? fs.lstatSync(value).isFile() : value.split(".").length; if ((this.type === "directory" && isLikelyFile) || (this.type === "file" && !isLikelyFile)) this.#onThrow("Incorrect filesystem object", `Please provide a ${this.type} instead.`); }; @@ -150,8 +150,6 @@ export class FilesystemSelector extends LitElement { if (this.multiple && !Array.isArray(resolvedValue)) resolvedValue = []; - console.log(resolvedValue); - this.value = resolvedValue; this.onSelect(this.value); const event = new Event("change"); // Create a new change event diff --git a/src/renderer/src/stories/JSONSchemaForm.js b/src/renderer/src/stories/JSONSchemaForm.js index 195d6cbfb..2a375271e 100644 --- a/src/renderer/src/stories/JSONSchemaForm.js +++ b/src/renderer/src/stories/JSONSchemaForm.js @@ -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", diff --git a/src/renderer/src/stories/JSONSchemaInput.js b/src/renderer/src/stories/JSONSchemaInput.js index d20c54ecd..687d528e2 100644 --- a/src/renderer/src/stories/JSONSchemaInput.js +++ b/src/renderer/src/stories/JSONSchemaInput.js @@ -282,7 +282,14 @@ export class JSONSchemaInput extends LitElement { modal.toggle(false); }); - return html`
${list} ${addButton}
`; + return html` +
validateOnChange && this.#triggerValidation(name, list, path)} + > + ${list} ${addButton} +
+ `; } // Basic enumeration of properties on a select element diff --git a/src/renderer/src/stories/List.ts b/src/renderer/src/stories/List.ts index 7ffb24b26..d6e92b37e 100644 --- a/src/renderer/src/stories/List.ts +++ b/src/renderer/src/stories/List.ts @@ -28,6 +28,7 @@ export class List extends LitElement { #empty { padding: 20px 10px; + margin-left: -40px; color: gray; } diff --git a/src/renderer/src/stories/Main.js b/src/renderer/src/stories/Main.js index 98320cfd0..7ad3d4968 100644 --- a/src/renderer/src/stories/Main.js +++ b/src/renderer/src/stories/Main.js @@ -104,11 +104,16 @@ export class Main extends LitElement { if (section) { if (capsules === true || !("capsules" in page)) { let pages = Object.values(section.pages); - if (pages.length > 1) - capsules = { + const pageIds = Object.keys(section.pages); + if (pages.length > 1) { + const capsulesProps = { n: pages.length, selected: pages.map((o) => o.pageLabel).indexOf(page.info.label), }; + + capsules = new GuidedCapsules(capsulesProps); + capsules.onClick = (i) => this.toRender.page.to(pageIds[i]); + } } if (header === true || !("header" in page) || !("sections" in page.header)) { @@ -123,7 +128,6 @@ export class Main extends LitElement { const headerEl = header ? new GuidedHeader(header) : html`
`; // Render for grid - const capsuleEl = capsules ? new GuidedCapsules(capsules) : ""; const footerEl = footer ? new GuidedFooter(footer) : html`
`; // Render for grid const title = header?.title ?? page.info?.title; @@ -137,12 +141,14 @@ export class Main extends LitElement { return html` ${headerEl} ${capsules - ? html`
${capsuleEl}
` - : html`
`} + ? html`
${capsules}
` + : html`
`}
-
+
${title - ? html`
+ ? html`
@@ -156,7 +162,7 @@ export class Main extends LitElement {
` : ""} -
${page}
+
${page}
${footerEl} diff --git a/src/renderer/src/stories/NavigationSidebar.js b/src/renderer/src/stories/NavigationSidebar.js index adccf07bd..3e5533301 100644 --- a/src/renderer/src/stories/NavigationSidebar.js +++ b/src/renderer/src/stories/NavigationSidebar.js @@ -94,8 +94,8 @@ export class NavigationSidebar extends LitElement { render() { return html`