diff --git a/.gitignore b/.gitignore index a4eeb5ccd..865e043ba 100644 --- a/.gitignore +++ b/.gitignore @@ -13,8 +13,7 @@ coverage # Ignore node_modules folder node_modules build/api -pyflask/ds -src/Users +src/pyflask/ds semantic semantic.json .env @@ -22,7 +21,6 @@ build/ yarn.lock *.pyc -src/.DS_Store .DS_Store electron-builder.yml website/.eslintcache diff --git a/README.md b/README.md index c0eaf5f4e..bf95742c4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- NeuroConv logo + NeuroConv logo

NWB Graphical User Interface for Data Entry

Full Tests diff --git a/demos/sse/test_sse_display_of_tqdm.py b/demos/sse/test_sse_display_of_tqdm.py index b32452bd6..9292dfcc0 100644 --- a/demos/sse/test_sse_display_of_tqdm.py +++ b/demos/sse/test_sse_display_of_tqdm.py @@ -8,7 +8,7 @@ from flask import Flask, Response, render_template from tqdm import tqdm as base_tqdm -SCRIPT_DIR = os.path.dirname(os.path.abspath(os.path.join(__file__, "..", "..", "pyflask"))) +SCRIPT_DIR = os.path.dirname(os.path.abspath(os.path.join(__file__, "..", "..", "src", "pyflask"))) sys.path.append(os.path.dirname(SCRIPT_DIR)) from pyflask.manageNeuroconv.info.sse import MessageAnnouncer diff --git a/docs/developer_guide.rst b/docs/developer_guide.rst index 32e99f6fb..208b730ce 100644 --- a/docs/developer_guide.rst +++ b/docs/developer_guide.rst @@ -83,15 +83,20 @@ You can now run the following command to start the application using Electron. Repo Structure -------------- -1. **src/renderer/src** - Contains all the source code for the frontend - - `index.js` - The entry point for the application - - `pages.js` - The main code that controls which pages are rendered and how they are linked together - - `stories` - Contains all the Web Components and related Storybook stories - - `electron` - Contains all the Electron-related code to enable conditional inclusion for development mode -2. **src/renderer/assets** - Contains all the frontend-facing assets (e.g. images, css, etc.) -3. **pyflask** - Contains all the source code for the backend - - +- `src` + - `electron` + - `main` + - `src` - Contains all the source code for the backend + - `assets` - Contains all the backend-facing assets (e.g. images, css, etc.) + - `renderer` + - `src` - Contains all the source code for the frontend + - `index.js` - The entry point for the application + - `pages.js` - The main code that controls which pages are rendered and how they are linked together + - `stories` - Contains all the Web Components and related Storybook stories + - `electron` - Contains all the Electron-related code to enable conditional inclusion for development mode + - `assets` - Contains all the frontend-facing assets (e.g. images, css, etc.) + - `pyflask` - Contains all the source code for the backend + - `schemas` - Contains all the JSON schemas used for validation Starting a New Feature diff --git a/docs/index.rst b/docs/index.rst index a4333737f..2fb04c252 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,7 +2,7 @@ NWB GUIDE documentation ======================= | -.. image:: ../src/renderer/assets/img/logo-guide-draft-transparent-tight.png +.. image:: ../src/electron/renderer/assets/img/logo-guide-draft-transparent-tight.png :scale: 50 % :align: center :alt: NWB GUIDE logo diff --git a/electron.vite.config.js b/electron.vite.config.js index b2a3ce048..7a37df2e7 100644 --- a/electron.vite.config.js +++ b/electron.vite.config.js @@ -2,11 +2,41 @@ import { defineConfig } from "electron-vite"; import ViteYaml from "@modyfi/vite-plugin-yaml"; -// electron.vite.config.js +import { resolve } from "path"; + +const htmlRoot = "src/electron/renderer"; + export default defineConfig({ - main: {}, - preload: {}, + main: { + build: { + rollupOptions: { + input: { + index: resolve(__dirname, "src/electron/main/main.ts"), + }, + }, + }, + }, + preload: { + build: { + rollupOptions: { + input: { + index: resolve(__dirname, "src/electron/preload/preload.js"), + }, + }, + }, + }, renderer: { + root: `./${htmlRoot}`, plugins: [ViteYaml()], + build: { + rollupOptions: { + input: { + index: resolve(__dirname, htmlRoot, "index.html"), + }, + output: { + dir: resolve(__dirname, "build", "renderer"), + }, + }, + }, }, }); diff --git a/environments/environment-Linux.yml b/environments/environment-Linux.yml index a00457ce8..54b78ea4e 100644 --- a/environments/environment-Linux.yml +++ b/environments/environment-Linux.yml @@ -4,14 +4,12 @@ channels: - defaults dependencies: - python = 3.9.18 - - PyInstaller = 6.3.0 - nodejs = 18.16.1 - numcodecs = 0.11.0 # install these from conda-forge so that dependent packages get included in the distributable - jsonschema = 4.18.0 # installs jsonschema-specifications - pip - pip: - - pyinstaller-hooks-contrib == 2024.2 # Fix needed for pydantic v2; otherwise imports pydantic.compiled - chardet == 5.1.0 - configparser == 6.0.0 - flask == 2.3.2 diff --git a/environments/environment-MAC-apple-silicon.yml b/environments/environment-MAC-apple-silicon.yml index bb5fa47c7..3100f7f76 100644 --- a/environments/environment-MAC-apple-silicon.yml +++ b/environments/environment-MAC-apple-silicon.yml @@ -4,7 +4,6 @@ channels: - defaults dependencies: - python = 3.9.18 - - PyInstaller = 6.3.0 - nodejs = 18.16.1 - numcodecs = 0.11.0 - lxml = 4.9.3 # pypi build fails due to x64/arm64 mismatch so install from conda-forge @@ -15,6 +14,8 @@ dependencies: - jsonschema = 4.18.0 # installs jsonschema-specifications - pip - pip: + - setuptools==70.0.0 + - PyInstaller==6.7.0 - chardet == 5.1.0 - configparser == 6.0.0 - flask == 2.3.2 diff --git a/environments/environment-MAC-intel.yml b/environments/environment-MAC-intel.yml index b8c7d3146..7e5933c15 100644 --- a/environments/environment-MAC-intel.yml +++ b/environments/environment-MAC-intel.yml @@ -4,13 +4,14 @@ channels: - defaults dependencies: - python = 3.9.18 - - PyInstaller = 6.3.0 - nodejs = 18.16.1 - numcodecs = 0.11.0 # install these from conda-forge so that dependent packages get included in the distributable - jsonschema = 4.18.0 # installs jsonschema-specifications - pip - pip: + - setuptools==70.0.0 + - PyInstaller==6.7.0 - scipy<1.12.0 # Fix needed for scipy._lib._testutils - chardet == 5.1.0 - configparser == 6.0.0 diff --git a/environments/environment-Windows.yml b/environments/environment-Windows.yml index 337236d9a..10bef56c9 100644 --- a/environments/environment-Windows.yml +++ b/environments/environment-Windows.yml @@ -5,13 +5,14 @@ channels: dependencies: - python = 3.9.17 - nodejs = 18.16.1 - - PyInstaller = 6.3.0 - pywin32 = 303 - git = 2.20.1 - setuptools = 58.0.4 - pip - pip: - - pyinstaller-hooks-contrib == 2024.2 # Fix needed for pydantic v2; otherwise imports pydantic.compiled + - setuptools==70.0.0 + - PyInstaller==6.7.0 + - pyinstaller-hooks-contrib == 2024.6 # Fix needed for pydantic v2; otherwise imports pydantic.compiled - chardet == 5.1.0 - configparser == 6.0.0 - flask == 2.3.2 diff --git a/generateInterfaceSchema.py b/generateInterfaceSchema.py index f63eb41f4..279c450b7 100644 --- a/generateInterfaceSchema.py +++ b/generateInterfaceSchema.py @@ -3,16 +3,16 @@ from neuroconv import NWBConverter, converters, datainterfaces -filepath = Path("guideGlobalMetadata.json") +filepath = Path("src") / "supported_interfaces.json" generatedJSONSchemaPath = Path("schemas", "json", "generated") generatedJSONSchemaPath.mkdir(exist_ok=True, parents=True) f = filepath.open() -data = json.load(f) +supported_interfaces = json.load(f) # Create JSON for the Schema paths = {} -for interface in data["supported_interfaces"]: +for interface in supported_interfaces: interface_class_dict = {interface: interface} class CustomNWBConverter(NWBConverter): @@ -29,7 +29,7 @@ class CustomNWBConverter(NWBConverter): outfile.write(json.dumps(schema, indent=4)) -sourceDataStoryPath = Path("src/renderer/src/stories/pages/guided-mode/SourceData.stories.js") +sourceDataStoryPath = Path("src/electron/renderer/src/stories/pages/guided-mode/SourceData.stories.js") importCode = "\n".join(map(lambda arr: f"import {arr[0]}Schema from '../../../../../../{arr[1]}'", paths.items())) storyCode = "\n".join( diff --git a/guideGlobalMetadata.json b/guideGlobalMetadata.json deleted file mode 100644 index 35d366f0e..000000000 --- a/guideGlobalMetadata.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "supported_interfaces": [ - "SpikeGLXRecordingInterface", - "SpikeGLXNIDQInterface", - "PhySortingInterface", - "NeuroScopeRecordingInterface", - "NeuroScopeLFPInterface", - "NeuroScopeSortingInterface", - "BiocamRecordingInterface", - "IntanRecordingInterface", - "OpenEphysRecordingInterface", - "BlackrockRecordingInterface", - "BlackrockSortingInterface", - "CellExplorerSortingInterface", - "KiloSortSortingInterface", - "TdtRecordingInterface", - "Spike2RecordingInterface", - "BrukerTiffSinglePlaneImagingInterface", - "ExtractSegmentationInterface", - "CnmfeSegmentationInterface", - "BrukerTiffMultiPlaneImagingInterface", - "MicroManagerTiffImagingInterface", - "ScanImageImagingInterface", - "TiffImagingInterface", - "MiniscopeImagingInterface", - "SbxImagingInterface", - "CaimanSegmentationInterface", - "MCSRawRecordingInterface", - "MEArecRecordingInterface", - "PlexonRecordingInterface", - "PlexonSortingInterface", - "AxonaRecordingInterface", - "VideoInterface", - "NeuralynxRecordingInterface", - "Suite2pSegmentationInterface", - "AlphaOmegaRecordingInterface", - "AlphaOmegaRecordingInterface", - "DeepLabCutInterface", - "SLEAPInterface", - "FicTracDataInterface", - "AudioInterface", - "MiniscopeBehaviorInterface", - "EDFRecordingInterface", - "SpikeGLXConverterPipe", - "BrukerTiffSinglePlaneConverter", - "BrukerTiffMultiPlaneConverter", - "MiniscopeConverter", - "CellExplorerRecordingInterface" - ] -} diff --git a/guide_testing_suite.yml b/guide_testing_suite.yml deleted file mode 100644 index cec3c8a39..000000000 --- a/guide_testing_suite.yml +++ /dev/null @@ -1,168 +0,0 @@ -# Follows pattern -# pipelines: -# pipeline_name: -# test: Optional[bool] -# metadata: -# key: -# name: value -# array: -# - First value -# - Second value -# interfaces: -# DataInterfaceName: -# file_or_folder_path: -# other_source_data_inputs: -# AdditionalDataInterface: ... - -# NOTE: Can also just provide interfaces directly below pipeline name - -pipelines: - - SpikeGLX-Phy: - SpikeGLXRecordingInterface: - file_path: ephy_testing_data/spikeglx/Noise4Sam_g0/Noise4Sam_g0_imec0/Noise4Sam_g0_t0.imec0.ap.bin - PhySortingInterface: - folder_path: ephy_testing_data/phy/phy_example_0 - - - SpikeGLX_v1_SingleProbe_AP: - SpikeGLXRecordingInterface: - file_path: ephy_testing_data/spikeglx/Noise4Sam_g0/Noise4Sam_g0_imec0/Noise4Sam_g0_t0.imec0.ap.bin - - - SpikeGLXConverter-Phy: - SpikeGLXConverterPipe: - folder_path: ephy_testing_data/spikeglx/Noise4Sam_g0 - PhySortingInterface: - folder_path: ephy_testing_data/phy/phy_example_0 - - - Suite2P_SinglePlane_SingleChannel: - metadata: - NWBFile: - session_start_time: 2024-05-09T00:00 - Ophys: - ImagingPlane: - - - excitation_lambda: NaN - optical_channel: - - - emission_lambda: NaN - - interfaces: - Suite2pSegmentationInterface: - folder_path: ophys_testing_data/segmentation_datasets/suite2p - - Caiman_SinglePlane_SingleChannel: - metadata: - NWBFile: - session_start_time: 2024-05-09T00:00 - Ophys: - ImagingPlane: - - - excitation_lambda: NaN - optical_channel: - - - emission_lambda: NaN - - interfaces: - CaimanSegmentationInterface: - file_path: ophys_testing_data/segmentation_datasets/caiman/caiman_analysis.hdf5 - - ScanImage_SinglePlane_SingleChannel: - - metadata: - Ophys: - ImagingPlane: - - - excitation_lambda: NaN - optical_channel: - - - emission_lambda: NaN - - interfaces: - ScanImageImagingInterface: - file_path: ophys_testing_data/imaging_datasets/ScanImage/sample_scanimage_version_3_8.tiff - - TDT: - metadata: - NWBFile: - session_start_time: 2024-05-09T00:00 - - interfaces: - TdtRecordingInterface: - folder_path: ephy_testing_data/tdt/aep_05 - gain: 1 - - - CellExplorer: - metadata: - NWBFile: - session_start_time: 2024-05-09T00:00 - - interfaces: - CellExplorerRecordingInterface: - folder_path: ephy_testing_data/cellexplorer/dataset_4/Peter_MS22_180629_110319_concat_stubbed - - CellExplorerUnits: - metadata: - NWBFile: - session_start_time: 2024-05-09T00:00 - - interfaces: - CellExplorerRecordingInterface: - folder_path: ephy_testing_data/cellexplorer/dataset_4/Peter_MS22_180629_110319_concat_stubbed - CellExplorerSortingInterface: - file_path: ephy_testing_data/cellexplorer/dataset_4/Peter_MS22_180629_110319_concat_stubbed/Peter_MS22_180629_110319_concat_stubbed.spikes.cellinfo.mat - - CellExplorerSortingOnly: - metadata: - NWBFile: - session_start_time: 2024-05-09T00:00 - - interfaces: - CellExplorerSortingInterface: - file_path: ephy_testing_data/cellexplorer/dataset_4/Peter_MS22_180629_110319_concat_stubbed/Peter_MS22_180629_110319_concat_stubbed.spikes.cellinfo.mat - - IntanSingleFileRecording: - metadata: - NWBFile: - session_start_time: 2024-05-09T00:00 - Ecephys: - ElectrodeGroup: - - - location: Test location - - - location: Test location - - - location: Test location - - - - interfaces: - IntanRecordingInterface: - file_path: ephy_testing_data/intan/intan_rhd_test_1.rhd - - BrukerTiffMultiChannelSinglePlane: - metadata: - Ophys: - ImagingPlane: - - - excitation_lambda: NaN - optical_channel: - - - emission_lambda: NaN - - interfaces: - BrukerTiffSinglePlaneConverter: - folder_path: ophys_testing_data/imaging_datasets/BrukerTif/NCCR32_2023_02_20_Into_the_void_t_series_baseline-000 - - DeepLabCut: - metadata: - NWBFile: - session_start_time: 2024-05-09T00:00 - - interfaces: - DeepLabCutInterface: - file_path: behavior_testing_data/DLC/m3v1mp4DLC_resnet50_openfieldAug20shuffle1_30000.h5 - config_file_path: behavior_testing_data/DLC/config.yaml diff --git a/nwb-guide.spec b/nwb-guide.spec index 30cf053b7..d4868ee6d 100644 --- a/nwb-guide.spec +++ b/nwb-guide.spec @@ -10,7 +10,7 @@ import scipy from PyInstaller.utils.hooks import collect_data_files from PyInstaller.utils.hooks import collect_all -datas = [('./paths.config.json', '.'), ('./package.json', '.')] +datas = [('./src/paths.config.json', '.'), ('./package.json', '.')] binaries = [] hiddenimports = [ 'email_validator', @@ -53,7 +53,7 @@ block_cipher = None a = Analysis( - [f"{Path('pyflask') / 'app.py'}"], + [f"{Path('src') / 'pyflask' / 'app.py'}"], pathex=[], binaries=binaries, datas=datas, diff --git a/package.json b/package.json index 85f6884b3..17393fe59 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "productName": "NWB GUIDE", "version": "0.0.16", "description": "NWB GUIDE is a desktop app that provides a no-code user interface for converting neurophysiology data to NWB.", - "main": "./build/main/main.js", + "main": "./build/main/index.js", "engine": { "node": ">=18" }, @@ -11,8 +11,8 @@ "start": "electron-vite dev --outDir build", "postinstall": "electron-builder install-app-deps", "dev": "concurrently -n BE,FE --kill-others \"npm run dev:server\" \"npm run dev:app\"", - "dev:app": "vite src/renderer", - "dev:server": "cd pyflask && python -m flask run --port 4242", + "dev:app": "vite src/electron/renderer", + "dev:server": "cd src/pyflask && python -m flask run --port 4242", "build": "npm run build:app", "echo": "python -c \"print('hello')\"", "build:app": "electron-vite build --outDir build", @@ -27,12 +27,12 @@ "test:app": "vitest run --exclude \"**/pipelines.test.ts\"", "test:tutorial": "vitest tutorial", "test:pipelines": "vitest pipelines", - "test:server": "pytest pyflask/tests/ -s -vv", + "test:server": "pytest src/pyflask/tests/ -s -vv", "wait5s": "node -e \"setTimeout(() => process.exit(0),5000)\"", - "test:executable": "concurrently -n EXE,TEST --kill-others --success first \"node tests/testPyinstallerExecutable.js --port 3434 --forever\" \"npm run wait5s && pytest pyflask/tests/ -s --target http://localhost:3434\"", + "test:executable": "concurrently -n EXE,TEST --kill-others --success first \"node tests/testPyinstallerExecutable.js --port 3434 --forever\" \"npm run wait5s && pytest src/pyflask/tests/ -s --target http://localhost:3434\"", "test:coverage": "npm run coverage:app && npm run coverage:server", "coverage:app": "npm run test:app -- --coverage", - "coverage:server": "pytest pyflask/tests/ -s --cov=pyflask --cov-report=xml", + "coverage:server": "pytest src/pyflask/tests/ -s --cov=pyflask --cov-report=xml", "deploy:win": "npm run build && npm run build:flask && npm run deploy:electron:win", "deploy:mac": "npm run build && npm run build:flask && npm run deploy:electron:mac", "deploy:linux": "npm run build && npm run build:flask && npm run deploy:electron:linux", @@ -77,7 +77,7 @@ "win": { "asar": false, "target": "nsis", - "icon": "src/renderer/assets/app-icon/logo-guide-draft.ico", + "icon": "src/electron/renderer/assets/app-icon/logo-guide-draft.ico", "requestedExecutionLevel": "requireAdministrator" }, "mac": { @@ -98,7 +98,7 @@ ] } ], - "icon": "src/renderer/assets/img/logo-guide-draft.png", + "icon": "src/electron/renderer/assets/img/logo-guide-draft.png", "darkModeSupport": false, "hardenedRuntime": true, "gatekeeperAssess": false, @@ -114,7 +114,7 @@ "linux": { "asar": true, "target": "AppImage", - "icon": "src/renderer/assets/img/logo-guide-draft.png", + "icon": "src/electron/renderer/assets/img/logo-guide-draft.png", "extraResources": [ { "from": "./build/flask/nwb-guide", @@ -127,7 +127,7 @@ "oneClick": false, "perMachine": false, "allowToChangeInstallationDirectory": true, - "installerIcon": "src/renderer/assets/app-icon/logo-guide-draft.ico" + "installerIcon": "electron/renderer/assets/app-icon/logo-guide-draft.ico" }, "publish": { "provider": "github" diff --git a/pytest.ini b/pytest.ini index 1a8148077..f8395300f 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,2 +1,2 @@ [pytest] -pythonpath = pyflask/ +pythonpath = src/pyflask/ diff --git a/src/main/application-menu.js b/src/electron/main/application-menu.js similarity index 100% rename from src/main/application-menu.js rename to src/electron/main/application-menu.js diff --git a/src/main/main.ts b/src/electron/main/main.ts similarity index 98% rename from src/main/main.ts rename to src/electron/main/main.ts index a434dcf13..615b41aab 100755 --- a/src/main/main.ts +++ b/src/electron/main/main.ts @@ -19,7 +19,7 @@ import './application-menu.js'; import icon from '../renderer/assets/img/logo-guide-draft.png?asset' import splashHTML from './splash-screen.html?asset' -import preloadUrl from './../preload/preload.js?asset' +import preloadUrl from '../preload/preload.js?asset' const runByTestSuite = !!process.env.VITEST @@ -39,7 +39,7 @@ if (runByTestSuite) { const PYFLASK_BUILD_SUBFOLDER_NAME = 'flask' const PYFLASK_DIST_FOLDER_BASE = path.join('build', PYFLASK_BUILD_SUBFOLDER_NAME) const PY_FLASK_DIST_FOLDER = path.join('..', '..', PYFLASK_DIST_FOLDER_BASE); -const PY_FLASK_FOLDER = path.join('..', '..', "pyflask"); +const PY_FLASK_FOLDER = path.join('..', '..', "src", "pyflask"); const PYINSTALLER_NAME = "nwb-guide" const isWindows = process.platform === 'win32' @@ -304,7 +304,7 @@ function initialize() { // Listen after first load promise.then(() => { const chokidar = require('chokidar'); - chokidar.watch(path.join(__dirname, "../../pyflask"), { + chokidar.watch(path.join(__dirname, PY_FLASK_FOLDER), { ignored: ['**/__pycache__/**'] }).on('all', async (event: string) => { if (event === 'change' && !globals.python.restart) { diff --git a/src/main/splash-screen.html b/src/electron/main/splash-screen.html similarity index 84% rename from src/main/splash-screen.html rename to src/electron/main/splash-screen.html index d40f64b32..b047be8b4 100644 --- a/src/main/splash-screen.html +++ b/src/electron/main/splash-screen.html @@ -12,7 +12,7 @@

