diff --git a/schemas/json/project/globals.json b/schemas/json/project/globals.json index 66280e879..921131734 100644 --- a/schemas/json/project/globals.json +++ b/schemas/json/project/globals.json @@ -4,12 +4,6 @@ "type": "string", "format": "directory", "description": "Provide a custom output location for your NWB files. Will default to ~/NWB_GUIDE/conversions" - }, - - "preview_output_folder": { - "type": "string", - "format": "directory", - "description": "Provide a custom output location for your NWB stub files. Will default to ~/NWB_GUIDE/preview. These files are expected to much smaller than the conversion files (only ~MB in scale)." } } } diff --git a/src/renderer/src/stories/pages/Page.js b/src/renderer/src/stories/pages/Page.js index 8207918c2..8fdc86711 100644 --- a/src/renderer/src/stories/pages/Page.js +++ b/src/renderer/src/stories/pages/Page.js @@ -187,7 +187,7 @@ export class Page extends LitElement { const { subject, session, globalState = this.info.globalState } = info; const file = `sub-${subject}/sub-${subject}_ses-${session}.nwb`; - const { conversion_output_folder, preview_output_folder, name } = globalState.project; + const { conversion_output_folder, name } = globalState.project; // Resolve the correct session info from all of the metadata for this conversion const sessionInfo = { @@ -197,7 +197,7 @@ export class Page extends LitElement { const result = await runConversion( { - output_folder: conversionOptions.stub_test ? preview_output_folder : conversion_output_folder, + output_folder: conversionOptions.stub_test ? undefined : conversion_output_folder, project_name: name, nwbfile_path: file, overwrite: true, // We assume override is true because the native NWB file dialog will not allow the user to select an existing file (unless they approve the overwrite) diff --git a/src/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js b/src/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js index 5072e3799..38265cd3a 100644 --- a/src/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js +++ b/src/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js @@ -7,10 +7,7 @@ import { validateOnChange } from "../../../../validation/index.js"; import projectGeneralSchema from "../../../../../../../schemas/json/project/general.json" assert { type: "json" }; import projectGlobalSchema from "../../../../../../../schemas/json/project/globals.json" assert { type: "json" }; import { merge } from "../../utils.js"; -import { schemaToPages } from "../../FormPage.js"; import { onThrow } from "../../../../errors"; - -import { globalSchema } from "../../../../../../../schemas/base-metadata.schema"; import { header } from "../../../forms/utils"; const projectMetadataSchema = merge(projectGlobalSchema, projectGeneralSchema); @@ -81,7 +78,7 @@ export class GuidedNewDatasetPage extends Page { const schema = { ...projectMetadataSchema }; schema.properties = { ...schema.properties }; - this.state = merge(global.data.output_locations, structuredClone(this.info.globalState.project)); + this.state = merge(global.data, structuredClone(this.info.globalState.project)); this.form = new JSONSchemaForm({ schema, diff --git a/src/renderer/src/stories/pages/settings/SettingsPage.js b/src/renderer/src/stories/pages/settings/SettingsPage.js index 749f6368a..3266bc508 100644 --- a/src/renderer/src/stories/pages/settings/SettingsPage.js +++ b/src/renderer/src/stories/pages/settings/SettingsPage.js @@ -7,13 +7,20 @@ import projectGlobalSchema from "../../../../../../schemas/json/project/globals. import { validateDANDIApiKey } from "../../../validation/dandi"; -const schema = { - properties: { - output_locations: projectGlobalSchema, - DANDI: dandiGlobalSchema, +const schema = merge( + projectGlobalSchema, + { + properties: { + DANDI: dandiGlobalSchema, + }, + required: ["DANDI"], }, - required: ["output_locations", "DANDI"], -}; + { + arrays: true, + } +); + +console.log(schema); import { Button } from "../../Button.js"; import { global } from "../../../progress/index.js"; diff --git a/src/renderer/src/validation/validation.json b/src/renderer/src/validation/validation.json index dcf15ec17..af88a8690 100644 --- a/src/renderer/src/validation/validation.json +++ b/src/renderer/src/validation/validation.json @@ -3,7 +3,6 @@ "name": false, "conversion_output_folder": false, - "preview_output_folder": false, "NWBFile": { "identifier": false,