Skip to content

Commit

Permalink
Reorganization of core outer folders
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed May 22, 2024
1 parent 9960b42 commit dd806bb
Show file tree
Hide file tree
Showing 287 changed files with 360 additions and 340 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ coverage
# Ignore node_modules folder
node_modules
build/api
pyflask/ds
src/pyflask/ds
src/Users
semantic
semantic.json
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src="src/renderer/assets/img/logo-guide-draft-transparent-tight.png" width="250" alt="NeuroConv logo"/>
<img src="src/electron/renderer/assets/img/logo-guide-draft-transparent-tight.png" width="250" alt="NeuroConv logo"/>
<h3 align="center">NWB Graphical User Interface for Data Entry</h3>
<p align="center">
<a href="https://github.com/NeurodataWithoutBorders/nwb-guide/actions/workflows/testing.yml"><img src="https://github.com/NeurodataWithoutBorders/nwb-guide/actions/workflows/testing.yml/badge.svg" alt="Full Tests"></a>
Expand Down
2 changes: 1 addition & 1 deletion demos/sse/test_sse_display_of_tqdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/developer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ 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
1. **src/electron/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.)
2. **src/electron/renderer/assets** - Contains all the frontend-facing assets (e.g. images, css, etc.)
3. **pyflask** - Contains all the source code for the backend


Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 32 additions & 7 deletions electron.vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,36 @@ import { defineConfig } from "electron-vite";

import ViteYaml from "@modyfi/vite-plugin-yaml";

// electron.vite.config.js
import { resolve } from 'path'

export default defineConfig({
main: {},
preload: {},
renderer: {
plugins: [ViteYaml()],
},
});
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: './src/electron/renderer',
plugins: [ViteYaml()],
build: {
rollupOptions: {
input: {
index: resolve(__dirname, 'index.html')
}
}
}
}
})
8 changes: 4 additions & 4 deletions generateInterfaceSchema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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(
Expand Down
50 changes: 0 additions & 50 deletions guideGlobalMetadata.json

This file was deleted.

168 changes: 0 additions & 168 deletions guide_testing_suite.yml

This file was deleted.

4 changes: 2 additions & 2 deletions nwb-guide.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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,
Expand Down
Loading

0 comments on commit dd806bb

Please sign in to comment.