diff --git a/src/preload/preload.js b/src/electron/preload/preload.js similarity index 100% rename from src/preload/preload.js rename to src/electron/preload/preload.js diff --git a/src/renderer/assets/app-icon/logo-guide-draft.ico b/src/electron/renderer/assets/app-icon/logo-guide-draft.ico similarity index 100% rename from src/renderer/assets/app-icon/logo-guide-draft.ico rename to src/electron/renderer/assets/app-icon/logo-guide-draft.ico diff --git a/src/renderer/assets/css/demo.css b/src/electron/renderer/assets/css/demo.css similarity index 100% rename from src/renderer/assets/css/demo.css rename to src/electron/renderer/assets/css/demo.css diff --git a/src/renderer/assets/css/fontawesome.css b/src/electron/renderer/assets/css/fontawesome.css similarity index 100% rename from src/renderer/assets/css/fontawesome.css rename to src/electron/renderer/assets/css/fontawesome.css diff --git a/src/renderer/assets/css/global.css b/src/electron/renderer/assets/css/global.css similarity index 100% rename from src/renderer/assets/css/global.css rename to src/electron/renderer/assets/css/global.css diff --git a/src/renderer/assets/css/guided.css b/src/electron/renderer/assets/css/guided.css similarity index 100% rename from src/renderer/assets/css/guided.css rename to src/electron/renderer/assets/css/guided.css diff --git a/src/renderer/assets/css/individualtab.css b/src/electron/renderer/assets/css/individualtab.css similarity index 100% rename from src/renderer/assets/css/individualtab.css rename to src/electron/renderer/assets/css/individualtab.css diff --git a/src/renderer/assets/css/main.css b/src/electron/renderer/assets/css/main.css similarity index 100% rename from src/renderer/assets/css/main.css rename to src/electron/renderer/assets/css/main.css diff --git a/src/renderer/assets/css/main_tabs.css b/src/electron/renderer/assets/css/main_tabs.css similarity index 100% rename from src/renderer/assets/css/main_tabs.css rename to src/electron/renderer/assets/css/main_tabs.css diff --git a/src/renderer/assets/css/nativize.css b/src/electron/renderer/assets/css/nativize.css similarity index 100% rename from src/renderer/assets/css/nativize.css rename to src/electron/renderer/assets/css/nativize.css diff --git a/src/renderer/assets/css/nav.css b/src/electron/renderer/assets/css/nav.css similarity index 100% rename from src/renderer/assets/css/nav.css rename to src/electron/renderer/assets/css/nav.css diff --git a/src/renderer/assets/css/print.css b/src/electron/renderer/assets/css/print.css similarity index 100% rename from src/renderer/assets/css/print.css rename to src/electron/renderer/assets/css/print.css diff --git a/src/renderer/assets/css/section.css b/src/electron/renderer/assets/css/section.css similarity index 100% rename from src/renderer/assets/css/section.css rename to src/electron/renderer/assets/css/section.css diff --git a/src/renderer/assets/css/spur.css b/src/electron/renderer/assets/css/spur.css similarity index 100% rename from src/renderer/assets/css/spur.css rename to src/electron/renderer/assets/css/spur.css diff --git a/src/renderer/assets/css/tablepath.css b/src/electron/renderer/assets/css/tablepath.css similarity index 100% rename from src/renderer/assets/css/tablepath.css rename to src/electron/renderer/assets/css/tablepath.css diff --git a/src/renderer/assets/css/variables.css b/src/electron/renderer/assets/css/variables.css similarity index 100% rename from src/renderer/assets/css/variables.css rename to src/electron/renderer/assets/css/variables.css diff --git a/src/renderer/assets/img/logo-catalystneuro.png b/src/electron/renderer/assets/img/logo-catalystneuro.png similarity index 100% rename from src/renderer/assets/img/logo-catalystneuro.png rename to src/electron/renderer/assets/img/logo-catalystneuro.png diff --git a/src/renderer/assets/img/logo-guide-draft-transparent-tight.png b/src/electron/renderer/assets/img/logo-guide-draft-transparent-tight.png similarity index 100% rename from src/renderer/assets/img/logo-guide-draft-transparent-tight.png rename to src/electron/renderer/assets/img/logo-guide-draft-transparent-tight.png diff --git a/src/renderer/assets/img/logo-guide-draft-transparent.png b/src/electron/renderer/assets/img/logo-guide-draft-transparent.png similarity index 100% rename from src/renderer/assets/img/logo-guide-draft-transparent.png rename to src/electron/renderer/assets/img/logo-guide-draft-transparent.png diff --git a/src/renderer/assets/img/logo-guide-draft.png b/src/electron/renderer/assets/img/logo-guide-draft.png similarity index 100% rename from src/renderer/assets/img/logo-guide-draft.png rename to src/electron/renderer/assets/img/logo-guide-draft.png diff --git a/src/renderer/assets/img/logo-neuroconv.png b/src/electron/renderer/assets/img/logo-neuroconv.png similarity index 100% rename from src/renderer/assets/img/logo-neuroconv.png rename to src/electron/renderer/assets/img/logo-neuroconv.png diff --git a/src/renderer/assets/lotties/contact-us-lotties.js b/src/electron/renderer/assets/lotties/contact-us-lotties.js similarity index 100% rename from src/renderer/assets/lotties/contact-us-lotties.js rename to src/electron/renderer/assets/lotties/contact-us-lotties.js diff --git a/src/renderer/assets/lotties/documentation-lotties.js b/src/electron/renderer/assets/lotties/documentation-lotties.js similarity index 100% rename from src/renderer/assets/lotties/documentation-lotties.js rename to src/electron/renderer/assets/lotties/documentation-lotties.js diff --git a/src/renderer/assets/lotties/index.js b/src/electron/renderer/assets/lotties/index.js similarity index 100% rename from src/renderer/assets/lotties/index.js rename to src/electron/renderer/assets/lotties/index.js diff --git a/src/renderer/assets/lotties/overview-lotties.js b/src/electron/renderer/assets/lotties/overview-lotties.js similarity index 100% rename from src/renderer/assets/lotties/overview-lotties.js rename to src/electron/renderer/assets/lotties/overview-lotties.js diff --git a/src/renderer/index.html b/src/electron/renderer/index.html similarity index 100% rename from src/renderer/index.html rename to src/electron/renderer/index.html diff --git a/src/renderer/src/dependencies/globals.js b/src/electron/renderer/src/dependencies/globals.js similarity index 100% rename from src/renderer/src/dependencies/globals.js rename to src/electron/renderer/src/dependencies/globals.js diff --git a/src/renderer/src/dependencies/simple.js b/src/electron/renderer/src/dependencies/simple.js similarity index 97% rename from src/renderer/src/dependencies/simple.js rename to src/electron/renderer/src/dependencies/simple.js index 69c9bff9f..f29801362 100644 --- a/src/renderer/src/dependencies/simple.js +++ b/src/electron/renderer/src/dependencies/simple.js @@ -1,6 +1,6 @@ import { app, crypto, isElectron } from "../electron/index.js"; import paths from "../../../../paths.config.json" assert { type: "json" }; -import { joinPath } from "../globals.js"; +import { joinPath } from "../globals"; export const reloadPageToHome = () => { if (isStorybook) return; diff --git a/src/renderer/src/electron/check.js b/src/electron/renderer/src/electron/check.js similarity index 100% rename from src/renderer/src/electron/check.js rename to src/electron/renderer/src/electron/check.js diff --git a/src/renderer/src/electron/index.js b/src/electron/renderer/src/electron/index.js similarity index 100% rename from src/renderer/src/electron/index.js rename to src/electron/renderer/src/electron/index.js diff --git a/src/renderer/src/errors.ts b/src/electron/renderer/src/errors.ts similarity index 100% rename from src/renderer/src/errors.ts rename to src/electron/renderer/src/errors.ts diff --git a/src/renderer/src/globals.js b/src/electron/renderer/src/globals.js similarity index 62% rename from src/renderer/src/globals.js rename to src/electron/renderer/src/globals.js index e9d98b013..ff75a0585 100644 --- a/src/renderer/src/globals.js +++ b/src/electron/renderer/src/globals.js @@ -1,6 +1,6 @@ import { path } from "./electron/index.js"; -import guideGlobalMetadata from "../../../guideGlobalMetadata.json" assert { type: "json" }; +import supportedInterfaces from "../../../supported_interfaces.json" assert { type: "json" }; export const joinPath = (...args) => (path ? path.join(...args) : args.filter((str) => str).join("/")); @@ -9,4 +9,4 @@ export let runOnLoad = (fn) => { else window.addEventListener("load", fn); }; -export const supportedInterfaces = guideGlobalMetadata.supported_interfaces; +export { supportedInterfaces }; diff --git a/src/renderer/src/index.ts b/src/electron/renderer/src/index.ts similarity index 97% rename from src/renderer/src/index.ts rename to src/electron/renderer/src/index.ts index 3e25bd909..b3493aa94 100644 --- a/src/renderer/src/index.ts +++ b/src/electron/renderer/src/index.ts @@ -7,12 +7,12 @@ import { Dashboard } from './stories/Dashboard.js' import { notyf, notify -} from './dependencies/globals.js' +} from './dependencies/globals' import Swal from 'sweetalert2' import { loadServerEvents, pythonServerOpened } from "./server/index.js"; -import { statusBar } from "./server/globals.js"; +import { statusBar } from "./server/globals"; // Set the sidebar subtitle to the current app version const dashboard = document.querySelector('nwb-dashboard') as Dashboard diff --git a/src/renderer/src/pages.js b/src/electron/renderer/src/pages.js similarity index 100% rename from src/renderer/src/pages.js rename to src/electron/renderer/src/pages.js diff --git a/src/renderer/src/progress/index.js b/src/electron/renderer/src/progress/index.js similarity index 98% rename from src/renderer/src/progress/index.js rename to src/electron/renderer/src/progress/index.js index 84fc87553..edea2076b 100644 --- a/src/renderer/src/progress/index.js +++ b/src/electron/renderer/src/progress/index.js @@ -10,14 +10,14 @@ import { } from "../dependencies/simple.js"; import { fs, crypto } from "../electron/index.js"; -import { joinPath, runOnLoad } from "../globals.js"; +import { joinPath, runOnLoad } from "../globals"; import { merge } from "../stories/pages/utils.js"; import { updateAppProgress, updateFile } from "./update.js"; import { updateURLParams } from "../../utils/url.js"; -import * as operations from "./operations"; +import * as operations from "./operations.js"; -export * from "./update"; +export * from "./update.js"; const CRYPTO_VERSION = "0.0.1"; // NOTE: Update to wipe values created using an outdated encryption algorithm const CRYPTO_ALGORITHM = "aes-256-cbc"; diff --git a/src/renderer/src/progress/operations.js b/src/electron/renderer/src/progress/operations.js similarity index 100% rename from src/renderer/src/progress/operations.js rename to src/electron/renderer/src/progress/operations.js diff --git a/src/renderer/src/progress/update.js b/src/electron/renderer/src/progress/update.js similarity index 98% rename from src/renderer/src/progress/update.js rename to src/electron/renderer/src/progress/update.js index f0302a0c4..573c95833 100644 --- a/src/renderer/src/progress/update.js +++ b/src/electron/renderer/src/progress/update.js @@ -1,7 +1,7 @@ import { updateURLParams } from "../../utils/url.js"; import { guidedProgressFilePath } from "../dependencies/simple.js"; import { fs } from "../electron/index.js"; -import { joinPath } from "../globals.js"; +import { joinPath } from "../globals"; import { get, hasEntry } from "./index.js"; export const rename = (newDatasetName, previousDatasetName) => { diff --git a/src/renderer/src/promises.ts b/src/electron/renderer/src/promises.ts similarity index 100% rename from src/renderer/src/promises.ts rename to src/electron/renderer/src/promises.ts diff --git a/src/renderer/src/server/globals.ts b/src/electron/renderer/src/server/globals.ts similarity index 100% rename from src/renderer/src/server/globals.ts rename to src/electron/renderer/src/server/globals.ts diff --git a/src/renderer/src/server/index.ts b/src/electron/renderer/src/server/index.ts similarity index 96% rename from src/renderer/src/server/index.ts rename to src/electron/renderer/src/server/index.ts index c6363216d..62dba82f2 100644 --- a/src/renderer/src/server/index.ts +++ b/src/electron/renderer/src/server/index.ts @@ -3,11 +3,11 @@ const { ipcRenderer } = electron; import { notyf, -} from '../dependencies/globals.js' +} from '../dependencies/globals' import Swal from 'sweetalert2' -import { activateServer, baseUrl, statusBar } from './globals.js'; +import { activateServer, baseUrl, statusBar } from './globals'; // Check if the Flask server is live const serverIsLiveStartup = async () => { diff --git a/src/renderer/src/stories/Accordion.js b/src/electron/renderer/src/stories/Accordion.js similarity index 100% rename from src/renderer/src/stories/Accordion.js rename to src/electron/renderer/src/stories/Accordion.js diff --git a/src/renderer/src/stories/Accordion.stories.js b/src/electron/renderer/src/stories/Accordion.stories.js similarity index 100% rename from src/renderer/src/stories/Accordion.stories.js rename to src/electron/renderer/src/stories/Accordion.stories.js diff --git a/src/renderer/src/stories/BasicTable.js b/src/electron/renderer/src/stories/BasicTable.js similarity index 100% rename from src/renderer/src/stories/BasicTable.js rename to src/electron/renderer/src/stories/BasicTable.js diff --git a/src/renderer/src/stories/Button.js b/src/electron/renderer/src/stories/Button.js similarity index 100% rename from src/renderer/src/stories/Button.js rename to src/electron/renderer/src/stories/Button.js diff --git a/src/renderer/src/stories/Button.stories.js b/src/electron/renderer/src/stories/Button.stories.js similarity index 100% rename from src/renderer/src/stories/Button.stories.js rename to src/electron/renderer/src/stories/Button.stories.js diff --git a/src/renderer/src/stories/Chevron.js b/src/electron/renderer/src/stories/Chevron.js similarity index 100% rename from src/renderer/src/stories/Chevron.js rename to src/electron/renderer/src/stories/Chevron.js diff --git a/src/renderer/src/stories/CodeBlock.js b/src/electron/renderer/src/stories/CodeBlock.js similarity index 100% rename from src/renderer/src/stories/CodeBlock.js rename to src/electron/renderer/src/stories/CodeBlock.js diff --git a/src/renderer/src/stories/DandiResults.js b/src/electron/renderer/src/stories/DandiResults.js similarity index 100% rename from src/renderer/src/stories/DandiResults.js rename to src/electron/renderer/src/stories/DandiResults.js diff --git a/src/renderer/src/stories/Dashboard.js b/src/electron/renderer/src/stories/Dashboard.js similarity index 97% rename from src/renderer/src/stories/Dashboard.js rename to src/electron/renderer/src/stories/Dashboard.js index e56b50273..3ba92c90f 100644 --- a/src/renderer/src/stories/Dashboard.js +++ b/src/electron/renderer/src/stories/Dashboard.js @@ -15,22 +15,22 @@ import "../../assets/css/demo.css"; import "../../assets/css/individualtab.css"; import "../../assets/css/main_tabs.css"; // import "../../node_modules/cropperjs/dist/cropper.css" -import "../../../../node_modules/notyf/notyf.min.css"; +import "../../../../../node_modules/notyf/notyf.min.css"; import "../../assets/css/spur.css"; import "../../assets/css/main.css"; // import "https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" -import "../../../../node_modules/@fortawesome/fontawesome-free/css/all.css"; +import "../../../../../node_modules/@fortawesome/fontawesome-free/css/all.css"; // import "../../node_modules/select2/dist/css/select2.min.css" // import "../../node_modules/@toast-ui/editor/dist/toastui-editor.css" // import "../../node_modules/codemirror/lib/codemirror.css" // import "../../node_modules/@yaireo/tagify/dist/tagify.css" -import "../../../../node_modules/fomantic-ui/dist/semantic.min.css"; -import "../../../../node_modules/fomantic-ui/dist/components/accordion.min.css"; -import "../../../../node_modules/@sweetalert2/theme-bulma/bulma.css"; +import "../../../../../node_modules/fomantic-ui/dist/semantic.min.css"; +import "../../../../../node_modules/fomantic-ui/dist/components/accordion.min.css"; +import "../../../../../node_modules/@sweetalert2/theme-bulma/bulma.css"; // import "../../node_modules/intro.js/minified/introjs.min.css" import "../../assets/css/guided.css"; import isElectron from "../electron/check.js"; -import { isStorybook, reloadPageToHome } from "../dependencies/globals.js"; +import { isStorybook, reloadPageToHome } from "../dependencies/globals"; import { getCurrentProjectName, updateAppProgress } from "../progress/index.js"; // import "https://jsuites.net/v4/jsuites.js" diff --git a/src/renderer/src/stories/DateTimeSelector.js b/src/electron/renderer/src/stories/DateTimeSelector.js similarity index 100% rename from src/renderer/src/stories/DateTimeSelector.js rename to src/electron/renderer/src/stories/DateTimeSelector.js diff --git a/src/renderer/src/stories/FileSystemSelector.js b/src/electron/renderer/src/stories/FileSystemSelector.js similarity index 99% rename from src/renderer/src/stories/FileSystemSelector.js rename to src/electron/renderer/src/stories/FileSystemSelector.js index 5e33c5be8..8fa45febf 100644 --- a/src/renderer/src/stories/FileSystemSelector.js +++ b/src/electron/renderer/src/stories/FileSystemSelector.js @@ -4,7 +4,7 @@ import { fs, remote } from "../electron/index"; import { List } from "./List"; const { dialog } = remote; -import restartSVG from "../stories/assets/restart.svg?raw"; +import restartSVG from "./assets/restart.svg?raw"; import { unsafeSVG } from "lit/directives/unsafe-svg.js"; function getObjectTypeReferenceString(type, multiple, { nested, native } = {}) { diff --git a/src/renderer/src/stories/FileSystemSelector.stories.js b/src/electron/renderer/src/stories/FileSystemSelector.stories.js similarity index 100% rename from src/renderer/src/stories/FileSystemSelector.stories.js rename to src/electron/renderer/src/stories/FileSystemSelector.stories.js diff --git a/src/renderer/src/stories/Footer.js b/src/electron/renderer/src/stories/Footer.js similarity index 100% rename from src/renderer/src/stories/Footer.js rename to src/electron/renderer/src/stories/Footer.js diff --git a/src/renderer/src/stories/FullScreenToggle.ts b/src/electron/renderer/src/stories/FullScreenToggle.ts similarity index 100% rename from src/renderer/src/stories/FullScreenToggle.ts rename to src/electron/renderer/src/stories/FullScreenToggle.ts diff --git a/src/renderer/src/stories/InfoBox.js b/src/electron/renderer/src/stories/InfoBox.js similarity index 100% rename from src/renderer/src/stories/InfoBox.js rename to src/electron/renderer/src/stories/InfoBox.js diff --git a/src/renderer/src/stories/InstanceManager.js b/src/electron/renderer/src/stories/InstanceManager.js similarity index 100% rename from src/renderer/src/stories/InstanceManager.js rename to src/electron/renderer/src/stories/InstanceManager.js diff --git a/src/renderer/src/stories/InstanceManager.stories.js b/src/electron/renderer/src/stories/InstanceManager.stories.js similarity index 100% rename from src/renderer/src/stories/InstanceManager.stories.js rename to src/electron/renderer/src/stories/InstanceManager.stories.js diff --git a/src/renderer/src/stories/Introduction.mdx b/src/electron/renderer/src/stories/Introduction.mdx similarity index 100% rename from src/renderer/src/stories/Introduction.mdx rename to src/electron/renderer/src/stories/Introduction.mdx diff --git a/src/renderer/src/stories/JSONSchemaForm.js b/src/electron/renderer/src/stories/JSONSchemaForm.js similarity index 100% rename from src/renderer/src/stories/JSONSchemaForm.js rename to src/electron/renderer/src/stories/JSONSchemaForm.js diff --git a/src/renderer/src/stories/JSONSchemaForm.stories.js b/src/electron/renderer/src/stories/JSONSchemaForm.stories.js similarity index 100% rename from src/renderer/src/stories/JSONSchemaForm.stories.js rename to src/electron/renderer/src/stories/JSONSchemaForm.stories.js diff --git a/src/renderer/src/stories/JSONSchemaInput.js b/src/electron/renderer/src/stories/JSONSchemaInput.js similarity index 100% rename from src/renderer/src/stories/JSONSchemaInput.js rename to src/electron/renderer/src/stories/JSONSchemaInput.js diff --git a/src/renderer/src/stories/List.stories.js b/src/electron/renderer/src/stories/List.stories.js similarity index 100% rename from src/renderer/src/stories/List.stories.js rename to src/electron/renderer/src/stories/List.stories.js diff --git a/src/renderer/src/stories/List.ts b/src/electron/renderer/src/stories/List.ts similarity index 100% rename from src/renderer/src/stories/List.ts rename to src/electron/renderer/src/stories/List.ts diff --git a/src/renderer/src/stories/Loader.ts b/src/electron/renderer/src/stories/Loader.ts similarity index 100% rename from src/renderer/src/stories/Loader.ts rename to src/electron/renderer/src/stories/Loader.ts diff --git a/src/renderer/src/stories/Main.js b/src/electron/renderer/src/stories/Main.js similarity index 99% rename from src/renderer/src/stories/Main.js rename to src/electron/renderer/src/stories/Main.js index 9a68987cd..616bfd449 100644 --- a/src/renderer/src/stories/Main.js +++ b/src/electron/renderer/src/stories/Main.js @@ -1,6 +1,6 @@ import { LitElement, html } from "lit"; import useGlobalStyles from "./utils/useGlobalStyles.js"; -import { GuidedFooter } from "./pages/guided-mode/GuidedFooter"; +import { GuidedFooter } from "./pages/guided-mode/GuidedFooter.js"; import { GuidedHeader } from "./pages/guided-mode/GuidedHeader.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; diff --git a/src/renderer/src/stories/Modal.ts b/src/electron/renderer/src/stories/Modal.ts similarity index 100% rename from src/renderer/src/stories/Modal.ts rename to src/electron/renderer/src/stories/Modal.ts diff --git a/src/renderer/src/stories/NavigationSidebar.js b/src/electron/renderer/src/stories/NavigationSidebar.js similarity index 100% rename from src/renderer/src/stories/NavigationSidebar.js rename to src/electron/renderer/src/stories/NavigationSidebar.js diff --git a/src/renderer/src/stories/OptionalSection.js b/src/electron/renderer/src/stories/OptionalSection.js similarity index 100% rename from src/renderer/src/stories/OptionalSection.js rename to src/electron/renderer/src/stories/OptionalSection.js diff --git a/src/renderer/src/stories/OptionalSection.stories.js b/src/electron/renderer/src/stories/OptionalSection.stories.js similarity index 100% rename from src/renderer/src/stories/OptionalSection.stories.js rename to src/electron/renderer/src/stories/OptionalSection.stories.js diff --git a/src/renderer/src/stories/Overlay.ts b/src/electron/renderer/src/stories/Overlay.ts similarity index 100% rename from src/renderer/src/stories/Overlay.ts rename to src/electron/renderer/src/stories/Overlay.ts diff --git a/src/renderer/src/stories/ProgressBar.stories.js b/src/electron/renderer/src/stories/ProgressBar.stories.js similarity index 100% rename from src/renderer/src/stories/ProgressBar.stories.js rename to src/electron/renderer/src/stories/ProgressBar.stories.js diff --git a/src/renderer/src/stories/ProgressBar.ts b/src/electron/renderer/src/stories/ProgressBar.ts similarity index 100% rename from src/renderer/src/stories/ProgressBar.ts rename to src/electron/renderer/src/stories/ProgressBar.ts diff --git a/src/renderer/src/stories/Search.js b/src/electron/renderer/src/stories/Search.js similarity index 100% rename from src/renderer/src/stories/Search.js rename to src/electron/renderer/src/stories/Search.js diff --git a/src/renderer/src/stories/Search.stories.js b/src/electron/renderer/src/stories/Search.stories.js similarity index 100% rename from src/renderer/src/stories/Search.stories.js rename to src/electron/renderer/src/stories/Search.stories.js diff --git a/src/renderer/src/stories/SimpleTable.js b/src/electron/renderer/src/stories/SimpleTable.js similarity index 100% rename from src/renderer/src/stories/SimpleTable.js rename to src/electron/renderer/src/stories/SimpleTable.js diff --git a/src/renderer/src/stories/Table.js b/src/electron/renderer/src/stories/Table.js similarity index 100% rename from src/renderer/src/stories/Table.js rename to src/electron/renderer/src/stories/Table.js diff --git a/src/renderer/src/stories/Table.stories.js b/src/electron/renderer/src/stories/Table.stories.js similarity index 100% rename from src/renderer/src/stories/Table.stories.js rename to src/electron/renderer/src/stories/Table.stories.js diff --git a/src/renderer/src/stories/assets/code-brackets.svg b/src/electron/renderer/src/stories/assets/code-brackets.svg similarity index 100% rename from src/renderer/src/stories/assets/code-brackets.svg rename to src/electron/renderer/src/stories/assets/code-brackets.svg diff --git a/src/renderer/src/stories/assets/colors.svg b/src/electron/renderer/src/stories/assets/colors.svg similarity index 100% rename from src/renderer/src/stories/assets/colors.svg rename to src/electron/renderer/src/stories/assets/colors.svg diff --git a/src/renderer/src/stories/assets/comments.svg b/src/electron/renderer/src/stories/assets/comments.svg similarity index 100% rename from src/renderer/src/stories/assets/comments.svg rename to src/electron/renderer/src/stories/assets/comments.svg diff --git a/src/renderer/src/stories/assets/dandi.svg b/src/electron/renderer/src/stories/assets/dandi.svg similarity index 100% rename from src/renderer/src/stories/assets/dandi.svg rename to src/electron/renderer/src/stories/assets/dandi.svg diff --git a/src/renderer/src/stories/assets/delete.svg b/src/electron/renderer/src/stories/assets/delete.svg similarity index 100% rename from src/renderer/src/stories/assets/delete.svg rename to src/electron/renderer/src/stories/assets/delete.svg diff --git a/src/renderer/src/stories/assets/direction.svg b/src/electron/renderer/src/stories/assets/direction.svg similarity index 100% rename from src/renderer/src/stories/assets/direction.svg rename to src/electron/renderer/src/stories/assets/direction.svg diff --git a/src/renderer/src/stories/assets/exploration.svg b/src/electron/renderer/src/stories/assets/exploration.svg similarity index 100% rename from src/renderer/src/stories/assets/exploration.svg rename to src/electron/renderer/src/stories/assets/exploration.svg diff --git a/src/renderer/src/stories/assets/flow.svg b/src/electron/renderer/src/stories/assets/flow.svg similarity index 100% rename from src/renderer/src/stories/assets/flow.svg rename to src/electron/renderer/src/stories/assets/flow.svg diff --git a/src/renderer/src/stories/assets/folder_open.svg b/src/electron/renderer/src/stories/assets/folder_open.svg similarity index 100% rename from src/renderer/src/stories/assets/folder_open.svg rename to src/electron/renderer/src/stories/assets/folder_open.svg diff --git a/src/renderer/src/stories/assets/fullscreen.svg b/src/electron/renderer/src/stories/assets/fullscreen.svg similarity index 100% rename from src/renderer/src/stories/assets/fullscreen.svg rename to src/electron/renderer/src/stories/assets/fullscreen.svg diff --git a/src/renderer/src/stories/assets/fullscreen_exit.svg b/src/electron/renderer/src/stories/assets/fullscreen_exit.svg similarity index 100% rename from src/renderer/src/stories/assets/fullscreen_exit.svg rename to src/electron/renderer/src/stories/assets/fullscreen_exit.svg diff --git a/src/renderer/src/stories/assets/global.svg b/src/electron/renderer/src/stories/assets/global.svg similarity index 100% rename from src/renderer/src/stories/assets/global.svg rename to src/electron/renderer/src/stories/assets/global.svg diff --git a/src/renderer/src/stories/assets/inspect.svg b/src/electron/renderer/src/stories/assets/inspect.svg similarity index 100% rename from src/renderer/src/stories/assets/inspect.svg rename to src/electron/renderer/src/stories/assets/inspect.svg diff --git a/src/renderer/src/stories/assets/key.svg b/src/electron/renderer/src/stories/assets/key.svg similarity index 100% rename from src/renderer/src/stories/assets/key.svg rename to src/electron/renderer/src/stories/assets/key.svg diff --git a/src/renderer/src/stories/assets/neurosift-logo.svg b/src/electron/renderer/src/stories/assets/neurosift-logo.svg similarity index 100% rename from src/renderer/src/stories/assets/neurosift-logo.svg rename to src/electron/renderer/src/stories/assets/neurosift-logo.svg diff --git a/src/renderer/src/stories/assets/plugin.svg b/src/electron/renderer/src/stories/assets/plugin.svg similarity index 100% rename from src/renderer/src/stories/assets/plugin.svg rename to src/electron/renderer/src/stories/assets/plugin.svg diff --git a/src/renderer/src/stories/assets/preview.svg b/src/electron/renderer/src/stories/assets/preview.svg similarity index 100% rename from src/renderer/src/stories/assets/preview.svg rename to src/electron/renderer/src/stories/assets/preview.svg diff --git a/src/renderer/src/stories/assets/python.svg b/src/electron/renderer/src/stories/assets/python.svg similarity index 100% rename from src/renderer/src/stories/assets/python.svg rename to src/electron/renderer/src/stories/assets/python.svg diff --git a/src/renderer/src/stories/assets/repo.svg b/src/electron/renderer/src/stories/assets/repo.svg similarity index 100% rename from src/renderer/src/stories/assets/repo.svg rename to src/electron/renderer/src/stories/assets/repo.svg diff --git a/src/renderer/src/stories/assets/restart.svg b/src/electron/renderer/src/stories/assets/restart.svg similarity index 100% rename from src/renderer/src/stories/assets/restart.svg rename to src/electron/renderer/src/stories/assets/restart.svg diff --git a/src/renderer/src/stories/assets/save.svg b/src/electron/renderer/src/stories/assets/save.svg similarity index 100% rename from src/renderer/src/stories/assets/save.svg rename to src/electron/renderer/src/stories/assets/save.svg diff --git a/src/renderer/src/stories/assets/search.svg b/src/electron/renderer/src/stories/assets/search.svg similarity index 100% rename from src/renderer/src/stories/assets/search.svg rename to src/electron/renderer/src/stories/assets/search.svg diff --git a/src/renderer/src/stories/assets/server.svg b/src/electron/renderer/src/stories/assets/server.svg similarity index 100% rename from src/renderer/src/stories/assets/server.svg rename to src/electron/renderer/src/stories/assets/server.svg diff --git a/src/renderer/src/stories/assets/settings.svg b/src/electron/renderer/src/stories/assets/settings.svg similarity index 100% rename from src/renderer/src/stories/assets/settings.svg rename to src/electron/renderer/src/stories/assets/settings.svg diff --git a/src/renderer/src/stories/assets/stackalt.svg b/src/electron/renderer/src/stories/assets/stackalt.svg similarity index 100% rename from src/renderer/src/stories/assets/stackalt.svg rename to src/electron/renderer/src/stories/assets/stackalt.svg diff --git a/src/renderer/src/stories/assets/web_asset.svg b/src/electron/renderer/src/stories/assets/web_asset.svg similarity index 100% rename from src/renderer/src/stories/assets/web_asset.svg rename to src/electron/renderer/src/stories/assets/web_asset.svg diff --git a/src/renderer/src/stories/assets/wifi.svg b/src/electron/renderer/src/stories/assets/wifi.svg similarity index 100% rename from src/renderer/src/stories/assets/wifi.svg rename to src/electron/renderer/src/stories/assets/wifi.svg diff --git a/src/renderer/src/stories/forms/GlobalFormModal.ts b/src/electron/renderer/src/stories/forms/GlobalFormModal.ts similarity index 97% rename from src/renderer/src/stories/forms/GlobalFormModal.ts rename to src/electron/renderer/src/stories/forms/GlobalFormModal.ts index ccfbf55e5..866a63974 100644 --- a/src/renderer/src/stories/forms/GlobalFormModal.ts +++ b/src/electron/renderer/src/stories/forms/GlobalFormModal.ts @@ -1,7 +1,7 @@ import { Modal } from "../Modal" import { Page } from "../pages/Page.js" -import { Button } from "../Button" -import { JSONSchemaForm } from "../JSONSchemaForm" +import { Button } from "../Button.js" +import { JSONSchemaForm } from "../JSONSchemaForm.js" import { onThrow } from "../../errors"; import { merge } from "../pages/utils.js"; diff --git a/src/renderer/src/stories/forms/utils.ts b/src/electron/renderer/src/stories/forms/utils.ts similarity index 100% rename from src/renderer/src/stories/forms/utils.ts rename to src/electron/renderer/src/stories/forms/utils.ts diff --git a/src/renderer/src/stories/globals.js b/src/electron/renderer/src/stories/globals.js similarity index 100% rename from src/renderer/src/stories/globals.js rename to src/electron/renderer/src/stories/globals.js diff --git a/src/renderer/src/stories/hot.js b/src/electron/renderer/src/stories/hot.js similarity index 100% rename from src/renderer/src/stories/hot.js rename to src/electron/renderer/src/stories/hot.js diff --git a/src/renderer/src/stories/instances/item.ts b/src/electron/renderer/src/stories/instances/item.ts similarity index 100% rename from src/renderer/src/stories/instances/item.ts rename to src/electron/renderer/src/stories/instances/item.ts diff --git a/src/renderer/src/stories/multiselect/MultiSelectForm.js b/src/electron/renderer/src/stories/multiselect/MultiSelectForm.js similarity index 100% rename from src/renderer/src/stories/multiselect/MultiSelectForm.js rename to src/electron/renderer/src/stories/multiselect/MultiSelectForm.js diff --git a/src/renderer/src/stories/multiselect/Multiselect.stories.js b/src/electron/renderer/src/stories/multiselect/Multiselect.stories.js similarity index 100% rename from src/renderer/src/stories/multiselect/Multiselect.stories.js rename to src/electron/renderer/src/stories/multiselect/Multiselect.stories.js diff --git a/src/renderer/src/stories/pages/FormPage.js b/src/electron/renderer/src/stories/pages/FormPage.js similarity index 98% rename from src/renderer/src/stories/pages/FormPage.js rename to src/electron/renderer/src/stories/pages/FormPage.js index 8930e8d17..7791c46ec 100644 --- a/src/renderer/src/stories/pages/FormPage.js +++ b/src/electron/renderer/src/stories/pages/FormPage.js @@ -3,7 +3,7 @@ import { JSONSchemaForm } from "../JSONSchemaForm.js"; import { Page } from "./Page.js"; import { validateOnChange } from "../../validation/index.js"; import { onThrow } from "../../errors"; -import { merge } from "./utils.js"; +import { merge } from "./utils"; export function schemaToPages(schema, globalStatePath, options, transformationCallback = (info) => info) { return Object.entries(schema.properties) diff --git a/src/renderer/src/stories/pages/Page.js b/src/electron/renderer/src/stories/pages/Page.js similarity index 99% rename from src/renderer/src/stories/pages/Page.js rename to src/electron/renderer/src/stories/pages/Page.js index 0674806bd..a4613c31c 100644 --- a/src/renderer/src/stories/pages/Page.js +++ b/src/electron/renderer/src/stories/pages/Page.js @@ -1,8 +1,8 @@ import { LitElement, html } from "lit"; import { runConversion } from "./guided-mode/options/utils.js"; import { get, save } from "../../progress/index.js"; -import { dismissNotification, isStorybook, notify } from "../../dependencies/globals.js"; -import { randomizeElements, mapSessions, merge } from "./utils.js"; +import { dismissNotification, isStorybook, notify } from "../../dependencies/globals"; +import { randomizeElements, mapSessions, merge } from "./utils"; import { resolveMetadata } from "./guided-mode/data/utils.js"; import Swal from "sweetalert2"; diff --git a/src/renderer/src/stories/pages/Pages.stories.js b/src/electron/renderer/src/stories/pages/Pages.stories.js similarity index 100% rename from src/renderer/src/stories/pages/Pages.stories.js rename to src/electron/renderer/src/stories/pages/Pages.stories.js diff --git a/src/renderer/src/stories/pages/Unsafe.js b/src/electron/renderer/src/stories/pages/Unsafe.js similarity index 100% rename from src/renderer/src/stories/pages/Unsafe.js rename to src/electron/renderer/src/stories/pages/Unsafe.js diff --git a/src/renderer/src/stories/pages/contact-us/Contact.js b/src/electron/renderer/src/stories/pages/contact-us/Contact.js similarity index 96% rename from src/renderer/src/stories/pages/contact-us/Contact.js rename to src/electron/renderer/src/stories/pages/contact-us/Contact.js index 19764056a..7d4ca7c9b 100644 --- a/src/renderer/src/stories/pages/contact-us/Contact.js +++ b/src/electron/renderer/src/stories/pages/contact-us/Contact.js @@ -2,7 +2,7 @@ import { html } from "lit"; import { contact_lottie } from "../../../../assets/lotties/contact-us-lotties.js"; import { Page } from "../Page.js"; -import { startLottie } from "../../../dependencies/globals.js"; +import { startLottie } from "../../../dependencies/globals"; export class ContactPage extends Page { header = { diff --git a/src/renderer/src/stories/pages/documentation/Documentation.js b/src/electron/renderer/src/stories/pages/documentation/Documentation.js similarity index 98% rename from src/renderer/src/stories/pages/documentation/Documentation.js rename to src/electron/renderer/src/stories/pages/documentation/Documentation.js index cb271ab8e..78d8713d9 100644 --- a/src/renderer/src/stories/pages/documentation/Documentation.js +++ b/src/electron/renderer/src/stories/pages/documentation/Documentation.js @@ -2,7 +2,7 @@ import { html } from "lit"; import { docu_lottie } from "../../../../assets/lotties/documentation-lotties.js"; import { Page } from "../Page.js"; -import { startLottie } from "../../../dependencies/globals.js"; +import { startLottie } from "../../../dependencies/globals"; import { Button } from "../../Button.js"; diff --git a/src/renderer/src/stories/pages/getting-started/GettingStarted.js b/src/electron/renderer/src/stories/pages/getting-started/GettingStarted.js similarity index 98% rename from src/renderer/src/stories/pages/getting-started/GettingStarted.js rename to src/electron/renderer/src/stories/pages/getting-started/GettingStarted.js index 075f27dc1..ae930edd9 100644 --- a/src/renderer/src/stories/pages/getting-started/GettingStarted.js +++ b/src/electron/renderer/src/stories/pages/getting-started/GettingStarted.js @@ -2,7 +2,7 @@ import { html } from "lit"; import { column1Lottie, column2Lottie, column3Lottie } from "../../../../assets/lotties/overview-lotties.js"; import { Page } from "../Page.js"; -import { startLottie } from "../../../dependencies/globals.js"; +import { startLottie } from "../../../dependencies/globals"; export class GettingStartedPage extends Page { constructor(...args) { diff --git a/src/renderer/src/stories/pages/globals.js b/src/electron/renderer/src/stories/pages/globals.js similarity index 100% rename from src/renderer/src/stories/pages/globals.js rename to src/electron/renderer/src/stories/pages/globals.js diff --git a/src/renderer/src/stories/pages/guided-mode/GuidedFooter.js b/src/electron/renderer/src/stories/pages/guided-mode/GuidedFooter.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/GuidedFooter.js rename to src/electron/renderer/src/stories/pages/guided-mode/GuidedFooter.js diff --git a/src/renderer/src/stories/pages/guided-mode/GuidedHeader.js b/src/electron/renderer/src/stories/pages/guided-mode/GuidedHeader.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/GuidedHeader.js rename to src/electron/renderer/src/stories/pages/guided-mode/GuidedHeader.js diff --git a/src/renderer/src/stories/pages/guided-mode/GuidedHome.js b/src/electron/renderer/src/stories/pages/guided-mode/GuidedHome.js similarity index 99% rename from src/renderer/src/stories/pages/guided-mode/GuidedHome.js rename to src/electron/renderer/src/stories/pages/guided-mode/GuidedHome.js index 1c1b6c5ec..9c3ed487a 100644 --- a/src/renderer/src/stories/pages/guided-mode/GuidedHome.js +++ b/src/electron/renderer/src/stories/pages/guided-mode/GuidedHome.js @@ -2,7 +2,7 @@ import { html } from "lit"; import { Page } from "../Page.js"; import { ProgressCard } from "./ProgressCard.js"; -import { startLottie } from "../../../dependencies/globals.js"; +import { startLottie } from "../../../dependencies/globals"; import * as progress from "../../../progress/index.js"; import { newDataset } from "../../../../assets/lotties/index.js"; diff --git a/src/renderer/src/stories/pages/guided-mode/GuidedHome.stories.js b/src/electron/renderer/src/stories/pages/guided-mode/GuidedHome.stories.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/GuidedHome.stories.js rename to src/electron/renderer/src/stories/pages/guided-mode/GuidedHome.stories.js diff --git a/src/renderer/src/stories/pages/guided-mode/GuidedStart.js b/src/electron/renderer/src/stories/pages/guided-mode/GuidedStart.js similarity index 99% rename from src/renderer/src/stories/pages/guided-mode/GuidedStart.js rename to src/electron/renderer/src/stories/pages/guided-mode/GuidedStart.js index 43cb4f2cc..bfe38401b 100644 --- a/src/renderer/src/stories/pages/guided-mode/GuidedStart.js +++ b/src/electron/renderer/src/stories/pages/guided-mode/GuidedStart.js @@ -3,7 +3,7 @@ import { Page } from "../Page.js"; import "./GuidedFooter"; import { InfoBox } from "../../InfoBox.js"; import { InspectorListItem } from "../../preview/inspector/InspectorList.js"; -import { sections } from "../globals.js"; +import { sections } from "../globals"; export class GuidedStartPage extends Page { constructor(...args) { diff --git a/src/renderer/src/stories/pages/guided-mode/Locate.stories.js b/src/electron/renderer/src/stories/pages/guided-mode/Locate.stories.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/Locate.stories.js rename to src/electron/renderer/src/stories/pages/guided-mode/Locate.stories.js diff --git a/src/renderer/src/stories/pages/guided-mode/Metadata.stories.js b/src/electron/renderer/src/stories/pages/guided-mode/Metadata.stories.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/Metadata.stories.js rename to src/electron/renderer/src/stories/pages/guided-mode/Metadata.stories.js diff --git a/src/renderer/src/stories/pages/guided-mode/NewDataset.stories.js b/src/electron/renderer/src/stories/pages/guided-mode/NewDataset.stories.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/NewDataset.stories.js rename to src/electron/renderer/src/stories/pages/guided-mode/NewDataset.stories.js diff --git a/src/renderer/src/stories/pages/guided-mode/Preview.stories.js b/src/electron/renderer/src/stories/pages/guided-mode/Preview.stories.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/Preview.stories.js rename to src/electron/renderer/src/stories/pages/guided-mode/Preview.stories.js diff --git a/src/renderer/src/stories/pages/guided-mode/ProgressCard.js b/src/electron/renderer/src/stories/pages/guided-mode/ProgressCard.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/ProgressCard.js rename to src/electron/renderer/src/stories/pages/guided-mode/ProgressCard.js diff --git a/src/renderer/src/stories/pages/guided-mode/Review.stories.js b/src/electron/renderer/src/stories/pages/guided-mode/Review.stories.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/Review.stories.js rename to src/electron/renderer/src/stories/pages/guided-mode/Review.stories.js diff --git a/src/renderer/src/stories/pages/guided-mode/SourceData.stories.js b/src/electron/renderer/src/stories/pages/guided-mode/SourceData.stories.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/SourceData.stories.js rename to src/electron/renderer/src/stories/pages/guided-mode/SourceData.stories.js diff --git a/src/renderer/src/stories/pages/guided-mode/Structure.stories.js b/src/electron/renderer/src/stories/pages/guided-mode/Structure.stories.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/Structure.stories.js rename to src/electron/renderer/src/stories/pages/guided-mode/Structure.stories.js diff --git a/src/renderer/src/stories/pages/guided-mode/Subjects.stories.js b/src/electron/renderer/src/stories/pages/guided-mode/Subjects.stories.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/Subjects.stories.js rename to src/electron/renderer/src/stories/pages/guided-mode/Subjects.stories.js diff --git a/src/renderer/src/stories/pages/guided-mode/Upload.stories.js b/src/electron/renderer/src/stories/pages/guided-mode/Upload.stories.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/Upload.stories.js rename to src/electron/renderer/src/stories/pages/guided-mode/Upload.stories.js diff --git a/src/renderer/src/stories/pages/guided-mode/data/GuidedMetadata.js b/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedMetadata.js similarity index 99% rename from src/renderer/src/stories/pages/guided-mode/data/GuidedMetadata.js rename to src/electron/renderer/src/stories/pages/guided-mode/data/GuidedMetadata.js index 3a29b406b..ee1e60e15 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/GuidedMetadata.js +++ b/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedMetadata.js @@ -11,12 +11,12 @@ import { getInfoFromId, drillSchemaProperties, resolveFromPath, -} from "./utils.js"; +} from "./utils"; import Swal from "sweetalert2"; -import { SimpleTable } from "../../../SimpleTable"; +import { SimpleTable } from "../../../SimpleTable.js"; import { onThrow } from "../../../../errors"; -import { merge } from "../../utils.js"; +import { merge } from "../../utils"; import { NWBFilePreview } from "../../../preview/NWBFilePreview.js"; import { header, tempPropertyKey } from "../../../forms/utils"; diff --git a/src/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js b/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js similarity index 99% rename from src/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js rename to src/electron/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js index 01e180939..922331770 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js +++ b/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js @@ -7,7 +7,7 @@ import { run } from "../options/utils.js"; import { onThrow } from "../../../../errors"; import pathExpansionSchema from "../../../../../../../schemas/json/path-expansion.schema.json" assert { type: "json" }; -import { merge } from "../../utils.js"; +import { merge } from "../../utils"; import { List } from "../../../List"; import { fs } from "../../../../electron/index.js"; import { Button } from "../../../Button.js"; diff --git a/src/renderer/src/stories/pages/guided-mode/data/GuidedSourceData.js b/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedSourceData.js similarity index 98% rename from src/renderer/src/stories/pages/guided-mode/data/GuidedSourceData.js rename to src/electron/renderer/src/stories/pages/guided-mode/data/GuidedSourceData.js index d9166968e..9fca8680c 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/GuidedSourceData.js +++ b/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedSourceData.js @@ -1,10 +1,10 @@ import Swal from "sweetalert2"; -import { isStorybook } from "../../../../dependencies/globals.js"; +import { isStorybook } from "../../../../dependencies/globals"; import { JSONSchemaForm } from "../../../JSONSchemaForm.js"; import { InstanceManager } from "../../../InstanceManager.js"; import { ManagedPage } from "./ManagedPage.js"; import { onThrow } from "../../../../errors"; -import { merge, sanitize } from "../../utils.js"; +import { merge, sanitize } from "../../utils"; import preprocessSourceDataSchema from "../../../../../../../schemas/source-data.schema"; import { createGlobalFormModal } from "../../../forms/GlobalFormModal"; @@ -16,7 +16,7 @@ import globalIcon from "../../../assets/global.svg?raw"; import { baseUrl } from "../../../../server/globals"; import { run } from "../options/utils.js"; -import { getInfoFromId } from "./utils.js"; +import { getInfoFromId } from "./utils"; import { Modal } from "../../../Modal"; const propsToIgnore = { diff --git a/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js b/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js similarity index 98% rename from src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js rename to src/electron/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js index 8ce3d10fb..0cfa26dec 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js +++ b/src/electron/renderer/src/stories/pages/guided-mode/data/GuidedStructure.js @@ -3,7 +3,7 @@ import { Page } from "../../Page.js"; // For Multi-Select Form import { Button } from "../../../Button.js"; -import { supportedInterfaces } from "../../../../globals.js"; +import { supportedInterfaces } from "../../../../globals"; import { Search } from "../../../Search.js"; import { Modal } from "../../../Modal"; import { List } from "../../../List"; diff --git a/src/renderer/src/stories/pages/guided-mode/data/ManagedPage.js b/src/electron/renderer/src/stories/pages/guided-mode/data/ManagedPage.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/data/ManagedPage.js rename to src/electron/renderer/src/stories/pages/guided-mode/data/ManagedPage.js diff --git a/src/renderer/src/stories/pages/guided-mode/data/utils.js b/src/electron/renderer/src/stories/pages/guided-mode/data/utils.js similarity index 99% rename from src/renderer/src/stories/pages/guided-mode/data/utils.js rename to src/electron/renderer/src/stories/pages/guided-mode/data/utils.js index a2c00b03c..45fc8355b 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/utils.js +++ b/src/electron/renderer/src/stories/pages/guided-mode/data/utils.js @@ -1,5 +1,5 @@ import { getEditableItems } from "../../../JSONSchemaInput.js"; -import { merge } from "../../utils.js"; +import { merge } from "../../utils"; // Merge project-wide data into metadata export function populateWithProjectMetadata(info, globalState) { diff --git a/src/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js b/src/electron/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js similarity index 99% rename from src/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js rename to src/electron/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js index 65ca62ccf..73e9b12cf 100644 --- a/src/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js +++ b/src/electron/renderer/src/stories/pages/guided-mode/options/GuidedInspectorPage.js @@ -8,13 +8,13 @@ import { electron } from "../../../../electron/index.js"; import { getSharedPath, removeFilePaths, truncateFilePaths } from "../../../preview/NWBFilePreview.js"; const { ipcRenderer } = electron; import { until } from "lit/directives/until.js"; -import { run } from "./utils.js"; +import { run } from "./utils"; import { InspectorList, InspectorLegend } from "../../../preview/inspector/InspectorList.js"; import { getStubArray } from "./GuidedStubPreview.js"; import { InstanceManager } from "../../../InstanceManager.js"; import { getMessageType } from "../../../../validation/index.js"; -import { Button } from "../../../Button"; +import { Button } from "../../../Button.js"; import { download } from "../../inspect/utils.js"; import { createProgressPopup } from "../../../utils/progress.js"; diff --git a/src/renderer/src/stories/pages/guided-mode/options/GuidedStubPreview.js b/src/electron/renderer/src/stories/pages/guided-mode/options/GuidedStubPreview.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/options/GuidedStubPreview.js rename to src/electron/renderer/src/stories/pages/guided-mode/options/GuidedStubPreview.js diff --git a/src/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js b/src/electron/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js similarity index 99% rename from src/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js rename to src/electron/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js index 16d325c8d..ad3d54216 100644 --- a/src/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js +++ b/src/electron/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js @@ -2,7 +2,7 @@ import { html } from "lit"; import { JSONSchemaForm } from "../../../JSONSchemaForm.js"; import { Page } from "../../Page.js"; import { onThrow } from "../../../../errors"; -import { merge } from "../../utils.js"; +import { merge } from "../../utils"; import Swal from "sweetalert2"; import dandiUploadSchema, { ready, regenerateDandisets } from "../../../../../../../schemas/dandi-upload.schema"; import { createDandiset, uploadToDandi } from "../../uploads/UploadsPage.js"; diff --git a/src/renderer/src/stories/pages/guided-mode/options/utils.js b/src/electron/renderer/src/stories/pages/guided-mode/options/utils.js similarity index 98% rename from src/renderer/src/stories/pages/guided-mode/options/utils.js rename to src/electron/renderer/src/stories/pages/guided-mode/options/utils.js index b038913d5..664d5b815 100644 --- a/src/renderer/src/stories/pages/guided-mode/options/utils.js +++ b/src/electron/renderer/src/stories/pages/guided-mode/options/utils.js @@ -1,5 +1,5 @@ import Swal from "sweetalert2"; -import { sanitize } from "../../utils.js"; +import { sanitize } from "../../utils"; import { baseUrl } from "../../../../server/globals"; export const openProgressSwal = (options, callback) => { diff --git a/src/renderer/src/stories/pages/guided-mode/results/GuidedDandiResults.js b/src/electron/renderer/src/stories/pages/guided-mode/results/GuidedDandiResults.js similarity index 95% rename from src/renderer/src/stories/pages/guided-mode/results/GuidedDandiResults.js rename to src/electron/renderer/src/stories/pages/guided-mode/results/GuidedDandiResults.js index 26e3c3209..bd41505cb 100644 --- a/src/renderer/src/stories/pages/guided-mode/results/GuidedDandiResults.js +++ b/src/electron/renderer/src/stories/pages/guided-mode/results/GuidedDandiResults.js @@ -1,7 +1,7 @@ import { html } from "lit"; import { Page } from "../../Page.js"; -import { DandiResults } from "../../../DandiResults"; +import { DandiResults } from "../../../DandiResults.js"; export class GuidedDandiResultsPage extends Page { constructor(...args) { diff --git a/src/renderer/src/stories/pages/guided-mode/results/GuidedResults.js b/src/electron/renderer/src/stories/pages/guided-mode/results/GuidedResults.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/results/GuidedResults.js rename to src/electron/renderer/src/stories/pages/guided-mode/results/GuidedResults.js diff --git a/src/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js b/src/electron/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js similarity index 99% rename from src/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js rename to src/electron/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js index 71c060fa7..619c33b25 100644 --- a/src/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js +++ b/src/electron/renderer/src/stories/pages/guided-mode/setup/GuidedNewDatasetInfo.js @@ -6,7 +6,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 { merge } from "../../utils"; import { onThrow } from "../../../../errors"; import { header } from "../../../forms/utils"; diff --git a/src/renderer/src/stories/pages/guided-mode/setup/GuidedSubjects.js b/src/electron/renderer/src/stories/pages/guided-mode/setup/GuidedSubjects.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/setup/GuidedSubjects.js rename to src/electron/renderer/src/stories/pages/guided-mode/setup/GuidedSubjects.js diff --git a/src/renderer/src/stories/pages/guided-mode/setup/Preform.js b/src/electron/renderer/src/stories/pages/guided-mode/setup/Preform.js similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/setup/Preform.js rename to src/electron/renderer/src/stories/pages/guided-mode/setup/Preform.js diff --git a/src/renderer/src/stories/pages/guided-mode/setup/utils.ts b/src/electron/renderer/src/stories/pages/guided-mode/setup/utils.ts similarity index 100% rename from src/renderer/src/stories/pages/guided-mode/setup/utils.ts rename to src/electron/renderer/src/stories/pages/guided-mode/setup/utils.ts diff --git a/src/renderer/src/stories/pages/guided-mode/storyStates.ts b/src/electron/renderer/src/stories/pages/guided-mode/storyStates.ts similarity index 99% rename from src/renderer/src/stories/pages/guided-mode/storyStates.ts rename to src/electron/renderer/src/stories/pages/guided-mode/storyStates.ts index 211ee2c5c..b8cd76034 100644 --- a/src/renderer/src/stories/pages/guided-mode/storyStates.ts +++ b/src/electron/renderer/src/stories/pages/guided-mode/storyStates.ts @@ -1,4 +1,4 @@ -import nwbBaseSchema from "../../../../../../schemas/base-metadata.schema"; +import nwbBaseSchema from "../../../../../../schemas/base-metadata.schema.js"; // import exephysExampleSchema from "../../../../../../schemas/json/ecephys_metadata_schema_example.json"; import { dashboard } from "../../../pages.js"; diff --git a/src/renderer/src/stories/pages/inspect/InspectPage.js b/src/electron/renderer/src/stories/pages/inspect/InspectPage.js similarity index 99% rename from src/renderer/src/stories/pages/inspect/InspectPage.js rename to src/electron/renderer/src/stories/pages/inspect/InspectPage.js index 577d7fbde..1db95cf12 100644 --- a/src/renderer/src/stories/pages/inspect/InspectPage.js +++ b/src/electron/renderer/src/stories/pages/inspect/InspectPage.js @@ -8,7 +8,7 @@ import { JSONSchemaInput } from "../../JSONSchemaInput.js"; import { Modal } from "../../Modal"; import { getSharedPath, truncateFilePaths } from "../../preview/NWBFilePreview.js"; import { InspectorList, InspectorLegend } from "../../preview/inspector/InspectorList.js"; -import { download } from "./utils.js"; +import { download } from "./utils"; import { createProgressPopup } from "../../utils/progress.js"; import { ready } from "../../../../../../schemas/dandi-upload.schema"; diff --git a/src/renderer/src/stories/pages/inspect/utils.js b/src/electron/renderer/src/stories/pages/inspect/utils.js similarity index 100% rename from src/renderer/src/stories/pages/inspect/utils.js rename to src/electron/renderer/src/stories/pages/inspect/utils.js diff --git a/src/renderer/src/stories/pages/preview/PreviewPage.js b/src/electron/renderer/src/stories/pages/preview/PreviewPage.js similarity index 100% rename from src/renderer/src/stories/pages/preview/PreviewPage.js rename to src/electron/renderer/src/stories/pages/preview/PreviewPage.js diff --git a/src/renderer/src/stories/pages/settings/SettingsPage.js b/src/electron/renderer/src/stories/pages/settings/SettingsPage.js similarity index 96% rename from src/renderer/src/stories/pages/settings/SettingsPage.js rename to src/electron/renderer/src/stories/pages/settings/SettingsPage.js index 7c40baedf..136a197a3 100644 --- a/src/renderer/src/stories/pages/settings/SettingsPage.js +++ b/src/electron/renderer/src/stories/pages/settings/SettingsPage.js @@ -10,9 +10,9 @@ import { validateDANDIApiKey } from "../../../validation/dandi"; import { Button } from "../../Button.js"; import { global, remove, save } from "../../../progress/index.js"; -import { merge, setUndefinedIfNotDeclared } from "../utils.js"; +import { merge, setUndefinedIfNotDeclared } from "../utils"; -import { homeDirectory, notyf, testDataFolderPath } from "../../../dependencies/globals.js"; +import { homeDirectory, notyf, testDataFolderPath } from "../../../dependencies/globals"; import { SERVER_FILE_PATH, electron, path, port, fs } from "../../../electron/index.js"; import saveSVG from "../../assets/save.svg?raw"; @@ -22,9 +22,9 @@ import generateSVG from "../../assets/restart.svg?raw"; import { header } from "../../forms/utils"; -import testingSuiteYaml from "../../../../../../guide_testing_suite.yml"; +import examplePipelines from "../../../../../../example_pipelines.yml"; import { run } from "../guided-mode/options/utils.js"; -import { joinPath } from "../../../globals.js"; +import { joinPath } from "../../../globals"; const DATA_OUTPUT_PATH = joinPath(testDataFolderPath, "single_session_data"); const DATASET_OUTPUT_PATH = joinPath(testDataFolderPath, "multi_session_dataset"); @@ -235,7 +235,7 @@ export class SettingsPage extends Page { }); const generatePipelineButton = new Button({ - label: "Generate Test Pipelines", + label: "Generate Example Pipelines", onClick: async () => { const { testing_data_folder } = this.form.results.developer ?? {}; @@ -245,13 +245,11 @@ export class SettingsPage extends Page { "error" ); - const { pipelines = {} } = testingSuiteYaml; - - const pipelineNames = Object.keys(pipelines); + const pipelineNames = Object.keys(examplePipelines); const resolved = pipelineNames.reverse().map((name) => { try { - saveNewPipelineFromYaml(name, pipelines[name], testing_data_folder); + saveNewPipelineFromYaml(name, examplePipelines[name], testing_data_folder); return true; } catch (e) { console.error(e); diff --git a/src/renderer/src/stories/pages/uploads/UploadsPage.js b/src/electron/renderer/src/stories/pages/uploads/UploadsPage.js similarity index 99% rename from src/renderer/src/stories/pages/uploads/UploadsPage.js rename to src/electron/renderer/src/stories/pages/uploads/UploadsPage.js index 3f5b09954..07aea9858 100644 --- a/src/renderer/src/stories/pages/uploads/UploadsPage.js +++ b/src/electron/renderer/src/stories/pages/uploads/UploadsPage.js @@ -18,7 +18,7 @@ import dandiCreateSchema from "../../../../../../schemas/dandi-create.schema"; import { Button } from "../../Button.js"; import { global } from "../../../progress/index.js"; -import { merge } from "../utils.js"; +import { merge } from "../utils"; import { run } from "../guided-mode/options/utils.js"; import { Modal } from "../../Modal"; diff --git a/src/renderer/src/stories/pages/uploads/utils.ts b/src/electron/renderer/src/stories/pages/uploads/utils.ts similarity index 100% rename from src/renderer/src/stories/pages/uploads/utils.ts rename to src/electron/renderer/src/stories/pages/uploads/utils.ts diff --git a/src/renderer/src/stories/pages/utils.js b/src/electron/renderer/src/stories/pages/utils.js similarity index 100% rename from src/renderer/src/stories/pages/utils.js rename to src/electron/renderer/src/stories/pages/utils.js diff --git a/src/renderer/src/stories/preview/NWBFilePreview.js b/src/electron/renderer/src/stories/preview/NWBFilePreview.js similarity index 100% rename from src/renderer/src/stories/preview/NWBFilePreview.js rename to src/electron/renderer/src/stories/preview/NWBFilePreview.js diff --git a/src/renderer/src/stories/preview/Neurosift.js b/src/electron/renderer/src/stories/preview/Neurosift.js similarity index 100% rename from src/renderer/src/stories/preview/Neurosift.js rename to src/electron/renderer/src/stories/preview/Neurosift.js diff --git a/src/renderer/src/stories/preview/inspector/InspectorList.js b/src/electron/renderer/src/stories/preview/inspector/InspectorList.js similarity index 100% rename from src/renderer/src/stories/preview/inspector/InspectorList.js rename to src/electron/renderer/src/stories/preview/inspector/InspectorList.js diff --git a/src/renderer/src/stories/preview/inspector/InspectorList.stories.js b/src/electron/renderer/src/stories/preview/inspector/InspectorList.stories.js similarity index 100% rename from src/renderer/src/stories/preview/inspector/InspectorList.stories.js rename to src/electron/renderer/src/stories/preview/inspector/InspectorList.stories.js diff --git a/src/renderer/src/stories/preview/inspector/test.json b/src/electron/renderer/src/stories/preview/inspector/test.json similarity index 100% rename from src/renderer/src/stories/preview/inspector/test.json rename to src/electron/renderer/src/stories/preview/inspector/test.json diff --git a/src/renderer/src/stories/sidebar.js b/src/electron/renderer/src/stories/sidebar.js similarity index 100% rename from src/renderer/src/stories/sidebar.js rename to src/electron/renderer/src/stories/sidebar.js diff --git a/src/renderer/src/stories/status/StatusBar.stories.js b/src/electron/renderer/src/stories/status/StatusBar.stories.js similarity index 100% rename from src/renderer/src/stories/status/StatusBar.stories.js rename to src/electron/renderer/src/stories/status/StatusBar.stories.js diff --git a/src/renderer/src/stories/status/StatusBar.ts b/src/electron/renderer/src/stories/status/StatusBar.ts similarity index 100% rename from src/renderer/src/stories/status/StatusBar.ts rename to src/electron/renderer/src/stories/status/StatusBar.ts diff --git a/src/renderer/src/stories/status/StatusIndicator.ts b/src/electron/renderer/src/stories/status/StatusIndicator.ts similarity index 100% rename from src/renderer/src/stories/status/StatusIndicator.ts rename to src/electron/renderer/src/stories/status/StatusIndicator.ts diff --git a/src/renderer/src/stories/table/Cell.ts b/src/electron/renderer/src/stories/table/Cell.ts similarity index 100% rename from src/renderer/src/stories/table/Cell.ts rename to src/electron/renderer/src/stories/table/Cell.ts diff --git a/src/renderer/src/stories/table/ContextMenu.ts b/src/electron/renderer/src/stories/table/ContextMenu.ts similarity index 100% rename from src/renderer/src/stories/table/ContextMenu.ts rename to src/electron/renderer/src/stories/table/ContextMenu.ts diff --git a/src/renderer/src/stories/table/cells/array.ts b/src/electron/renderer/src/stories/table/cells/array.ts similarity index 100% rename from src/renderer/src/stories/table/cells/array.ts rename to src/electron/renderer/src/stories/table/cells/array.ts diff --git a/src/renderer/src/stories/table/cells/base.ts b/src/electron/renderer/src/stories/table/cells/base.ts similarity index 100% rename from src/renderer/src/stories/table/cells/base.ts rename to src/electron/renderer/src/stories/table/cells/base.ts diff --git a/src/renderer/src/stories/table/cells/date-time.ts b/src/electron/renderer/src/stories/table/cells/date-time.ts similarity index 100% rename from src/renderer/src/stories/table/cells/date-time.ts rename to src/electron/renderer/src/stories/table/cells/date-time.ts diff --git a/src/renderer/src/stories/table/cells/dropdown.ts b/src/electron/renderer/src/stories/table/cells/dropdown.ts similarity index 100% rename from src/renderer/src/stories/table/cells/dropdown.ts rename to src/electron/renderer/src/stories/table/cells/dropdown.ts diff --git a/src/renderer/src/stories/table/cells/editors/base.ts b/src/electron/renderer/src/stories/table/cells/editors/base.ts similarity index 100% rename from src/renderer/src/stories/table/cells/editors/base.ts rename to src/electron/renderer/src/stories/table/cells/editors/base.ts diff --git a/src/renderer/src/stories/table/cells/input.ts b/src/electron/renderer/src/stories/table/cells/input.ts similarity index 95% rename from src/renderer/src/stories/table/cells/input.ts rename to src/electron/renderer/src/stories/table/cells/input.ts index 51472ce58..5c090813a 100644 --- a/src/renderer/src/stories/table/cells/input.ts +++ b/src/electron/renderer/src/stories/table/cells/input.ts @@ -1,10 +1,10 @@ import { LitElement, css, html } from "lit"; -import { TableCellBase } from "./base"; -import { BaseRenderer } from "./renderers/base"; +import { TableCellBase } from "./base.js"; +import { BaseRenderer } from "./renderers/base.js"; import { Modal } from "../../Modal"; import { SimpleTable } from "../../SimpleTable.js"; -import { JSONSchemaInput } from "../../JSONSchemaInput"; +import { JSONSchemaInput } from "../../JSONSchemaInput.js"; import { header } from "../../forms/utils"; diff --git a/src/renderer/src/stories/table/cells/renderers/base.ts b/src/electron/renderer/src/stories/table/cells/renderers/base.ts similarity index 100% rename from src/renderer/src/stories/table/cells/renderers/base.ts rename to src/electron/renderer/src/stories/table/cells/renderers/base.ts diff --git a/src/renderer/src/stories/table/convert.ts b/src/electron/renderer/src/stories/table/convert.ts similarity index 100% rename from src/renderer/src/stories/table/convert.ts rename to src/electron/renderer/src/stories/table/convert.ts diff --git a/src/renderer/src/stories/table/utils.ts b/src/electron/renderer/src/stories/table/utils.ts similarity index 100% rename from src/renderer/src/stories/table/utils.ts rename to src/electron/renderer/src/stories/table/utils.ts diff --git a/src/renderer/src/stories/utils/progress.js b/src/electron/renderer/src/stories/utils/progress.js similarity index 100% rename from src/renderer/src/stories/utils/progress.js rename to src/electron/renderer/src/stories/utils/progress.js diff --git a/src/renderer/src/stories/utils/useGlobalStyles.js b/src/electron/renderer/src/stories/utils/useGlobalStyles.js similarity index 100% rename from src/renderer/src/stories/utils/useGlobalStyles.js rename to src/electron/renderer/src/stories/utils/useGlobalStyles.js diff --git a/src/renderer/src/validation/dandi.ts b/src/electron/renderer/src/validation/dandi.ts similarity index 100% rename from src/renderer/src/validation/dandi.ts rename to src/electron/renderer/src/validation/dandi.ts diff --git a/src/renderer/src/validation/index.js b/src/electron/renderer/src/validation/index.js similarity index 100% rename from src/renderer/src/validation/index.js rename to src/electron/renderer/src/validation/index.js diff --git a/src/renderer/src/validation/validation.json b/src/electron/renderer/src/validation/validation.json similarity index 100% rename from src/renderer/src/validation/validation.json rename to src/electron/renderer/src/validation/validation.json diff --git a/src/renderer/src/validation/validation.ts b/src/electron/renderer/src/validation/validation.ts similarity index 100% rename from src/renderer/src/validation/validation.ts rename to src/electron/renderer/src/validation/validation.ts diff --git a/src/renderer/utils/url.js b/src/electron/renderer/utils/url.js similarity index 100% rename from src/renderer/utils/url.js rename to src/electron/renderer/utils/url.js diff --git a/src/example_pipelines.yml b/src/example_pipelines.yml new file mode 100644 index 000000000..2830d3757 --- /dev/null +++ b/src/example_pipelines.yml @@ -0,0 +1,165 @@ +# Follows pattern +# pipeline_name: +# test: Optional[bool] +# metadata: +# key: +# name: value +# array: +# - First value +# - Second value +# interfaces: +# DataInterfaceName: +# file_or_folder_path: +# other_source_data_inputs: +# AdditionalDataInterface: ... + +# NOTE: Can also just provide interfaces directly below pipeline name + +SpikeGLX-Phy: + SpikeGLXRecordingInterface: + file_path: ephy_testing_data/spikeglx/Noise4Sam_g0/Noise4Sam_g0_imec0/Noise4Sam_g0_t0.imec0.ap.bin + PhySortingInterface: + folder_path: ephy_testing_data/phy/phy_example_0 + + +SpikeGLX_v1_SingleProbe_AP: + SpikeGLXRecordingInterface: + file_path: ephy_testing_data/spikeglx/Noise4Sam_g0/Noise4Sam_g0_imec0/Noise4Sam_g0_t0.imec0.ap.bin + + +SpikeGLXConverter-Phy: + SpikeGLXConverterPipe: + folder_path: ephy_testing_data/spikeglx/Noise4Sam_g0 + PhySortingInterface: + folder_path: ephy_testing_data/phy/phy_example_0 + + +Suite2P_SinglePlane_SingleChannel: + metadata: + NWBFile: + session_start_time: 2024-05-09T00:00 + Ophys: + ImagingPlane: + - + excitation_lambda: NaN + optical_channel: + - + emission_lambda: NaN + + interfaces: + Suite2pSegmentationInterface: + folder_path: ophys_testing_data/segmentation_datasets/suite2p + +Caiman_SinglePlane_SingleChannel: + metadata: + NWBFile: + session_start_time: 2024-05-09T00:00 + Ophys: + ImagingPlane: + - + excitation_lambda: NaN + optical_channel: + - + emission_lambda: NaN + + interfaces: + CaimanSegmentationInterface: + file_path: ophys_testing_data/segmentation_datasets/caiman/caiman_analysis.hdf5 + +ScanImage_SinglePlane_SingleChannel: + + metadata: + Ophys: + ImagingPlane: + - + excitation_lambda: NaN + optical_channel: + - + emission_lambda: NaN + + interfaces: + ScanImageImagingInterface: + file_path: ophys_testing_data/imaging_datasets/ScanImage/sample_scanimage_version_3_8.tiff + +TDT: + metadata: + NWBFile: + session_start_time: 2024-05-09T00:00 + + interfaces: + TdtRecordingInterface: + folder_path: ephy_testing_data/tdt/aep_05 + gain: 1 + + +CellExplorer: + metadata: + NWBFile: + session_start_time: 2024-05-09T00:00 + + interfaces: + CellExplorerRecordingInterface: + folder_path: ephy_testing_data/cellexplorer/dataset_4/Peter_MS22_180629_110319_concat_stubbed + +CellExplorerUnits: + metadata: + NWBFile: + session_start_time: 2024-05-09T00:00 + + interfaces: + CellExplorerRecordingInterface: + folder_path: ephy_testing_data/cellexplorer/dataset_4/Peter_MS22_180629_110319_concat_stubbed + CellExplorerSortingInterface: + file_path: ephy_testing_data/cellexplorer/dataset_4/Peter_MS22_180629_110319_concat_stubbed/Peter_MS22_180629_110319_concat_stubbed.spikes.cellinfo.mat + +CellExplorerSortingOnly: + metadata: + NWBFile: + session_start_time: 2024-05-09T00:00 + + interfaces: + CellExplorerSortingInterface: + file_path: ephy_testing_data/cellexplorer/dataset_4/Peter_MS22_180629_110319_concat_stubbed/Peter_MS22_180629_110319_concat_stubbed.spikes.cellinfo.mat + +IntanSingleFileRecording: + metadata: + NWBFile: + session_start_time: 2024-05-09T00:00 + Ecephys: + ElectrodeGroup: + - + location: Test location + - + location: Test location + - + location: Test location + + + + interfaces: + IntanRecordingInterface: + file_path: ephy_testing_data/intan/intan_rhd_test_1.rhd + +BrukerTiffMultiChannelSinglePlane: + metadata: + Ophys: + ImagingPlane: + - + excitation_lambda: NaN + optical_channel: + - + emission_lambda: NaN + + interfaces: + BrukerTiffSinglePlaneConverter: + folder_path: ophys_testing_data/imaging_datasets/BrukerTif/NCCR32_2023_02_20_Into_the_void_t_series_baseline-000 + +DeepLabCut: + metadata: + NWBFile: + session_start_time: 2024-05-09T00:00 + + interfaces: + DeepLabCutInterface: + file_path: behavior_testing_data/DLC/m3v1mp4DLC_resnet50_openfieldAug20shuffle1_30000.h5 + config_file_path: behavior_testing_data/DLC/config.yaml diff --git a/paths.config.json b/src/paths.config.json similarity index 100% rename from paths.config.json rename to src/paths.config.json diff --git a/pyflask/apis/__init__.py b/src/pyflask/apis/__init__.py similarity index 100% rename from pyflask/apis/__init__.py rename to src/pyflask/apis/__init__.py diff --git a/pyflask/apis/data.py b/src/pyflask/apis/data.py similarity index 100% rename from pyflask/apis/data.py rename to src/pyflask/apis/data.py diff --git a/pyflask/apis/neuroconv.py b/src/pyflask/apis/neuroconv.py similarity index 100% rename from pyflask/apis/neuroconv.py rename to src/pyflask/apis/neuroconv.py diff --git a/pyflask/apis/startup.py b/src/pyflask/apis/startup.py similarity index 100% rename from pyflask/apis/startup.py rename to src/pyflask/apis/startup.py diff --git a/pyflask/app.py b/src/pyflask/app.py similarity index 97% rename from pyflask/app.py rename to src/pyflask/app.py index a75fb88bb..619ee9a0e 100644 --- a/pyflask/app.py +++ b/src/pyflask/app.py @@ -26,6 +26,7 @@ CONVERSION_SAVE_FOLDER_PATH, GUIDE_ROOT_FOLDER, STUB_SAVE_FOLDER_PATH, + is_packaged, resource_path, ) @@ -42,7 +43,7 @@ LOG_FILE_PATH = Path(LOG_FOLDER, f"{timestamp}.log") # Initialize API -package_json_file_path = resource_path("package.json") +package_json_file_path = resource_path("package.json" if is_packaged() else "../package.json") with open(file=package_json_file_path) as fp: package_json = json.load(fp=fp) diff --git a/pyflask/errorHandlers/__init__.py b/src/pyflask/errorHandlers/__init__.py similarity index 100% rename from pyflask/errorHandlers/__init__.py rename to src/pyflask/errorHandlers/__init__.py diff --git a/pyflask/errorHandlers/notBadRequestException.py b/src/pyflask/errorHandlers/notBadRequestException.py similarity index 100% rename from pyflask/errorHandlers/notBadRequestException.py rename to src/pyflask/errorHandlers/notBadRequestException.py diff --git a/pyflask/manageNeuroconv/__init__.py b/src/pyflask/manageNeuroconv/__init__.py similarity index 100% rename from pyflask/manageNeuroconv/__init__.py rename to src/pyflask/manageNeuroconv/__init__.py diff --git a/pyflask/manageNeuroconv/info/__init__.py b/src/pyflask/manageNeuroconv/info/__init__.py similarity index 90% rename from pyflask/manageNeuroconv/info/__init__.py rename to src/pyflask/manageNeuroconv/info/__init__.py index edde04113..3a29439d2 100644 --- a/pyflask/manageNeuroconv/info/__init__.py +++ b/src/pyflask/manageNeuroconv/info/__init__.py @@ -3,5 +3,6 @@ CONVERSION_SAVE_FOLDER_PATH, GUIDE_ROOT_FOLDER, STUB_SAVE_FOLDER_PATH, + is_packaged, resource_path, ) diff --git a/pyflask/manageNeuroconv/info/sse.py b/src/pyflask/manageNeuroconv/info/sse.py similarity index 100% rename from pyflask/manageNeuroconv/info/sse.py rename to src/pyflask/manageNeuroconv/info/sse.py diff --git a/pyflask/manageNeuroconv/info/urls.py b/src/pyflask/manageNeuroconv/info/urls.py similarity index 84% rename from pyflask/manageNeuroconv/info/urls.py rename to src/pyflask/manageNeuroconv/info/urls.py index bf8a65116..d41355b1f 100644 --- a/pyflask/manageNeuroconv/info/urls.py +++ b/src/pyflask/manageNeuroconv/info/urls.py @@ -4,6 +4,16 @@ from pathlib import Path +def is_packaged(): + deployed = True + try: + sys._MEIPASS # PyInstaller creates a temp folder and stores path in _MEIPASS + except Exception: + deployed = False + + return deployed + + def resource_path(relative_path): """Get absolute path to resource, works for dev and for PyInstaller""" try: @@ -20,6 +30,7 @@ def resource_path(relative_path): path_config = resource_path( "paths.config.json" ) # NOTE: Must have pyflask for running the GUIDE as a whole, but errors for just the server + f = path_config.open() data = json.load(f) GUIDE_ROOT_FOLDER = Path(Path.home(), data["root"]) diff --git a/pyflask/manageNeuroconv/manage_neuroconv.py b/src/pyflask/manageNeuroconv/manage_neuroconv.py similarity index 100% rename from pyflask/manageNeuroconv/manage_neuroconv.py rename to src/pyflask/manageNeuroconv/manage_neuroconv.py diff --git a/pyflask/tests/conftest.py b/src/pyflask/tests/conftest.py similarity index 100% rename from pyflask/tests/conftest.py rename to src/pyflask/tests/conftest.py diff --git a/pyflask/tests/test_generate_tutorial_data.py b/src/pyflask/tests/test_generate_tutorial_data.py similarity index 100% rename from pyflask/tests/test_generate_tutorial_data.py rename to src/pyflask/tests/test_generate_tutorial_data.py diff --git a/pyflask/tests/test_neuroconv.py b/src/pyflask/tests/test_neuroconv.py similarity index 100% rename from pyflask/tests/test_neuroconv.py rename to src/pyflask/tests/test_neuroconv.py diff --git a/pyflask/tests/test_startup.py b/src/pyflask/tests/test_startup.py similarity index 100% rename from pyflask/tests/test_startup.py rename to src/pyflask/tests/test_startup.py diff --git a/pyflask/tests/utils.py b/src/pyflask/tests/utils.py similarity index 100% rename from pyflask/tests/utils.py rename to src/pyflask/tests/utils.py diff --git a/schemas/base-metadata.schema.ts b/src/schemas/base-metadata.schema.ts similarity index 96% rename from schemas/base-metadata.schema.ts rename to src/schemas/base-metadata.schema.ts index 4decf0b19..8e3ca7035 100644 --- a/schemas/base-metadata.schema.ts +++ b/src/schemas/base-metadata.schema.ts @@ -1,11 +1,11 @@ -import { serverGlobals, resolve } from '../src/renderer/src/server/globals' +import { serverGlobals, resolve } from '../electron/renderer/src/server/globals' -import { header, replaceRefsWithValue } from '../src/renderer/src/stories/forms/utils' +import { header, replaceRefsWithValue } from '../electron/renderer/src/stories/forms/utils' import baseMetadataSchema from './json/base_metadata_schema.json' assert { type: "json" } -import { merge } from '../src/renderer/src/stories/pages/utils' -import { drillSchemaProperties } from '../src/renderer/src/stories/pages/guided-mode/data/utils' +import { merge } from '../electron/renderer/src/stories/pages/utils' +import { drillSchemaProperties } from '../electron/renderer/src/stories/pages/guided-mode/data/utils' const UV_MATH_FORMAT = `µV`; //`µV` const UV_PROPERTIES = ["gain_to_uV", "offset_to_uV"] diff --git a/schemas/dandi-create.schema.ts b/src/schemas/dandi-create.schema.ts similarity index 100% rename from schemas/dandi-create.schema.ts rename to src/schemas/dandi-create.schema.ts diff --git a/schemas/dandi-upload.schema.ts b/src/schemas/dandi-upload.schema.ts similarity index 92% rename from schemas/dandi-upload.schema.ts rename to src/schemas/dandi-upload.schema.ts index 83ae223e2..cb0538578 100644 --- a/schemas/dandi-upload.schema.ts +++ b/src/schemas/dandi-upload.schema.ts @@ -1,10 +1,10 @@ import { Dandiset, getMine } from 'dandi' -import { global } from '../src/renderer/src/progress' +import { global } from '../electron/renderer/src/progress' import upload from './json/dandi/upload.json' assert { type: "json" } -import { isStaging } from '../src/renderer/src/stories/pages/uploads/utils' -import { baseUrl, onServerOpen } from '../src/renderer/src/server/globals' -import { isStorybook } from '../src/renderer/src/dependencies/simple' +import { isStaging } from '../electron/renderer/src/stories/pages/uploads/utils' +import { baseUrl, onServerOpen } from '../electron/renderer/src/server/globals' +import { isStorybook } from '../electron/renderer/src/dependencies/simple' const schema = structuredClone(upload) diff --git a/schemas/interfaces.info.ts b/src/schemas/interfaces.info.ts similarity index 77% rename from schemas/interfaces.info.ts rename to src/schemas/interfaces.info.ts index 40fac2253..7ecc13cc7 100644 --- a/schemas/interfaces.info.ts +++ b/src/schemas/interfaces.info.ts @@ -1,5 +1,5 @@ -import { baseUrl, onServerOpen } from '../src/renderer/src/server/globals' -import { isStorybook } from '../src/renderer/src/dependencies/simple' +import { baseUrl, onServerOpen } from '../electron/renderer/src/server/globals' +import { isStorybook } from '../electron/renderer/src/dependencies/simple' const values = { interfaces: {} } const setReady: any = {} diff --git a/schemas/json/base_metadata_schema.json b/src/schemas/json/base_metadata_schema.json similarity index 100% rename from schemas/json/base_metadata_schema.json rename to src/schemas/json/base_metadata_schema.json diff --git a/schemas/json/dandi/create.json b/src/schemas/json/dandi/create.json similarity index 100% rename from schemas/json/dandi/create.json rename to src/schemas/json/dandi/create.json diff --git a/schemas/json/dandi/global.json b/src/schemas/json/dandi/global.json similarity index 100% rename from schemas/json/dandi/global.json rename to src/schemas/json/dandi/global.json diff --git a/schemas/json/dandi/standalone.json b/src/schemas/json/dandi/standalone.json similarity index 100% rename from schemas/json/dandi/standalone.json rename to src/schemas/json/dandi/standalone.json diff --git a/schemas/json/dandi/upload.json b/src/schemas/json/dandi/upload.json similarity index 100% rename from schemas/json/dandi/upload.json rename to src/schemas/json/dandi/upload.json diff --git a/schemas/json/developer/globals.json b/src/schemas/json/developer/globals.json similarity index 100% rename from schemas/json/developer/globals.json rename to src/schemas/json/developer/globals.json diff --git a/schemas/json/ecephys_metadata_schema_example.json b/src/schemas/json/ecephys_metadata_schema_example.json similarity index 100% rename from schemas/json/ecephys_metadata_schema_example.json rename to src/schemas/json/ecephys_metadata_schema_example.json diff --git a/schemas/json/generated/AlphaOmegaRecordingInterface.json b/src/schemas/json/generated/AlphaOmegaRecordingInterface.json similarity index 100% rename from schemas/json/generated/AlphaOmegaRecordingInterface.json rename to src/schemas/json/generated/AlphaOmegaRecordingInterface.json diff --git a/schemas/json/generated/AudioInterface.json b/src/schemas/json/generated/AudioInterface.json similarity index 100% rename from schemas/json/generated/AudioInterface.json rename to src/schemas/json/generated/AudioInterface.json diff --git a/schemas/json/generated/AxonaRecordingInterface.json b/src/schemas/json/generated/AxonaRecordingInterface.json similarity index 100% rename from schemas/json/generated/AxonaRecordingInterface.json rename to src/schemas/json/generated/AxonaRecordingInterface.json diff --git a/schemas/json/generated/BiocamRecordingInterface.json b/src/schemas/json/generated/BiocamRecordingInterface.json similarity index 100% rename from schemas/json/generated/BiocamRecordingInterface.json rename to src/schemas/json/generated/BiocamRecordingInterface.json diff --git a/schemas/json/generated/BlackrockRecordingInterface.json b/src/schemas/json/generated/BlackrockRecordingInterface.json similarity index 100% rename from schemas/json/generated/BlackrockRecordingInterface.json rename to src/schemas/json/generated/BlackrockRecordingInterface.json diff --git a/schemas/json/generated/BlackrockSortingInterface.json b/src/schemas/json/generated/BlackrockSortingInterface.json similarity index 100% rename from schemas/json/generated/BlackrockSortingInterface.json rename to src/schemas/json/generated/BlackrockSortingInterface.json diff --git a/schemas/json/generated/BrukerTiffMultiPlaneConverter.json b/src/schemas/json/generated/BrukerTiffMultiPlaneConverter.json similarity index 100% rename from schemas/json/generated/BrukerTiffMultiPlaneConverter.json rename to src/schemas/json/generated/BrukerTiffMultiPlaneConverter.json diff --git a/schemas/json/generated/BrukerTiffMultiPlaneImagingInterface.json b/src/schemas/json/generated/BrukerTiffMultiPlaneImagingInterface.json similarity index 100% rename from schemas/json/generated/BrukerTiffMultiPlaneImagingInterface.json rename to src/schemas/json/generated/BrukerTiffMultiPlaneImagingInterface.json diff --git a/schemas/json/generated/BrukerTiffSinglePlaneConverter.json b/src/schemas/json/generated/BrukerTiffSinglePlaneConverter.json similarity index 100% rename from schemas/json/generated/BrukerTiffSinglePlaneConverter.json rename to src/schemas/json/generated/BrukerTiffSinglePlaneConverter.json diff --git a/schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json b/src/schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json similarity index 100% rename from schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json rename to src/schemas/json/generated/BrukerTiffSinglePlaneImagingInterface.json diff --git a/schemas/json/generated/CaimanSegmentationInterface.json b/src/schemas/json/generated/CaimanSegmentationInterface.json similarity index 100% rename from schemas/json/generated/CaimanSegmentationInterface.json rename to src/schemas/json/generated/CaimanSegmentationInterface.json diff --git a/schemas/json/generated/CellExplorerRecordingInterface.json b/src/schemas/json/generated/CellExplorerRecordingInterface.json similarity index 100% rename from schemas/json/generated/CellExplorerRecordingInterface.json rename to src/schemas/json/generated/CellExplorerRecordingInterface.json diff --git a/schemas/json/generated/CellExplorerSortingInterface.json b/src/schemas/json/generated/CellExplorerSortingInterface.json similarity index 100% rename from schemas/json/generated/CellExplorerSortingInterface.json rename to src/schemas/json/generated/CellExplorerSortingInterface.json diff --git a/schemas/json/generated/CnmfeSegmentationInterface.json b/src/schemas/json/generated/CnmfeSegmentationInterface.json similarity index 100% rename from schemas/json/generated/CnmfeSegmentationInterface.json rename to src/schemas/json/generated/CnmfeSegmentationInterface.json diff --git a/schemas/json/generated/DeepLabCutInterface.json b/src/schemas/json/generated/DeepLabCutInterface.json similarity index 100% rename from schemas/json/generated/DeepLabCutInterface.json rename to src/schemas/json/generated/DeepLabCutInterface.json diff --git a/schemas/json/generated/EDFRecordingInterface.json b/src/schemas/json/generated/EDFRecordingInterface.json similarity index 100% rename from schemas/json/generated/EDFRecordingInterface.json rename to src/schemas/json/generated/EDFRecordingInterface.json diff --git a/schemas/json/generated/ExtractSegmentationInterface.json b/src/schemas/json/generated/ExtractSegmentationInterface.json similarity index 100% rename from schemas/json/generated/ExtractSegmentationInterface.json rename to src/schemas/json/generated/ExtractSegmentationInterface.json diff --git a/schemas/json/generated/FicTracDataInterface.json b/src/schemas/json/generated/FicTracDataInterface.json similarity index 100% rename from schemas/json/generated/FicTracDataInterface.json rename to src/schemas/json/generated/FicTracDataInterface.json diff --git a/schemas/json/generated/IntanRecordingInterface.json b/src/schemas/json/generated/IntanRecordingInterface.json similarity index 100% rename from schemas/json/generated/IntanRecordingInterface.json rename to src/schemas/json/generated/IntanRecordingInterface.json diff --git a/schemas/json/generated/KiloSortSortingInterface.json b/src/schemas/json/generated/KiloSortSortingInterface.json similarity index 100% rename from schemas/json/generated/KiloSortSortingInterface.json rename to src/schemas/json/generated/KiloSortSortingInterface.json diff --git a/schemas/json/generated/MCSRawRecordingInterface.json b/src/schemas/json/generated/MCSRawRecordingInterface.json similarity index 100% rename from schemas/json/generated/MCSRawRecordingInterface.json rename to src/schemas/json/generated/MCSRawRecordingInterface.json diff --git a/schemas/json/generated/MEArecRecordingInterface.json b/src/schemas/json/generated/MEArecRecordingInterface.json similarity index 100% rename from schemas/json/generated/MEArecRecordingInterface.json rename to src/schemas/json/generated/MEArecRecordingInterface.json diff --git a/schemas/json/generated/MicroManagerTiffImagingInterface.json b/src/schemas/json/generated/MicroManagerTiffImagingInterface.json similarity index 100% rename from schemas/json/generated/MicroManagerTiffImagingInterface.json rename to src/schemas/json/generated/MicroManagerTiffImagingInterface.json diff --git a/schemas/json/generated/MiniscopeBehaviorInterface.json b/src/schemas/json/generated/MiniscopeBehaviorInterface.json similarity index 100% rename from schemas/json/generated/MiniscopeBehaviorInterface.json rename to src/schemas/json/generated/MiniscopeBehaviorInterface.json diff --git a/schemas/json/generated/MiniscopeConverter.json b/src/schemas/json/generated/MiniscopeConverter.json similarity index 100% rename from schemas/json/generated/MiniscopeConverter.json rename to src/schemas/json/generated/MiniscopeConverter.json diff --git a/schemas/json/generated/MiniscopeImagingInterface.json b/src/schemas/json/generated/MiniscopeImagingInterface.json similarity index 100% rename from schemas/json/generated/MiniscopeImagingInterface.json rename to src/schemas/json/generated/MiniscopeImagingInterface.json diff --git a/schemas/json/generated/NeuralynxRecordingInterface.json b/src/schemas/json/generated/NeuralynxRecordingInterface.json similarity index 100% rename from schemas/json/generated/NeuralynxRecordingInterface.json rename to src/schemas/json/generated/NeuralynxRecordingInterface.json diff --git a/schemas/json/generated/NeuroScopeLFPInterface.json b/src/schemas/json/generated/NeuroScopeLFPInterface.json similarity index 100% rename from schemas/json/generated/NeuroScopeLFPInterface.json rename to src/schemas/json/generated/NeuroScopeLFPInterface.json diff --git a/schemas/json/generated/NeuroScopeRecordingInterface.json b/src/schemas/json/generated/NeuroScopeRecordingInterface.json similarity index 100% rename from schemas/json/generated/NeuroScopeRecordingInterface.json rename to src/schemas/json/generated/NeuroScopeRecordingInterface.json diff --git a/schemas/json/generated/NeuroScopeSortingInterface.json b/src/schemas/json/generated/NeuroScopeSortingInterface.json similarity index 100% rename from schemas/json/generated/NeuroScopeSortingInterface.json rename to src/schemas/json/generated/NeuroScopeSortingInterface.json diff --git a/schemas/json/generated/OpenEphysRecordingInterface.json b/src/schemas/json/generated/OpenEphysRecordingInterface.json similarity index 100% rename from schemas/json/generated/OpenEphysRecordingInterface.json rename to src/schemas/json/generated/OpenEphysRecordingInterface.json diff --git a/schemas/json/generated/PhySortingInterface.json b/src/schemas/json/generated/PhySortingInterface.json similarity index 100% rename from schemas/json/generated/PhySortingInterface.json rename to src/schemas/json/generated/PhySortingInterface.json diff --git a/schemas/json/generated/PlexonRecordingInterface.json b/src/schemas/json/generated/PlexonRecordingInterface.json similarity index 100% rename from schemas/json/generated/PlexonRecordingInterface.json rename to src/schemas/json/generated/PlexonRecordingInterface.json diff --git a/schemas/json/generated/PlexonSortingInterface.json b/src/schemas/json/generated/PlexonSortingInterface.json similarity index 100% rename from schemas/json/generated/PlexonSortingInterface.json rename to src/schemas/json/generated/PlexonSortingInterface.json diff --git a/schemas/json/generated/SLEAPInterface.json b/src/schemas/json/generated/SLEAPInterface.json similarity index 100% rename from schemas/json/generated/SLEAPInterface.json rename to src/schemas/json/generated/SLEAPInterface.json diff --git a/schemas/json/generated/SbxImagingInterface.json b/src/schemas/json/generated/SbxImagingInterface.json similarity index 100% rename from schemas/json/generated/SbxImagingInterface.json rename to src/schemas/json/generated/SbxImagingInterface.json diff --git a/schemas/json/generated/ScanImageImagingInterface.json b/src/schemas/json/generated/ScanImageImagingInterface.json similarity index 100% rename from schemas/json/generated/ScanImageImagingInterface.json rename to src/schemas/json/generated/ScanImageImagingInterface.json diff --git a/schemas/json/generated/Spike2RecordingInterface.json b/src/schemas/json/generated/Spike2RecordingInterface.json similarity index 100% rename from schemas/json/generated/Spike2RecordingInterface.json rename to src/schemas/json/generated/Spike2RecordingInterface.json diff --git a/schemas/json/generated/SpikeGLXConverterPipe.json b/src/schemas/json/generated/SpikeGLXConverterPipe.json similarity index 100% rename from schemas/json/generated/SpikeGLXConverterPipe.json rename to src/schemas/json/generated/SpikeGLXConverterPipe.json diff --git a/schemas/json/generated/SpikeGLXNIDQInterface.json b/src/schemas/json/generated/SpikeGLXNIDQInterface.json similarity index 100% rename from schemas/json/generated/SpikeGLXNIDQInterface.json rename to src/schemas/json/generated/SpikeGLXNIDQInterface.json diff --git a/schemas/json/generated/SpikeGLXRecordingInterface.json b/src/schemas/json/generated/SpikeGLXRecordingInterface.json similarity index 100% rename from schemas/json/generated/SpikeGLXRecordingInterface.json rename to src/schemas/json/generated/SpikeGLXRecordingInterface.json diff --git a/schemas/json/generated/Suite2pSegmentationInterface.json b/src/schemas/json/generated/Suite2pSegmentationInterface.json similarity index 100% rename from schemas/json/generated/Suite2pSegmentationInterface.json rename to src/schemas/json/generated/Suite2pSegmentationInterface.json diff --git a/schemas/json/generated/TdtRecordingInterface.json b/src/schemas/json/generated/TdtRecordingInterface.json similarity index 100% rename from schemas/json/generated/TdtRecordingInterface.json rename to src/schemas/json/generated/TdtRecordingInterface.json diff --git a/schemas/json/generated/TiffImagingInterface.json b/src/schemas/json/generated/TiffImagingInterface.json similarity index 100% rename from schemas/json/generated/TiffImagingInterface.json rename to src/schemas/json/generated/TiffImagingInterface.json diff --git a/schemas/json/generated/VideoInterface.json b/src/schemas/json/generated/VideoInterface.json similarity index 100% rename from schemas/json/generated/VideoInterface.json rename to src/schemas/json/generated/VideoInterface.json diff --git a/schemas/json/path-expansion.schema.json b/src/schemas/json/path-expansion.schema.json similarity index 100% rename from schemas/json/path-expansion.schema.json rename to src/schemas/json/path-expansion.schema.json diff --git a/schemas/json/project/general.json b/src/schemas/json/project/general.json similarity index 100% rename from schemas/json/project/general.json rename to src/schemas/json/project/general.json diff --git a/schemas/json/project/globals.json b/src/schemas/json/project/globals.json similarity index 100% rename from schemas/json/project/globals.json rename to src/schemas/json/project/globals.json diff --git a/schemas/json/tutorial.schema.json b/src/schemas/json/tutorial.schema.json similarity index 100% rename from schemas/json/tutorial.schema.json rename to src/schemas/json/tutorial.schema.json diff --git a/schemas/project-metadata.schema.ts b/src/schemas/project-metadata.schema.ts similarity index 100% rename from schemas/project-metadata.schema.ts rename to src/schemas/project-metadata.schema.ts diff --git a/schemas/source-data.schema.ts b/src/schemas/source-data.schema.ts similarity index 100% rename from schemas/source-data.schema.ts rename to src/schemas/source-data.schema.ts diff --git a/schemas/subject.schema.ts b/src/schemas/subject.schema.ts similarity index 100% rename from schemas/subject.schema.ts rename to src/schemas/subject.schema.ts diff --git a/src/supported_interfaces.json b/src/supported_interfaces.json new file mode 100644 index 000000000..db1023f39 --- /dev/null +++ b/src/supported_interfaces.json @@ -0,0 +1,48 @@ +[ + "SpikeGLXRecordingInterface", + "SpikeGLXNIDQInterface", + "PhySortingInterface", + "NeuroScopeRecordingInterface", + "NeuroScopeLFPInterface", + "NeuroScopeSortingInterface", + "BiocamRecordingInterface", + "IntanRecordingInterface", + "OpenEphysRecordingInterface", + "BlackrockRecordingInterface", + "BlackrockSortingInterface", + "CellExplorerSortingInterface", + "KiloSortSortingInterface", + "TdtRecordingInterface", + "Spike2RecordingInterface", + "BrukerTiffSinglePlaneImagingInterface", + "ExtractSegmentationInterface", + "CnmfeSegmentationInterface", + "BrukerTiffMultiPlaneImagingInterface", + "MicroManagerTiffImagingInterface", + "ScanImageImagingInterface", + "TiffImagingInterface", + "MiniscopeImagingInterface", + "SbxImagingInterface", + "CaimanSegmentationInterface", + "MCSRawRecordingInterface", + "MEArecRecordingInterface", + "PlexonRecordingInterface", + "PlexonSortingInterface", + "AxonaRecordingInterface", + "VideoInterface", + "NeuralynxRecordingInterface", + "Suite2pSegmentationInterface", + "AlphaOmegaRecordingInterface", + "AlphaOmegaRecordingInterface", + "DeepLabCutInterface", + "SLEAPInterface", + "FicTracDataInterface", + "AudioInterface", + "MiniscopeBehaviorInterface", + "EDFRecordingInterface", + "SpikeGLXConverterPipe", + "BrukerTiffSinglePlaneConverter", + "BrukerTiffMultiPlaneConverter", + "MiniscopeConverter", + "CellExplorerRecordingInterface" +] diff --git a/tests/e2e/config.ts b/tests/e2e/config.ts index 09bd82153..6826a3f9b 100644 --- a/tests/e2e/config.ts +++ b/tests/e2e/config.ts @@ -3,7 +3,7 @@ import { fileURLToPath } from 'node:url' import { homedir } from 'node:os' import { existsSync } from 'node:fs' -import paths from "../../paths.config.json" assert { type: "json" }; +import paths from "../../src/paths.config.json" assert { type: "json" }; import { connect as connectToElectron } from '../puppeteer'; // ------------------------------------------------------------------ diff --git a/tests/e2e/pipelines.test.ts b/tests/e2e/pipelines.test.ts index 718d6b7ef..04f0e875a 100644 --- a/tests/e2e/pipelines.test.ts +++ b/tests/e2e/pipelines.test.ts @@ -11,11 +11,11 @@ const __dirname = dirname(fileURLToPath(import.meta.url)); const screenshotPath = join( __dirname, 'screenshots') mkdirSync(screenshotPath, { recursive: true }) -import testingSuiteYaml from "../../guide_testing_suite.yml"; +import examplePipelines from "../../src/example_pipelines.yml"; -import paths from "../../paths.config.json" assert { type: "json" }; +import paths from "../../src/paths.config.json" assert { type: "json" }; import { evaluate, initTests } from './utils' -import { header } from '../../src/renderer/src/stories/forms/utils' +import { header } from '../../src/electron/renderer/src/stories/forms/utils' // NOTE: We assume the user has put the GIN data in ~/NWB_GUIDE/test-data const guideRootPath = join(homedir(), paths.root) @@ -65,15 +65,15 @@ describe('Run example pipelines', () => { }) // Assert all the pipelines are present - expect(pipelineNames.sort()).toEqual(Object.keys(testingSuiteYaml.pipelines).map(header).sort()) + expect(pipelineNames.sort()).toEqual(Object.keys(examplePipelines).map(header).sort()) }) - for (let pipeline in testingSuiteYaml.pipelines) { + for (let pipeline in examplePipelines) { const pipelineParsed = header(pipeline) - const info = testingSuiteYaml.pipelines[pipeline] + const info = examplePipelines[pipeline] const describeFn = info.test === false ? describe.skip : describe describeFn(`${pipelineParsed}`, async ( ) => { diff --git a/tests/metadata.test.ts b/tests/metadata.test.ts index d608b7a46..f35a46efa 100644 --- a/tests/metadata.test.ts +++ b/tests/metadata.test.ts @@ -1,19 +1,19 @@ import { describe, expect, test } from 'vitest' -import { createResults } from '../src/renderer/src/stories/pages/guided-mode/data/utils' -import { mapSessions } from '../src/renderer/src/stories/pages/utils' +import { createResults } from '../src/electron/renderer/src/stories/pages/guided-mode/data/utils' +import { mapSessions } from '../src/electron/renderer/src/stories/pages/utils' -import baseMetadataSchema from '../schemas/base-metadata.schema' +import baseMetadataSchema from '../src/schemas/base-metadata.schema' import { createMockGlobalState } from './utils' import { Validator } from 'jsonschema' -import { tempPropertyKey, textToArray } from '../src/renderer/src/stories/forms/utils' -import { updateResultsFromSubjects } from '../src/renderer/src/stories/pages/guided-mode/setup/utils' -import { JSONSchemaForm } from '../src/renderer/src/stories/JSONSchemaForm' +import { tempPropertyKey, textToArray } from '../src/electron/renderer/src/stories/forms/utils' +import { updateResultsFromSubjects } from '../src/electron/renderer/src/stories/pages/guided-mode/setup/utils' +import { JSONSchemaForm } from '../src/electron/renderer/src/stories/JSONSchemaForm' -import { validateOnChange } from "../src/renderer/src/validation/index.js"; -import { SimpleTable } from '../src/renderer/src/stories/SimpleTable' -import { JSONSchemaInput } from '../src/renderer/src/stories/JSONSchemaInput.js' +import { validateOnChange } from "../src/electron/renderer/src/validation/index.js"; +import { SimpleTable } from '../src/electron/renderer/src/stories/SimpleTable' +import { JSONSchemaInput } from '../src/electron/renderer/src/stories/JSONSchemaInput.js' function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); diff --git a/tests/progress.test.ts b/tests/progress.test.ts index f00782f73..009794280 100644 --- a/tests/progress.test.ts +++ b/tests/progress.test.ts @@ -1,7 +1,7 @@ import { expect, test } from 'vitest' -import { updateAppProgress, updateFile, rename } from '../src/renderer/src/progress/update' -import { get } from '../src/renderer/src/progress' -import { remove } from '../src/renderer/src/progress/operations' +import { updateAppProgress, updateFile, rename } from '../src/electron/renderer/src/progress/update' +import { get } from '../src/electron/renderer/src/progress' +import { remove } from '../src/electron/renderer/src/progress/operations' test('updates to app progress do not fail', () => updateAppProgress('/', {})) diff --git a/tsconfig.json b/tsconfig.json index a02c857c7..a9f56c655 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,6 +13,6 @@ "noUnusedParameters": true, "noImplicitReturns": true }, - "include": ["src"], + "include": ["src", "src/schemas", "frontend"], "exclude": ["node_modules"] }