Skip to content

Commit 7b95723

Browse files
committed
Merge branch 'development' into feature/netpyne-193
2 parents 63a684d + 65aa8be commit 7b95723

11 files changed

Lines changed: 785 additions & 47 deletions

File tree

netpyne_ui/netpyne_geppetto.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,8 @@ def doIhaveInstOrSimData(self):
797797
return {'haveInstance': out[0], 'haveSimData': out[1]}
798798

799799
def rename(self, path, oldValue, newValue):
800-
command = 'sim.rename(self.' + path + ',"' + oldValue + '","' + newValue + '")'
800+
# command = 'sim.rename(self.' + path + ',"' + oldValue + '","' + newValue + '")'
801+
command = f'sim.rename(self.{path}, {oldValue!r}, {newValue!r})'
801802
logging.debug('renaming ' + command)
802803

803804
eval(command)
@@ -935,11 +936,15 @@ def getAvailableCellModels(self):
935936
cell_models.add(cm)
936937
return list(cell_models)
937938

938-
def getAvailableCellTypes(self):
939-
cell_types = set([])
940-
for p in self.netParams.cellParams:
941-
cell_types.add(p)
942-
return list(cell_types)
939+
def getAvailableCellModels(self):
940+
return ["", "VecStim", "NetStim", "IntFire1"]
941+
942+
def getAvailableStimulationDistribution(self):
943+
return ["normal", "uniform"]
944+
945+
def getAvailableStimulationPattern(self):
946+
# self.netParams.popParams[name]['spikePattern'] = {}
947+
return ["", "rhythmic", "evoked", "poisson", "gauss"]
943948

944949
def getAvailableSections(self):
945950
sections = {}

tests/frontend/e2e/jest-puppeteer.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
launch: {
3-
headless: true,
3+
headless: 'new',
44
defaultViewport: {
55
width: 1300,
66
height: 1024

tests/frontend/e2e/tests/SaveOpenFile.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const PASSWORD = 'testpassword'
3939

4040
jest.setTimeout(300000);
4141

42-
describe('Save / Open File testing', () => {
42+
describe.skip('Save / Open File testing', () => {
4343

4444
beforeAll(async () => {
4545
await page.goto(baseURL);

webapp/Utils.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,13 @@ const Utils = {
155155
return modelFields;
156156
},
157157

158+
asEscapedString (value) {
159+
return value.replace(/\\/g, '\\\\').replace(/"/g, '\\"')
160+
},
161+
158162
renameKey (path, oldValue, newValue, callback) {
163+
oldValue = oldValue.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
164+
newValue = newValue.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
159165
this.execPythonMessage(`netpyne_geppetto.rename("${path}","${oldValue}","${newValue}")`)
160166
.then((response) => {
161167
callback(response, newValue);

0 commit comments

Comments
 (0)