Skip to content

Commit 73c04d5

Browse files
committed
Merge branch 'fixes-model-build' into release/1.0.0-notebook-fix
2 parents 540eab3 + eaa9686 commit 73c04d5

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

netpyne_ui/mod_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def is_loaded_mechanisms():
2626
return True
2727

2828

29-
def loadModMechFiles(compileMod, modFolder):
29+
def loadModMechFiles(compileMod, modFolder, forceRecompile=False):
3030
# Create Symbolic link
3131

3232
if compileMod:
@@ -35,7 +35,9 @@ def loadModMechFiles(compileMod, modFolder):
3535
modPath = os.path.join(str(modFolder), "x86_64")
3636

3737
if os.path.exists(modPath):
38-
shutil.rmtree(modPath)
38+
if forceRecompile:
39+
shutil.rmtree(modPath)
40+
return
3941

4042
os.chdir(modFolder)
4143
subprocess.call(["nrnivmodl"])

netpyne_ui/netpyne_geppetto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ def importModel(self, modelParameters):
550550
# Shouldn't be specific to Import
551551
sim.clearAll()
552552
try:
553-
loadModMechFiles(modelParameters['compileMod'], modelParameters['modFolder'])
553+
loadModMechFiles(modelParameters['compileMod'], modelParameters['modFolder'], modelParameters.get("forceRecompile", True))
554554
except Exception:
555555
message = "Error while importing/compiling mods"
556556
logging.exception(message)

webapp/redux/middleware/middleware.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,8 @@ export default (store) => (next) => (action) => {
401401
const params = {
402402
modFolder: dirname + '/mod',
403403
loadMod: false,
404-
compileMod: true,
404+
compileMod: false,
405+
forceRecompile: false,
405406

406407
netParamsPath: dirname,
407408
netParamsModuleName: tutName,

0 commit comments

Comments
 (0)