Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/metacell/netpyne-ui
Browse files Browse the repository at this point in the history
…into feature/netpyne-24
  • Loading branch information
ddelpiano committed Jan 9, 2024
2 parents 7cef331 + d3f933c commit 5639283
Show file tree
Hide file tree
Showing 12 changed files with 902 additions and 75 deletions.
52 changes: 47 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,59 @@ your system and you have had troubles installing it you can opt for the Virtual

### Python Dependencies

We recommend the use of a new python 3 virtual environment:
We recommend the use of a new python 3.7 virtual environment.
Currently, NetPyNE-UI only supports Python 3.7, but that can change in the future.

For NetPyNE-UI, the preferred way of creating a virtual env is to pass by conda/miniconda or mamba/micromamba.
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`.
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.
However, pyenv by default installs the static version of the CPython lib, resulting in `nrniv -python` not being able to run.

The way of creating the virtualenv using (mini)conda is the following

```bash
conda create -n netpyne python=3.7
conda activate netpyne
```

Here is how to create the virtualenv using (micro)mamba

```bash
mamba create -n netpyne python=3.7 -c conda-forge
mamba activate netpyne
```

You can also directly create a virtualenv using your `python3` executable, obviously if it's the 3.7 version.

```bash
python3 -m venv npenv
source npenv/bin/activate
```

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

```bash
conda create -n netpyne python=3.7
conda activate netpyne
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --verbose 3.7.17
pyenv virtualenv 3.7.17 netpyne
pyenv shell netpyne
```

### Run install script

When you are in your virtualenv, here is how you can install the "basic" version of NetPyNE-UI:

```bash
python utilities/install.py
```

If you want to have a different version of NetPyNE or geppetto meta, you can pass the version you want to the installer:

```bash
python utilities/install.py --dev --netpyne development --geppetto development --no-test
```

This command will install the `development` version of netpyne and geppetto and disable the tests during the installation.

### Start application

```bash
Expand All @@ -62,6 +95,15 @@ For debugging you can use `run.py` instead
python run.py
```

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):

```bash
cd webapp
yarn start
```

You can then navigate to `http://127.0.0.1:8081/` to access the dev version of the UI.

## Run NetPyNE User Interface in Docker

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

```bash
docker run -p 8888:8888 netpyne-ui
docker run -p 8888:8888 netpyne-ui
```

## End-to-end tests
Expand Down
14 changes: 9 additions & 5 deletions netpyne_ui/netpyne_geppetto.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,11 +913,15 @@ def getAvailableCellModels(self):
cell_models.add(cm)
return list(cell_models)

def getAvailableCellTypes(self):
cell_types = set([])
for p in self.netParams.cellParams:
cell_types.add(p)
return list(cell_types)
def getAvailableCellModels(self):
return ["", "VecStim", "NetStim", "IntFire1"]

def getAvailableStimulationDistribution(self):
return ["normal", "uniform"]

def getAvailableStimulationPattern(self):
# self.netParams.popParams[name]['spikePattern'] = {}
return ["", "rhythmic", "evoked", "poisson", "gauss"]

def getAvailableSections(self):
sections = {}
Expand Down
2 changes: 1 addition & 1 deletion tests/frontend/e2e/jest-puppeteer.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
launch: {
headless: true,
headless: 'new',
defaultViewport: {
width: 1300,
height: 1024
Expand Down
2 changes: 1 addition & 1 deletion tests/frontend/e2e/tests/SaveOpenFile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const PASSWORD = 'testpassword'

jest.setTimeout(300000);

describe('Save / Open File testing', () => {
describe.skip('Save / Open File testing', () => {

beforeAll(async () => {
await page.goto(baseURL);
Expand Down
Loading

0 comments on commit 5639283

Please sign in to comment.