Skip to content

Commit 5639283

Browse files
committed
Merge branch 'development' of https://github.com/metacell/netpyne-ui into feature/netpyne-24
2 parents 7cef331 + d3f933c commit 5639283

12 files changed

Lines changed: 902 additions & 75 deletions

File tree

README.md

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,59 @@ your system and you have had troubles installing it you can opt for the Virtual
3030

3131
### Python Dependencies
3232

33-
We recommend the use of a new python 3 virtual environment:
33+
We recommend the use of a new python 3.7 virtual environment.
34+
Currently, NetPyNE-UI only supports Python 3.7, but that can change in the future.
35+
36+
For NetPyNE-UI, the preferred way of creating a virtual env is to pass by conda/miniconda or mamba/micromamba.
37+
The pyenv tool can be also used, but it requires to be compiled with some special options to have NEURON running properly the simulation using `nrniv`.
38+
The reason behind this is that NEURON is distributed as a Python wheel with a specific option which force NEURON to look for the CPython dynamic lib.
39+
However, pyenv by default installs the static version of the CPython lib, resulting in `nrniv -python` not being able to run.
40+
41+
The way of creating the virtualenv using (mini)conda is the following
42+
43+
```bash
44+
conda create -n netpyne python=3.7
45+
conda activate netpyne
46+
```
47+
48+
Here is how to create the virtualenv using (micro)mamba
49+
50+
```bash
51+
mamba create -n netpyne python=3.7 -c conda-forge
52+
mamba activate netpyne
53+
```
54+
55+
You can also directly create a virtualenv using your `python3` executable, obviously if it's the 3.7 version.
3456

3557
```bash
3658
python3 -m venv npenv
3759
source npenv/bin/activate
3860
```
3961

40-
Or, with conda
62+
If you want to use anyway pyenv, here is how to properly create the virtualenv and activate it.
4163

4264
```bash
43-
conda create -n netpyne python=3.7
44-
conda activate netpyne
65+
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --verbose 3.7.17
66+
pyenv virtualenv 3.7.17 netpyne
67+
pyenv shell netpyne
4568
```
4669

4770
### Run install script
4871

72+
When you are in your virtualenv, here is how you can install the "basic" version of NetPyNE-UI:
73+
4974
```bash
5075
python utilities/install.py
5176
```
5277

78+
If you want to have a different version of NetPyNE or geppetto meta, you can pass the version you want to the installer:
79+
80+
```bash
81+
python utilities/install.py --dev --netpyne development --geppetto development --no-test
82+
```
83+
84+
This command will install the `development` version of netpyne and geppetto and disable the tests during the installation.
85+
5386
### Start application
5487

5588
```bash
@@ -62,6 +95,15 @@ For debugging you can use `run.py` instead
6295
python run.py
6396
```
6497

98+
To run the UI in dev mode, you need to run `python run.py` in one terminal, and use `yarn` from the `webapp` folder, using node v14 (use `nvm` if you need to have a different version of node than the one installed on your system):
99+
100+
```bash
101+
cd webapp
102+
yarn start
103+
```
104+
105+
You can then navigate to `http://127.0.0.1:8081/` to access the dev version of the UI.
106+
65107
## Run NetPyNE User Interface in Docker
66108

67109
Ensure that you have Docker installed on your system.
@@ -75,7 +117,7 @@ docker build -t netpyne-ui .
75117
Run the image
76118

77119
```bash
78-
docker run -p 8888:8888 netpyne-ui
120+
docker run -p 8888:8888 netpyne-ui
79121
```
80122

81123
## End-to-end tests

netpyne_ui/netpyne_geppetto.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -913,11 +913,15 @@ def getAvailableCellModels(self):
913913
cell_models.add(cm)
914914
return list(cell_models)
915915

916-
def getAvailableCellTypes(self):
917-
cell_types = set([])
918-
for p in self.netParams.cellParams:
919-
cell_types.add(p)
920-
return list(cell_types)
916+
def getAvailableCellModels(self):
917+
return ["", "VecStim", "NetStim", "IntFire1"]
918+
919+
def getAvailableStimulationDistribution(self):
920+
return ["normal", "uniform"]
921+
922+
def getAvailableStimulationPattern(self):
923+
# self.netParams.popParams[name]['spikePattern'] = {}
924+
return ["", "rhythmic", "evoked", "poisson", "gauss"]
921925

922926
def getAvailableSections(self):
923927
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);

0 commit comments

Comments
 (0)