Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync master #825

Merged
merged 201 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
201 commits
Select commit Hold shift + click to select a range
df3100c
netpyne-106 Add first components for sub-cellular connectivity
aranega Feb 24, 2023
a3d51bd
netpyne-106 Add fields for the sub-cellular connectivity
aranega Feb 24, 2023
7bf1d7e
netpyne-106 Add update of settings if coord changes
aranega Feb 24, 2023
e1fb9c6
netpyne-106 Fix missing setting update on density type change
aranega Feb 24, 2023
55b942f
netpyne-105 Fix issue with string literal serialization
aranega Feb 27, 2023
dabaf27
netpyne-105 Change widget type to "func" for mechs params
aranega Feb 27, 2023
86df4a7
Bump scipy from 1.4.1 to 1.10.0
dependabot[bot] Jul 6, 2023
77bebf9
Bump restrictedpython from 5.0 to 6.1
dependabot[bot] Jul 10, 2023
3db4241
feat(neuroml): return output string on import failure
sanjayankur31 Jul 13, 2023
8c1f732
feat(neuroml): increase jvm memory
sanjayankur31 Jul 13, 2023
b553349
chore(neuroml): cosmetic tweaks
sanjayankur31 Jul 13, 2023
47726bf
Bump word-wrap from 1.2.3 to 1.2.4 in /tests/frontend/e2e
dependabot[bot] Jul 19, 2023
351bd55
Bump word-wrap from 1.2.3 to 1.2.4 in /webapp
dependabot[bot] Jul 19, 2023
190d505
Bump pygments from 2.6.1 to 2.15.0
dependabot[bot] Jul 20, 2023
08d7f13
Bump cryptography from 2.9.2 to 41.0.3
dependabot[bot] Aug 1, 2023
ef1bd58
Bump tornado from 6.1.0 to 6.3.3
dependabot[bot] Aug 14, 2023
f89555f
Fix issue with fast delete of field content
aranega Oct 18, 2023
4049204
Merge pull request #764 from MetaCell/master
ddelpiano Oct 19, 2023
c144148
Update "installation" section of the README.md
aranega Oct 20, 2023
9419e52
Merge pull request #682 from MetaCell/feature/netpyne-105
enicolasgomez Oct 26, 2023
013b931
Merge branch 'development' into feature/netpyne-106
enicolasgomez Oct 26, 2023
e09838e
Merge pull request #681 from MetaCell/feature/netpyne-106
enicolasgomez Oct 26, 2023
36f5f82
Merge pull request #762 from MetaCell/dependabot/pip/tornado-6.3.3
enicolasgomez Oct 30, 2023
476d149
Merge pull request #760 from MetaCell/dependabot/pip/cryptography-41.0.3
enicolasgomez Oct 30, 2023
9c3a325
Merge branch 'feature/depandabot_20231030' into dependabot/pip/pygmen…
enicolasgomez Oct 30, 2023
b111968
Merge pull request #756 from MetaCell/dependabot/pip/pygments-2.15.0
enicolasgomez Oct 30, 2023
69550df
Merge pull request #755 from MetaCell/dependabot/npm_and_yarn/webapp/…
enicolasgomez Oct 30, 2023
baa9a82
Merge branch 'feature/depandabot_20231030' into dependabot/npm_and_ya…
enicolasgomez Oct 30, 2023
86cc427
Merge pull request #754 from MetaCell/dependabot/npm_and_yarn/tests/f…
enicolasgomez Oct 30, 2023
516c841
Merge pull request #746 from sanjayankur31/feat/show-neuroml-import-e…
enicolasgomez Oct 30, 2023
d8996b3
Merge pull request #737 from MetaCell/dependabot/pip/restrictedpython…
enicolasgomez Oct 30, 2023
5471bdb
Merge pull request #735 from MetaCell/dependabot/pip/scipy-1.10.0
enicolasgomez Oct 30, 2023
d042422
Merge branch 'development' of github.com:MetaCell/NetPyNE-UI into fix…
aranega Oct 31, 2023
343a0a7
fix selector in test step
Oct 31, 2023
0cab979
regenerating dependencies
Nov 2, 2023
6cc710d
Add mechanism to be able to react on kernel status change from the
aranega Nov 7, 2023
cbf17ec
Image compatibility with OSB tweaks
filippomc Nov 7, 2023
a15dcb9
netpyne-24 Escape variables that are transmitted to python
aranega Nov 7, 2023
2586be8
Merge branch 'development' into feature/readme-update
aranega Nov 7, 2023
0b05197
netpyne-44 Create dedicated store for commands
aranega Nov 8, 2023
d437e86
netpyne-44 Add first implementation of a replay system
aranega Nov 8, 2023
9903141
netpyne-44 Add new action to drop last command
aranega Nov 8, 2023
9d83db9
netpyne-44 Update kernel listener internal state machine
aranega Nov 8, 2023
391a9b6
netpyne-44 Fix issue with non reopening modal
aranega Nov 8, 2023
2856508
Merge pull request #774 from MetaCell/feature/osb-deployment
enicolasgomez Nov 8, 2023
8fa70f9
netpyne-44 Fix Dialog component
aranega Nov 9, 2023
d4e3e8b
netpyne-44 Fix ActionValidation component
aranega Nov 9, 2023
b6f2722
netpyne-44 Add informative dialog about kernel restart
aranega Nov 9, 2023
c2d7bb0
netpyne-44 Remove crash button
aranega Nov 9, 2023
f2bec70
netpyne-44 Differenciate restart from unexpected restart
aranega Nov 9, 2023
6937f1b
Merge pull request #763 from MetaCell/fix/bug-fastdelete
enicolasgomez Nov 9, 2023
7439079
Merge branch 'development' of github.com:MetaCell/NetPyNE-UI into fea…
aranega Nov 13, 2023
311cd11
Merge branch 'development' of github.com:MetaCell/NetPyNE-UI into fea…
aranega Nov 13, 2023
e192576
Merge branch 'development' of github.com:MetaCell/NetPyNE-UI into fea…
aranega Nov 13, 2023
a152c69
NETPYNE-184 fix dev deployment
filippomc Nov 14, 2023
87b3167
Merge pull request #777 from MetaCell/feature/NETPYNE-184
enicolasgomez Nov 14, 2023
caabc04
Cherry picked changes after rebase
enicolasgomez Nov 14, 2023
a288d9d
fixed wrong scipy version
enicolasgomez Nov 14, 2023
cf1650b
Copied requirements file from dev
enicolasgomez Nov 14, 2023
26a2262
fix selector names for tutorials
Nov 14, 2023
60cc73f
changed experiment selector
Nov 14, 2023
8f0a96e
fix experiment selectors
Nov 14, 2023
0dca468
#netpyne-172 Dummy Stimulation area
vidhya-metacell Nov 14, 2023
a86576d
selector fix
Nov 14, 2023
2768b1d
Add back the "BUILD_ARGS" variable in Dockerfile
aranega Nov 15, 2023
cc78268
Add back build variables for Docker
aranega Nov 16, 2023
6eb2e55
Change order of vars to take advantage of cache
aranega Nov 16, 2023
f945d4a
netpyne-44 Add auto-save from the initial point
aranega Nov 16, 2023
87d0140
netpyne-44 Add handling of kernel crash loop
aranega Nov 20, 2023
4e09f44
Merge branch 'development' of github.com:MetaCell/NetPyNE-UI into fea…
aranega Nov 20, 2023
9b72790
Merge pull request #783 from MetaCell/fix/netpyne-deployment
ddelpiano Nov 20, 2023
f899b70
Merge pull request #780 from MetaCell/fix/14nov
enicolasgomez Nov 20, 2023
a5c222e
Merge pull request #781 from MetaCell/fix/14nov
enicolasgomez Nov 20, 2023
8c58a1f
#Netpyne172 Population Stim sources UI
vidhya-metacell Nov 21, 2023
c575ccf
netpyne-172 Comment some components
aranega Nov 22, 2023
b75493d
Merge branch 'development' of github.com:MetaCell/NetPyNE-UI into fea…
aranega Nov 22, 2023
13a98c1
#netpyne-172 Add another pulse functional
vidhya-metacell Nov 22, 2023
3ac7a77
Merge branch 'feature/Netpyne-172' of github.com:MetaCell/NetPyNE-UI …
aranega Nov 22, 2023
f4063c7
Fixed Python console styling
enicolasgomez Nov 22, 2023
18297b1
#netpyne-172 All fields dummy UI
vidhya-metacell Nov 22, 2023
0734552
Added AdapterComponent onChange handle to CoordsRange
enicolasgomez Nov 22, 2023
a45fba1
Competed missing functionality in CoordsRange component
enicolasgomez Nov 23, 2023
1db7d36
netpyne-172 Change layout of some components for complex stimulation
aranega Nov 23, 2023
6f389b4
Merge branch 'feature/Netpyne-172' of github.com:MetaCell/NetPyNE-UI …
aranega Nov 23, 2023
e77504f
netpyne-172 Fix merge issue
aranega Nov 23, 2023
4a3abe9
netpyne-172 Add layouts for all patterns
aranega Nov 24, 2023
fa97c66
Completed Coords Range missing functionality
enicolasgomez Nov 24, 2023
7876448
Added numeric validation to coords range fields
enicolasgomez Nov 24, 2023
4f04375
netpyne-172 Add last missing components
aranega Nov 27, 2023
930b1af
Merge branch 'development' of github.com:MetaCell/NetPyNE-UI into fea…
aranega Nov 27, 2023
50481d6
netpyne-24 Update pattern for special char masking
aranega Nov 27, 2023
3ef3185
netpyne-44 Do not record simulation commands
aranega Nov 27, 2023
7cef331
netpyne-24 Fix bug about name escaping
aranega Nov 28, 2023
c6aeb1f
Added handling for CoordsRange type change
enicolasgomez Nov 28, 2023
55e4da2
Fixed ids for textfields in coords range component
enicolasgomez Nov 28, 2023
b444bab
Merge pull request #785 from MetaCell/feature/188-range-fields-fix
ddelpiano Nov 28, 2023
1119234
Merge pull request #765 from MetaCell/feature/readme-update
ddelpiano Nov 28, 2023
63a684d
nepyne-193 Add first version of model validation
aranega Dec 1, 2023
fca1012
Added CspHtmlWebpackPlugin
enicolasgomez Dec 4, 2023
89e0819
Added headers to devServer
enicolasgomez Dec 4, 2023
d4e4dd6
Changed CSP
enicolasgomez Dec 4, 2023
354b9ba
Fixed state changes on type changes
enicolasgomez Dec 5, 2023
7d13a6b
removed .lock files
Dec 5, 2023
5ed2054
regenerating package-lock.json
Dec 5, 2023
d3ec768
Changed installation script so tornado supports CSP frame ancestors p…
enicolasgomez Dec 5, 2023
945ead1
Merge pull request #788 from MetaCell/feature/fix-coords-range-update
ddelpiano Dec 5, 2023
ac5d491
Fixed to last reported cases
enicolasgomez Dec 6, 2023
c1c8e09
Merge pull request #790 from MetaCell/feature/188-fix-coords-range-up…
ddelpiano Dec 6, 2023
179b1c5
Updated dependencies
enicolasgomez Dec 6, 2023
5e2bb2b
Reversed back package lock
enicolasgomez Dec 6, 2023
e945639
Forced parent div styling
enicolasgomez Dec 12, 2023
330823c
skipping failed test
Dec 12, 2023
d8377ed
Added missing dependency
enicolasgomez Dec 13, 2023
6d10519
added back yarn lock file
enicolasgomez Dec 13, 2023
aca1517
Merge pull request #792 from MetaCell/test/skip_fail
ddelpiano Dec 19, 2023
8d2a7f0
Merge branch 'development' of https://github.com/metacell/netpyne-ui …
ddelpiano Dec 20, 2023
1f971da
fixing tests and temp id in main.js for testing purposes
ddelpiano Dec 20, 2023
a32999b
adding if for when tests are from local to skip the login
SimaoBolota-MetaCell Dec 20, 2023
eea03c9
Added new frame ancestor directives
enicolasgomez Dec 20, 2023
a6f3b8d
other tests with the same logic when starting
SimaoBolota-MetaCell Dec 20, 2023
6111173
Extended base Select functionality
enicolasgomez Dec 20, 2023
6ba0f00
Fixes on webpack
enicolasgomez Dec 21, 2023
4cb04a0
Fixed type selection on ConnectivityRules
enicolasgomez Jan 8, 2024
739472c
NETPYNE-172: fixing one field
ddelpiano Jan 9, 2024
502f6f6
NETPYNE-172: cleanup
ddelpiano Jan 9, 2024
d3f933c
Merge pull request #786 from MetaCell/feature/Netpyne-172
ddelpiano Jan 9, 2024
5639283
Merge branch 'development' of https://github.com/metacell/netpyne-ui …
ddelpiano Jan 9, 2024
65aa8be
Merge pull request #772 from MetaCell/feature/netpyne-24
ddelpiano Jan 9, 2024
dceddff
browser and page instances for each test
SimaoBolota-MetaCell Jan 9, 2024
6c8f8d9
#199 Add Cell list to Dimensions
D-GopalKrishna Jan 9, 2024
9a4a28e
solve sandbox issue
SimaoBolota-MetaCell Jan 9, 2024
deb5fc4
Rolledback some changes
enicolasgomez Jan 9, 2024
9d2a0b1
Added back yarn lock file
enicolasgomez Jan 9, 2024
3813c9b
#199 remove cell List from NetPynePopulation Tab
D-GopalKrishna Jan 10, 2024
f08546b
separated tutorials and festures tests
SimaoBolota-MetaCell Jan 10, 2024
7b95723
Merge branch 'development' into feature/netpyne-193
aranega Jan 10, 2024
f8fd4cf
NETPYNE-193 Add validation on intantiation
aranega Jan 10, 2024
5f70e53
netpyne-193 Fix typo
aranega Jan 11, 2024
071ae73
Hacked iframe console so its always visibile but still hidden by layo…
enicolasgomez Jan 11, 2024
7f3ac43
#199 Cell list add child as dict or list(dict)
D-GopalKrishna Jan 14, 2024
d2fbce3
Merge branch 'development' into feature/199
D-GopalKrishna Jan 14, 2024
266813f
#199 NetPyNEPopulation - Merge branch 'development' into feature/199
D-GopalKrishna Jan 14, 2024
c0bb909
#199 remove the cellList tab from the development branch
D-GopalKrishna Jan 14, 2024
7f03a5f
Fix deployment -- default url
filippomc Jan 16, 2024
e96c366
Merge branch 'feature/iframe-throttling-fix-rebase' of github.com:Met…
filippomc Jan 16, 2024
c06fc85
Completed NetPyNESubcellsConnectivityRule missing component
enicolasgomez Jan 17, 2024
dad3bd8
divided tutorials tests
SimaoBolota-MetaCell Jan 22, 2024
f99210e
added sleep
SimaoBolota-MetaCell Jan 22, 2024
64262b8
NETPYNE-200: adding subcellular icon
ddelpiano Jan 23, 2024
63a2f71
Merge pull request #805 from MetaCell/feature/NETPYNE-200
ddelpiano Jan 23, 2024
038eb64
Merge pull request #773 from MetaCell/feature/netpyne-44
ddelpiano Jan 24, 2024
178d32f
Merge pull request #779 from MetaCell/feature/iframe-throttling-fix-r…
ddelpiano Jan 24, 2024
1738525
Merge pull request #799 from MetaCell/feature/netpyne-193
ddelpiano Jan 24, 2024
dd70fa6
Merge pull request #802 from MetaCell/feature/187-drop-downs-selection-2
ddelpiano Jan 24, 2024
e2ad45a
Merge branch 'development' of https://github.com/metacell/netpyne-ui …
ddelpiano Jan 24, 2024
b701053
Merge branch 'development' of https://github.com/metacell/netpyne-ui …
ddelpiano Jan 24, 2024
607170d
Update README.md
enicolasgomez Jan 24, 2024
437d2a6
Update README.md
enicolasgomez Jan 24, 2024
ed99891
#199 - Fix - cellList to cellsList and improve parsing in ListComponent
D-GopalKrishna Jan 25, 2024
91d362f
Merge remote-tracking branch 'origin/feature/199' into feature/199
D-GopalKrishna Jan 25, 2024
08253e1
Fixing ui crash
ddelpiano Jan 25, 2024
58dcfe8
code cleanup
ddelpiano Jan 25, 2024
ba52bd5
Merge pull request #801 from MetaCell/feature/199
ddelpiano Jan 25, 2024
081362a
Release 1.1: bumping release version up
ddelpiano Jan 25, 2024
b72b555
added sleep in individual simple tutprials tests
SimaoBolota-MetaCell Jan 26, 2024
255759d
Merge branch 'development' into codefresh/tests
SimaoBolota-MetaCell Jan 26, 2024
f80b3ef
improved tests adding waitrForSelectors on missing clicks
SimaoBolota-MetaCell Jan 26, 2024
075d397
Merge branch 'codefresh/tests' of https://github.com/MetaCell/NetPyNE…
SimaoBolota-MetaCell Jan 26, 2024
9288711
errors in codefresh for these lines
SimaoBolota-MetaCell Jan 30, 2024
42773ed
upgraded to geppetto 1.2.7
enicolasgomez Feb 5, 2024
a3a71b4
Merge pull request #787 from MetaCell/feature/depandabot_20231030
ddelpiano Feb 5, 2024
fbc4834
Merge pull request #807 from MetaCell/codefresh/tests
enicolasgomez Feb 6, 2024
d995bd1
NETPYNE-209 hooked events on notebook load
filippomc Feb 8, 2024
3f2014b
Optimize dockerfile
filippomc Feb 8, 2024
130abf4
Merge pull request #808 from MetaCell/feature/NETPYNE-209
ddelpiano Feb 14, 2024
fa59d8a
bumping netpyne version up
ddelpiano Feb 14, 2024
6760222
Fix dockerfile
filippomc Feb 15, 2024
bb5529c
Merge pull request #809 from MetaCell/fix/dockerfile
ddelpiano Feb 15, 2024
ad14106
NETPYNE-213: fixing dropdown issue
ddelpiano Feb 22, 2024
2406ce5
NETPYNE-208: fixing icons position
ddelpiano Feb 22, 2024
7a7c3fe
Merge pull request #813 from MetaCell/feature/NETPYNE-208
enicolasgomez Feb 22, 2024
c21dbb7
e2e tests improvements for codefresh integration
SimaoBolota-MetaCell Feb 25, 2024
82e6604
e2e tests improvements for codefresh integration
SimaoBolota-MetaCell Feb 25, 2024
cb63c68
fixing versions in dialog
ddelpiano Feb 26, 2024
9e495c6
Merge pull request #814 from MetaCell/feature/NETPYNE-208
ddelpiano Feb 26, 2024
777c3c6
aligning package files used for develop
ddelpiano Feb 26, 2024
4a867bb
Merge pull request #815 from MetaCell/feature/NETPYNE-208
ddelpiano Feb 26, 2024
c87d28f
bumping node version down
ddelpiano Feb 27, 2024
e86c76a
Merge pull request #816 from MetaCell/feature/NETPYNE-208
ddelpiano Feb 27, 2024
38bc39e
removed non updated expect
SimaoBolota-MetaCell Feb 27, 2024
c11d769
reverting to node 18 and geppetto-meta 1.2.0
ddelpiano Feb 27, 2024
6c5e7ca
Merge pull request #817 from MetaCell/feature/NETPYNE-208
ddelpiano Feb 27, 2024
c3b9bce
Removed sorting function to keep initial values
enicolasgomez Feb 28, 2024
a99bd85
improved method for waiting for EEG and Dipole imgs
SimaoBolota-MetaCell Feb 28, 2024
e573b07
commented out tests workflow in github actions
SimaoBolota-MetaCell Feb 28, 2024
a103201
Merge pull request #820 from MetaCell/clean/githubactions
ddelpiano Feb 28, 2024
f05dd9f
Upgraded to geppetto-meta 1.2.8
enicolasgomez Mar 5, 2024
798cf71
Merge pull request #819 from MetaCell/bug/208-widgets-order
enicolasgomez Mar 5, 2024
e589ff7
incrementing rendering threshold
ddelpiano Mar 5, 2024
5167f8b
waitForSelector timeout
SimaoBolota-MetaCell Mar 6, 2024
421bbd0
skipped some steps to make the test faster
SimaoBolota-MetaCell Mar 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
512 changes: 256 additions & 256 deletions .github/workflows/tests.yml

