Skip to content

Commit 8053a5b

Browse files
authored
Merge pull request #420 from MetaCell/feature/meta_migration
Feature/meta migration
2 parents 53726d7 + e8bb57b commit 8053a5b

61 files changed

Lines changed: 9898 additions & 16898 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ init.py
1313
webapp/node_modules
1414
webapp/geppetto-client
1515
webapp/build
16+
webapp/.yalc
1617
workspace
1718
netpyne_workspace
1819
tests/frontend/e2e/node_modules
@@ -25,4 +26,5 @@ utilities/x86_64
2526
*.iml
2627
x86_64
2728
.jupyter-config
28-
venv
29+
venv
30+
node_modules

netpyne_ui/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
from jupyter_geppetto.webapi import RouteManager
22
from netpyne_ui import api
3+
import sentry_sdk
4+
5+
sentry_sdk.init(
6+
"https://d8bf7e40eec34cb9891f6dd8207b5e83@sentry.metacell.us/6",
7+
8+
# Set traces_sample_rate to 1.0 to capture 100%
9+
# of transactions for performance monitoring.
10+
# We recommend adjusting this value in production.
11+
traces_sample_rate=1.0,
12+
)
313

414
RouteManager.add_controller(api.NetPyNEController)

netpyne_ui/experiments.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def get_model_specification(name: str, trial: str) -> dict:
154154
"""
155155
path = get_trial_output_path(name, trial, fallback=True)
156156
if path is None or not os.path.exists(path):
157-
raise ExperimentsError(f"Trial file {path} not found")
157+
raise ExperimentsError(f"Condition file {path} not found")
158158

159159
with open(path, "r") as f:
160160
trial_output = json.load(f)
@@ -273,7 +273,7 @@ def onerror(func, path, exc_info):
273273

274274

275275
def _create_base_model_trial() -> model.Trial:
276-
return model.Trial(name="Trial 1", id=BASE_TRIAL_ID)
276+
return model.Trial(name="Condition 1", id=BASE_TRIAL_ID)
277277

278278

279279
def _create_trials(experiment: model.Experiment) -> List[model.Trial]:
@@ -315,7 +315,7 @@ def _create_trials(experiment: model.Experiment) -> List[model.Trial]:
315315

316316
filename = combinations["filenames"][combIdx][1:]
317317
indices = combinations["indices"][combIdx]
318-
name = f"Trial {combIdx + 1}"
318+
name = f"Condition {combIdx + 1}"
319319

320320
trials.append(
321321
model.Trial(name=name, params=params, indices=indices, id=filename)

netpyne_ui/netpyne_geppetto.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def viewExperimentResult(self, payload: dict):
138138

139139
file = experiments.get_trial_output_path(name, trial)
140140
if file is None or not os.path.exists(file):
141-
return utils.getJSONError(f"Couldn't find output file of trial. Please take a look at the simulation log.", "")
141+
return utils.getJSONError(f"Couldn't find output file of condition. Please take a look at the simulation log.", "")
142142

143143
if self.doIhaveInstOrSimData()['haveInstance']:
144144
sim.clearAll()
@@ -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())

0 commit comments

Comments
 (0)