Skip to content

Commit 01fb072

Browse files
committed
Added test_netpyne_exported_model_1
1 parent 42b60ad commit 01fb072

8 files changed

Lines changed: 288 additions & 933 deletions

File tree

netpyne_ui/netpyne_geppetto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def instantiateNetPyNEModelInGeppetto(self, args):
184184
self.geppetto_model = self.model_interpreter.getGeppettoModel(netpyne_model)
185185

186186
return json.loads(GeppettoModelSerializer.serialize(self.geppetto_model))
187-
except Exception:
187+
except Exception as e:
188188
message = "Error while instantiating the NetPyNE model"
189189
logging.exception(message)
190190
return utils.getJSONError(message, sys.exc_info())

tests/backend/netypne_model_importer_test.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def setUpClass(cls):
3636
logging.error("Error loading mechanisms", exc_info=True)
3737

3838
def test_dict_import_1(self):
39+
assert 0
3940
print("------------------------------------")
4041
print("Dictionary transform importModel:")
4142
print("------------------------------------")
@@ -60,6 +61,40 @@ def test_dict_import_1(self):
6061
netpyne = NetPyNEGeppetto()
6162
netpyne.importModel(netpyne_info)
6263

64+
def test_netpyne_exported_model_1(self):
65+
print("------------------------------------")
66+
print("Netpyne export model")
67+
print("------------------------------------")
68+
69+
params = {}
70+
71+
HERE = os.path.dirname(os.path.realpath(__file__))
72+
ROOT = os.path.dirname(HERE)
73+
74+
params["areModFieldsRequired"] = False
75+
params["compileMod"] = False
76+
params["exploreOnlyDirs"] = False
77+
params["explorerDialogOpen"] = False
78+
params["explorerParameter"] = ""
79+
params["freezeInstance"] = True
80+
params["freezeSimulation"] = True
81+
params["jsonModelFolder"] = ROOT + "/workspace/HHCellNetwork.txt_data.json"
82+
params["jsonPath"] = ""
83+
params["loadNet"] = True
84+
params["loadNetParams"] = True
85+
params["loadSimCfg"] = True
86+
params["loadSimData"] = True
87+
params["modFolder"] = ""
88+
params["modPath"] = ""
89+
params["tab"] = "simulate"
90+
91+
netpyne = NetPyNEGeppetto()
92+
93+
netpyne.loadModel(params)
94+
netpyne.instantiateNetPyNEModel()
95+
96+
return False
97+
6398
if __name__ == '__main__':
6499
try:
65100
unittest.main()

webapp/Main.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@ import { NetPyNE } from './components';
88
import theme from './theme';
99
import store from './redux/store';
1010
import '@metacell/geppetto-meta-ui/flex-layout/style/dark.scss';
11+
import { CaptureConsole } from "@sentry/integrations";
1112

1213
global.GEPPETTO_CONFIGURATION = require('./GeppettoConfiguration.json');
1314
const { initGeppetto } = require('@metacell/geppetto-meta-client/GEPPETTO');
1415

1516
Sentry.init({
1617
dsn: "https://d8bf7e40eec34cb9891f6dd8207b5e83@sentry.metacell.us/6",
17-
integrations: [new Integrations.BrowserTracing()],
18-
tracesSampleRate: 1.0,
18+
integrations: [
19+
new CaptureConsole({
20+
levels: ['error']
21+
})
22+
],
23+
tracesSampleRate: 1.0
1924
});
2025

2126
initGeppetto();

webapp/dev_package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"@nosferatu500/react-sortable-tree": "3.0.5",
2727
"@sentry/react": "^6.16.1",
2828
"@sentry/tracing": "^6.16.1",
29+
"@sentry/integrations": "^6.17.0",
2930
"jquery": "^3.6.0",
3031
"js-base64": "^3.6.1",
3132
"less-vars-to-js": "^1.3.0",

webapp/package.bak

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"@metacell/geppetto-meta-core": "file:.yalc/@metacell/geppetto-meta-core",
2525
"@metacell/geppetto-meta-ui": "file:.yalc/@metacell/geppetto-meta-ui",
2626
"@nosferatu500/react-sortable-tree": "3.0.5",
27+
"@sentry/integrations": "^6.17.0",
2728
"@sentry/react": "^6.16.1",
2829
"@sentry/tracing": "^6.16.1",
2930
"jquery": "^3.6.0",
@@ -36,9 +37,9 @@
3637
"react-redux": "^7.2.0",
3738
"react-sortable-tree": "^2.8.0",
3839
"redux": "^4.1.0",
39-
"three": "0.111.0",
40+
"sass": "^1.49.0",
4041
"sass-loader": "^7.2.0",
41-
"node-sass": "^5.0.0"
42+
"three": "0.111.0"
4243
},
4344
"resolutions": {
4445
"@material-ui/core": "4.11.4"

webapp/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"@metacell/geppetto-meta-core": "file:.yalc/@metacell/geppetto-meta-core",
2525
"@metacell/geppetto-meta-ui": "file:.yalc/@metacell/geppetto-meta-ui",
2626
"@nosferatu500/react-sortable-tree": "3.0.5",
27+
"@sentry/integrations": "^6.17.0",
2728
"@sentry/react": "^6.16.1",
2829
"@sentry/tracing": "^6.16.1",
2930
"jquery": "^3.6.0",

webapp/yalc.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"version": "v1",
33
"packages": {
44
"@metacell/geppetto-meta-client": {
5-
"signature": "9f667d89932afb12e262f8d8746fcbc0",
5+
"signature": "016087a1607a1a92f97c54920b169396",
66
"file": true
77
},
88
"@metacell/geppetto-meta-core": {
99
"signature": "0fec34906589f67e813f2fc1d8697ecf",
1010
"file": true
1111
},
1212
"@metacell/geppetto-meta-ui": {
13-
"signature": "8971ad352d957f4f5ddf5518790845d5",
13+
"signature": "d7f831eec9e600d32983d0ea73566b25",
1414
"file": true
1515
}
1616
}

0 commit comments

Comments
 (0)