Large diffs are not rendered by default.

94 changes: 64 additions & 30 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,67 +1,101 @@
FROM node:14.21.3-bullseye as jsbuild
FROM node:18 as jsbuild

WORKDIR /app

COPY --chown=1000:1000 webapp/package.json .
COPY --chown=1000:1000 webapp/yarn.lock .
ENV FOLDER=netpyne

WORKDIR $FOLDER/webapp
COPY webapp/package.json .
COPY webapp/yarn.lock .

RUN yarn install --network-timeout 1000000000

COPY webapp/ .
COPY webapp .
RUN yarn build-dev


RUN rm -Rf node_modules/*
### Download on a separate stage to run in parallel with buildkit
FROM jupyter/base-notebook:hub-1.5.0 as downloads
USER root
RUN wget --no-check-certificate -O /nyhead.mat https://www.parralab.org/nyhead/sa_nyhead.mat

###
FROM jupyter/base-notebook:hub-1.5.0
ENV NB_UID=jovyan
ENV FOLDER=netpyne
ARG BUILD_ARGS=""
ARG WORKSPACE_VERSION=master
# ARG GEPPETTO_VERSION=development
# ARG NETPYNE_VERSION=master

ENV FOLDER=/home/jovyan/work/NetPyNE-UI
ENV NP_LFPYKIT_HEAD_FILE=/home/jovyan/nyhead.mat

USER root

RUN rm -rf /var/lib/apt/lists
RUN apt-get update -qq &&\
apt-get install python3-tk vim nano unzip git make libtool g++ -qq pkg-config libfreetype6-dev libpng-dev libopenmpi-dev openjdk-11-jre-headless -y -y
apt-get install python3-tk vim nano unzip git make libtool g++ -qq pkg-config libfreetype6-dev libpng-dev libopenmpi-dev -y
RUN apt-get install openjdk-11-jre-headless -y
RUN conda install python=3.7 -y


WORKDIR $FOLDER
COPY --chown=1000:1000 requirements.txt requirements.txt
RUN --mount=type=cache,target=/root/.cache python -m pip install --upgrade pip && pip install -r requirements.txt --prefer-binary
COPY --chown=1000:1000 requirements.txt requirements.txt
RUN --mount=type=cache,target=/root/.cache python -m pip install --upgrade pip &&\
pip install -r requirements.txt --prefer-binary


# ToDo: fixme, for now remove the jupyter hub config json file because it overrides the default
# and thus removes the frame ancestor cors settings
RUN rm -f ~/.jupyter/*.json
RUN chown $NB_UID .
RUN chown $NB_UID /opt
RUN rm -Rf workspace
# sym link workspace pvc to $FOLDER
RUN mkdir -p /opt/workspace
RUN mkdir -p /opt/user

COPY netpyne_ui netpyne_ui
COPY utilities utilities
COPY setup.py .
COPY tests tests
COPY NetPyNE-UI .
COPY README.rst .
COPY requirements-test.txt .


USER $NB_UID

COPY --chown=jovyan:1000 . .
COPY --from=jsbuild --chown=jovyan:1000 /app webapp



ENV NEURON_HOME=/opt/conda


USER root

RUN jupyter nbextension install --py --symlink --sys-prefix jupyter_geppetto
RUN jupyter nbextension enable --py --sys-prefix jupyter_geppetto
RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension
RUN jupyter serverextension enable --py --sys-prefix jupyter_geppetto

RUN python utilities/install.py ${BUILD_ARGS} --workspace $WORKSPACE_VERSION
ARG BUILD_ARGS=""
ARG WORKSPACE_VERSION=master

RUN jupyter labextension disable @jupyterlab/hub-extension
RUN --mount=type=cache,target=/root/.cache python -m pip install --upgrade pip &&\
python utilities/install.py ${BUILD_ARGS} --workspace $WORKSPACE_VERSION --npm-skip

RUN chown $NB_UID .
RUN chown -R $NB_UID workspace

# Temp fixes for eeg plots
ENV NEURON_HOME=/opt/conda
# For lfpykit 0.4
# RUN wget -P $(pip show LFPykit | grep "Location:" | awk '{print $2"/lfpykit"}') https://www.parralab.org/nyhead/sa_nyhead.mat
# For lpfykit 0.5
ENV NP_LFPYKIT_HEAD_FILE=/home/jovyan/nyhead.mat
RUN wget --no-check-certificate -O $NP_LFPYKIT_HEAD_FILE https://www.parralab.org/nyhead/sa_nyhead.mat
RUN mv workspace /opt/workspace/tutorials
RUN chown -R $NB_UID /opt/workspace
RUN ln -s /opt/workspace workspace

RUN jupyter labextension disable @jupyterlab/hub-extension

COPY --from=downloads --chown=1000:1000 /nyhead.mat $NP_LFPYKIT_HEAD_FILE
COPY --from=jsbuild --chown=1000:1000 $FOLDER/webapp/build webapp/build

RUN chown -R $NB_UID /home/jovyan/.jupyter
RUN touch app.log && chown $NB_UID app.log
USER $NB_UID


EXPOSE 8888

ENTRYPOINT ["tini", "-g", "--"]



CMD ./NetPyNE-UI
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
6 changes: 3 additions & 3 deletions jupyter_hub/Dockerfile_spawner
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ RUN /bin/bash -c "INCUBATOR_VER=${INCUBATOR_VER} source activate snakes && pip i
# Clone NetPyNE-UI and install the development version
RUN wget https://github.com/MetaCell/NetPyNE-UI/archive/$netpyneuiBranch.zip -q
RUN unzip $netpyneuiBranch.zip
WORKDIR /home/jovyan/work/NetPyNE-UI-$netpyneuiBranch/utilities
WORKDIR /opt/workspace-$netpyneuiBranch/utilities
RUN /bin/bash -c "source activate snakes && python --version"
RUN /bin/bash -c "source activate snakes && exec python install.py branch $netpyneuiBranch"
WORKDIR /home/jovyan
RUN git clone https://github.com/Neurosim-lab/netpyne_workspace
WORKDIR /home/jovyan/workspace
RUN ln -sfn /home/jovyan/work/NetPyNE-UI-$netpyneuiBranch/netpyne_ui/tests tests
RUN ln -sfn /opt/workspace-$netpyneuiBranch/netpyne_ui/tests tests

# Copy jupyterhub_config
# RUN cp /home/jovyan/work/NetPyNE-UI-$netpyneuiBranch/jupyterhub_config.py .
# RUN cp /opt/workspace-$netpyneuiBranch/jupyterhub_config.py .

CMD /bin/bash -c "source activate snakes && exec jupyterhub-singleuser --debug --NotebookApp.default_url=/geppetto --NotebookApp.token='' --library=netpyne_ui"
4 changes: 2 additions & 2 deletions k8s/cf_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ hub:
shutdownOnLogout: true
extraConfig:
timing: |
c.Spawner.notebook_dir = '/home/jovyan/work/NetPyNE-UI'
c.Spawner.notebook_dir = '/opt/workspace'
c.Spawner.default_url = '/geppetto'
spawner: >-
c.Spawner.args = ["--library=netpyne_ui"]
c.Spawner.args = ["--library=netpyne_ui", "--NotebookApp.default_url=/geppetto"]
singleuser:
storage:
type: none
Expand Down
2 changes: 1 addition & 1 deletion k8s/minikube_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ hub:
c.Spawner.port = 8000
c.Spawner.http_timeout = 300
c.Spawner.start_timeout = 300
c.Spawner.notebook_dir = '/home/jovyan/work/NetPyNE-UI'
c.Spawner.notebook_dir = '/opt/workspace'
c.Spawner.default_url = '/geppetto'
c.Spawner.debug = True
c.Spawner.disable_check_xsrf=True
Expand Down
44 changes: 28 additions & 16 deletions netpyne_ui/helpers/neuroml.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
import sys
import logging
from netpyne.specs import simConfig
from packaging import version

import pyneuroml
from pyneuroml import pynml
from pyneuroml.lems import generate_lems_file_for_neuroml
from pyneuroml.pynml import read_neuroml2_file
Expand All @@ -13,57 +15,67 @@
def convertLEMSSimulation(lemsFileName, compileMod=True):
"""Converts a LEMS Simulation file

Converts a LEMS Simulation file (https://docs.neuroml.org/Userdocs/LEMSSimulation.html)
pointing to a NeuroML 2 file into the equivalent in NetPyNE
Converts a LEMS Simulation file
(https://docs.neuroml.org/Userdocs/LEMSSimulation.html) pointing to a
NeuroML 2 file into the equivalent in NetPyNE

Returns:
simConfig, netParams for the model in NetPyNE
"""
current_path = os.getcwd()
try:

fullLemsFileName = os.path.abspath(lemsFileName)
tmp_path = os.path.dirname(fullLemsFileName)
tmp_path = os.path.dirname(fullLemsFileName)
if tmp_path:
os.chdir(tmp_path)
logging.info(
"Importing LEMSSimulation with NeuroML 2 network from: %s"
% fullLemsFileName
)

result = pynml.run_lems_with_jneuroml_netpyne(
lemsFileName, only_generate_json=True, exit_on_fail=False)

if result == False:
raise Exception("Error loading lems file")
# feature to return output added in 1.0.9
if version.parse(pyneuroml.__version__) >= version.parse("1.0.9"):
result, output_msg = pynml.run_lems_with_jneuroml_netpyne(
lemsFileName, only_generate_json=True, exit_on_fail=False,
return_string=True, max_memory="1G")

if result is False:
raise Exception(f"Error loading lems file: {output_msg}")
else:
result = pynml.run_lems_with_jneuroml_netpyne(
lemsFileName, only_generate_json=True, exit_on_fail=False,
max_memory="1G")

if result is False:
raise Exception("Error loading lems file")

lems = pynml.read_lems_file(lemsFileName)

np_json_fname = fullLemsFileName.replace('.xml','_netpyne_data.json')

return np_json_fname
finally:
os.chdir(current_path)




def convertNeuroML2(nml2FileName, compileMod=True):
"""Loads a NeuroML 2 file into NetPyNE
Loads a NeuroML 2 file into NetPyNE by creating a new LEMS Simulation
file (https://docs.neuroml.org/Userdocs/LEMSSimulation.html) and using jNeuroML
to convert it.
file (https://docs.neuroml.org/Userdocs/LEMSSimulation.html) and using
jNeuroML to convert it.

Returns:
simConfig, netParams for the model in NetPyNE
"""
current_path = os.getcwd()
try:
fullNmlFileName = os.path.abspath(nml2FileName)
work_path = os.path.dirname(fullNmlFileName)
work_path = os.path.dirname(fullNmlFileName)
if not os.path.exists(work_path):
os.makedirs(work_path)
os.chdir(work_path)
sys.path.append(work_path)


logging.info(
"Importing NeuroML 2 network from: %s"
Expand Down
Loading