Skip to content

Commit 9d6d747

Browse files
authored
Merge pull request #651 from oist/develop-main
Develop main
2 parents ccc71a0 + 784bfaf commit 9d6d747

File tree

322 files changed

+11011
-5297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

322 files changed

+11011
-5297
lines changed

.vscode/settings.example.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
}
1212
},
1313
"eslint.workingDirectories": ["frontend"],
14+
"editor.defaultFormatter": "esbenp.prettier-vscode",
15+
"editor.formatOnSave": true,
1416
"flake8.args": ["--config=.flake8"],
1517
// NOTE: Uncomment following line and fix "optinist_dev" to your conda env name
1618
// "flake8.path": ["conda", "run", "-n", "optinist_dev", "python", "-m", "flake8"],

Makefile

Lines changed: 61 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,69 @@
1+
#
2+
# optinist Makefile
3+
#
4+
5+
############################## For Testing ##############################
6+
7+
define rm_unused_docker_containers
8+
docker ps -a --filter "status=exited" --filter "name=$(1)" --format "{{.ID}}" | xargs --no-run-if-empty docker rm
9+
endef
10+
11+
PYTEST = poetry run pytest -s
12+
113
.PHONY: test_run
214
test_run:
3-
docker-compose -f docker-compose.test.yml down --rmi all --volumes --remove-orphans
4-
docker-compose -f docker-compose.test.yml rm -f
5-
docker-compose -f docker-compose.test.yml build test_studio
6-
docker-compose -f docker-compose.test.yml build test_studio_frontend
7-
docker-compose -f docker-compose.test.yml run test_studio
8-
docker-compose -f docker-compose.test.yml run test_studio_frontend
9-
10-
.PHONY: test_python
11-
test_python:
12-
docker-compose -f docker-compose.test.yml down --rmi all --volumes --remove-orphans
13-
docker-compose -f docker-compose.test.yml rm -f
14-
docker-compose -f docker-compose.test.yml build test_studio
15-
docker-compose -f docker-compose.test.yml run test_studio
15+
# cleanup
16+
docker compose -f docker-compose.test.yml down
17+
docker compose -f docker-compose.test.yml rm -f
18+
@$(call rm_unused_docker_containers, test_studio_backend)
19+
# build/run
20+
docker compose -f docker-compose.test.yml build test_studio_backend
21+
docker compose -f docker-compose.test.yml build test_studio_frontend
22+
docker compose -f docker-compose.test.yml run test_studio_backend $(PYTEST) -m "not heavier_processing"
23+
docker compose -f docker-compose.test.yml run test_studio_frontend
24+
25+
.PHONY: test_backend
26+
test_backend:
27+
# cleanup
28+
docker compose -f docker-compose.test.yml down
29+
docker compose -f docker-compose.test.yml rm -f
30+
@$(call rm_unused_docker_containers, test_studio_backend)
31+
# build/run
32+
docker compose -f docker-compose.test.yml build test_studio_backend
33+
docker compose -f docker-compose.test.yml run test_studio_backend $(PYTEST) -m "not heavier_processing"
34+
35+
.PHONY: test_backend_full
36+
test_backend_full:
37+
# cleanup
38+
docker compose -f docker-compose.test.yml down
39+
docker compose -f docker-compose.test.yml rm -f
40+
@$(call rm_unused_docker_containers, test_studio_backend)
41+
# build/run
42+
docker compose -f docker-compose.test.yml build test_studio_backend
43+
docker compose -f docker-compose.test.yml run test_studio_backend $(PYTEST)
1644

1745
.PHONY: test_frontend
1846
test_frontend:
19-
docker-compose -f docker-compose.test.yml down --rmi all --volumes --remove-orphans
20-
docker-compose -f docker-compose.test.yml rm -f
21-
docker-compose -f docker-compose.test.yml build test_studio_frontend
22-
docker-compose -f docker-compose.test.yml run test_studio_frontend
47+
# cleanup
48+
docker compose -f docker-compose.test.yml down
49+
docker compose -f docker-compose.test.yml rm -f
50+
@$(call rm_unused_docker_containers, test_studio_frontend)
51+
# build/run
52+
docker compose -f docker-compose.test.yml build test_studio_frontend
53+
docker compose -f docker-compose.test.yml run test_studio_frontend
54+
55+
56+
############################## For Building ##############################
2357

2458
.PHONY: build_frontend
2559
build_frontend:
26-
docker-compose -f docker-compose.test.yml down --rmi all --volumes --remove-orphans
27-
docker-compose -f docker-compose.test.yml rm -f
28-
docker-compose -f docker-compose.test.yml build build_studio_frontend
29-
docker-compose -f docker-compose.test.yml run build_studio_frontend
60+
# cleanup
61+
docker compose -f docker-compose.build.yml down
62+
docker compose -f docker-compose.build.yml rm -f
63+
@$(call rm_unused_docker_containers, studio-build-fe)
64+
# build/run
65+
docker compose -f docker-compose.build.yml build studio-build-fe
66+
docker compose -f docker-compose.build.yml run studio-build-fe
3067

3168
.PHONY: format
3269
format:
@@ -47,6 +84,9 @@ local_build:
4784
cd frontend && yarn install --ignore-scripts && yarn build
4885
poetry build
4986

87+
88+
############################## For Deployment ##############################
89+
5090
.PHONY: push_testpypi
5191
push_testpypi:
5292
poetry publish -r testpypi

README.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,90 +34,104 @@ OptiNiSt helps researchers try multiple data analysis methods, visualize the res
3434
OptiNiSt also supports reproducibility of scientific research, standardization of analysis protocols, and developments of novel analysis tools as plug-in.
3535

3636
## Support library
37+
3738
### ROI detection
39+
3840
- [x] [Suite2p](https://github.com/MouseLand/suite2p)
3941
- [x] [CaImAn](https://github.com/flatironinstitute/CaImAn)
4042
- [x] [LCCD](https://github.com/magnetizedCell/lccd-python)
4143

4244
### Postprocessing
45+
4346
- [x] Basic Neural Analysis(Event Trigger Average...)
4447
- [x] Dimension Reduction(PCA...)
4548
- [x] Neural Decoding(LDA...)
4649
- [x] Neural Population Analysis(Correlation...)
4750

4851
### Saving Format
49-
- [x] [NWB](https://github.com/NeurodataWithoutBorders/pynwb)
5052

53+
- [x] [NWB](https://github.com/NeurodataWithoutBorders/pynwb)
5154

5255
## Key Features
56+
5357
### :beginner: Easy-To-Create Workflow
58+
5459
- **zero-knowledge of coding**: OptiNiSt allows you to create analysis pipelines easily on the GUI.
5560

5661
### :zap: Visualizing analysis results
62+
5763
- **quick visualization**: OptiNiSt supports you visualize the analysis results by plotly.
5864

5965
### :rocket: Managing Workflows
60-
- **recording and reproducing**: OptiNiSt records and reproduces the workflow pipelines easily.
6166

67+
- **recording and reproducing**: OptiNiSt records and reproduces the workflow pipelines easily.
6268

6369
## Installation
64-
Need anaconda or miniconda environment.
70+
71+
Need anaconda or miniconda or miniforge environment.
72+
6573
```
6674
conda create -n optinist python=3.8
6775
conda activate optinist
6876
```
6977

7078
Install from pip.
79+
7180
```
7281
pip install optinist
7382
```
7483

7584
launch.
85+
7686
```
7787
run_optinist
7888
```
7989

8090
Open browser. http://localhost:8000
8191

8292
## Documentation
83-
https://optinist.readthedocs.io/en/latest/
8493

94+
https://optinist.readthedocs.io/en/latest/
8595

8696
## Using GUI
97+
8798
### Workflow
99+
88100
- OptiNiSt allows you to make your analysis pipelines by graph style using nodes and edges on GUI. Parameters for each analysis are easily changeable.
89101
<p align="center">
90102
<img width="400px" src="docs/_static/workflow/whole.png" alt="workflow" />
91103
</p>
92104

93-
94-
95105
### Visualize
106+
96107
- OptiNiSt allows you to visualize the analysis results with one click by plotly. It supports a variety of plotting styles.
97108
<p align="center">
98109
<img width="400px" src="docs/_static/visualize/whole.png" alt="visualize" />
99110
</p>
100111

101112
### Record
113+
102114
- OptiNiSt supports you in recording and reproducing workflow pipelines in an organized manner.
103115
<p align="center">
104116
<img width="400px" src="docs/_static/record/whole.png" alt="record" />
105117
</p>
106118

107-
108-
109119
## Contributors
120+
110121
### Proposers
122+
111123
Kenji Doya, Yukako Yamane [OIST Neural Computation Unit](https://groups.oist.jp/ncu)
112124

113125
### Main Developers
126+
114127
[Shogo Akiyama](https://github.com/ShogoAkiyama), [Yoshifumi Takeshima](https://github.com/Yoshifumi14)
115128

116129
### Support Developers
117-
[Tatsuya Tanabe](https://github.com/ttya16), [Yosuke Kaneko](https://github.com/toto-maru), [Syuya Saeki](https://github.com/hiiaka)
118130

131+
[Tatsuya Tanabe](https://github.com/ttya16), [Yosuke Kaneko](https://github.com/toto-maru), [Syuya Saeki](https://github.com/hiiaka)
119132

120133
## References
134+
121135
[[Suite2p]](https://github.com/MouseLand/suite2p) Marius Pachitariu, Carsen Stringer, Mario Dipoppa, Sylvia Schröder, L. Federico Rossi, Henry Dalgleish, Matteo Carandini, Kenneth D. Harris. "Suite2p: beyond 10,000 neurons with standard two-photon microscopy". 2017
122136
[[CaImAn]](https://github.com/flatironinstitute/CaImAn) Andrea Giovannucci Is a corresponding author, Johannes Friedrich, Pat Gunn, Jérémie Kalfon, Brandon L Brown, Sue Ann Koay, Jiannis Taxidis, Farzaneh Najafi, Jeffrey L Gauthier, Pengcheng Zhou, Baljit S Khakh, David W Tank, Dmitri B Chklovskii, Eftychios A Pnevmatikakis. "CaImAn: An open source tool for scalable Calcium Imaging data Analysis". 2019
123137
[[LCCD]](https://github.com/magnetizedCell/lccd-python) Tsubasa Ito, Keisuke Ota, Kanako Ueno, Yasuhiro Oisi, Chie Matsubara, Kenta Kobayashi, Masamichi Ohkura, Junichi Nakai, Masanori Murayama, Toru Aonishi, "Low computational-cost cell detection method for calcium imaging data", 2022

docker-compose.dev.multiuser.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
version: "3"
2+
3+
services:
4+
db:
5+
image: mysql:8.4
6+
ports:
7+
- "127.0.0.1:13306:3306"
8+
env_file:
9+
- studio/config/.env
10+
volumes:
11+
- db_data:/var/lib/mysql
12+
environment:
13+
TZ: Asia/Tokyo
14+
healthcheck:
15+
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"]
16+
interval: 10s
17+
timeout: 5s
18+
retries: 3
19+
20+
studio-dev-be:
21+
build:
22+
context: .
23+
dockerfile: studio/config/docker/Dockerfile.dev
24+
working_dir: /app
25+
volumes:
26+
- .:/app
27+
# optinist data outputs directories
28+
- ../optinist-docker-volumes/.snakemake/:/app/.snakemake
29+
- ../optinist-docker-volumes/logs/:/app/logs
30+
- ../optinist-docker-volumes/studio_data/:/app/studio_data
31+
ports:
32+
- "127.0.0.1:8000:8000"
33+
command: >
34+
bash -c "
35+
alembic upgrade head &&
36+
poetry run python main.py --reload --host 0.0.0.0 --port 8000
37+
"
38+
environment:
39+
PYTHONPATH: /app/
40+
TZ: Asia/Tokyo
41+
OPTINIST_DIR: /app/studio_data
42+
depends_on:
43+
db:
44+
condition: service_healthy
45+
46+
studio-dev-fe:
47+
image: node:20.8.0-alpine3.18
48+
working_dir: /app/frontend
49+
volumes:
50+
- ./frontend/:/app/frontend/:cached
51+
ports:
52+
- "127.0.0.1:3000:3000"
53+
command: ash -c 'yarn install && yarn start'
54+
environment:
55+
TZ: Asia/Tokyo
56+
57+
volumes:
58+
db_data:

docker-compose.dev.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ services:
88
working_dir: /app
99
volumes:
1010
- .:/app
11+
# optinist data outputs directories
12+
- ../optinist-docker-volumes/.snakemake/:/app/.snakemake
13+
- ../optinist-docker-volumes/logs/:/app/logs
1114
- ../optinist-docker-volumes/studio_data/:/app/studio_data
1215
ports:
1316
- "127.0.0.1:8000:8000"

docker-compose.test.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
version: "3.8"
2-
31
services:
4-
test_studio:
5-
image: test_studio
6-
container_name: test_studio
2+
test_studio_backend:
3+
image: test_studio_backend
4+
container_name: test_studio_backend
75
build:
86
context: .
97
dockerfile: studio/config/docker/Dockerfile.test
108
environment:
119
PYTHONPATH: .
1210
TZ: Asia/Tokyo
13-
command: bash -c "poetry install --no-root --with test && poetry run python3 -m pytest -s"
1411
volumes:
1512
- .:/app
1613

docs/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Documentation
2+
3+
### Sphinx
4+
Make HTML using Sphinx. Used to see changes made when updating readthedocs.
5+
- [Sphinx documentation](https://docs.readthedocs.io/en/stable/config-file/v2.html)
6+
7+
1. `cd docs`
8+
2. `pip install -r requirements.txt`
9+
3. `make html`
10+
4. Open the generated HTML:
11+
- Mac: `open _build/html/index.html`
12+
- Windows: `start _build/html/index.html`
309 KB
Loading

docs/_static/visualize/commit.png

278 KB
Loading
321 KB
Loading

0 commit comments

Comments
 (0)