Skip to content

Commit

Permalink
Merge pull request #193 from arayabrain/release/server-production-deploy
Browse files Browse the repository at this point in the history
Release version 1.0.0
  • Loading branch information
ReiHashimoto authored Sep 15, 2023
2 parents 6cfe6d8 + 4fca36c commit 42005b5
Show file tree
Hide file tree
Showing 678 changed files with 20,865 additions and 5,437 deletions.
6 changes: 2 additions & 4 deletions setup.cfg → .flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
[flake8]
max-line-length = 88
exclude = build, .git
extend-ignore = E203, W503

[isort]
profile = black
max-line-length = 88
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: liskin/gh-problem-matcher-wrap@d8afa2cfb66dd3f982b1950429e652bc14d0d7d2
with:
linters: isort
run: isort --check --diff optinist
run: isort --check --diff studio
black:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Run a one-line script
shell: bash
Expand Down
21 changes: 13 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,31 @@
__pycache__
.ipynb_checkpoints
.vscode/*
.idea
!.vscode/settings.json
!.vscode/extensions.json
dist
/build
optinist/frontend

optinist.extensions.yaml
optinist.namespace.yaml
*.extensions.yaml
*.namespace.yaml

files/*
Pipfile.lock
optinist.egg-info
*.egg-info
.tox
.snakemake
.pytest_cache

optinist/config.yaml
studio/test_data/output
studio/notebooks
studio/config.production*

docs/_build

optinist/notebooks
conda/envs/*
tensorflow-2.4.1-py3-none-any.whl
tensorflow-2.4.1-py3-none-any.whl

.env*
!*.env.example

process.lock
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.8
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-yaml
args:
- --unsafe
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
13 changes: 0 additions & 13 deletions Dockerfile-test

This file was deleted.

1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

59 changes: 31 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
.PHONY: test_run
test_run:
docker-compose -f docker-compose.yml down --rmi all --volumes --remove-orphans
docker-compose -f docker-compose.yml rm -f
docker-compose -f docker-compose.yml build test_optinist
docker-compose -f docker-compose.yml build test_optinist_frontend
docker-compose -f docker-compose.yml run test_optinist
docker-compose -f docker-compose.yml run test_optinist_frontend
docker-compose -f docker-compose.test.yml down --rmi all --volumes --remove-orphans
docker-compose -f docker-compose.test.yml rm -f
docker-compose -f docker-compose.test.yml build test_studio
docker-compose -f docker-compose.test.yml build test_studio_frontend
docker-compose -f docker-compose.test.yml run test_studio
docker-compose -f docker-compose.test.yml run test_studio_frontend

.PHONY: test_python
test_python:
docker-compose -f docker-compose.yml down --rmi all --volumes --remove-orphans
docker-compose -f docker-compose.yml rm -f
docker-compose -f docker-compose.yml build test_optinist
docker-compose -f docker-compose.yml run test_optinist
docker-compose -f docker-compose.test.yml down --rmi all --volumes --remove-orphans
docker-compose -f docker-compose.test.yml rm -f
docker-compose -f docker-compose.test.yml build test_studio
docker-compose -f docker-compose.test.yml run test_studio

.PHONY: test_frontend
test_frontend:
docker-compose -f docker-compose.yml down --rmi all --volumes --remove-orphans
docker-compose -f docker-compose.yml rm -f
docker-compose -f docker-compose.yml build test_optinist_frontend
docker-compose -f docker-compose.yml run test_optinist_frontend
docker-compose -f docker-compose.test.yml down --rmi all --volumes --remove-orphans
docker-compose -f docker-compose.test.yml rm -f
docker-compose -f docker-compose.test.yml build test_studio_frontend
docker-compose -f docker-compose.test.yml run test_studio_frontend

.PHONY: build_frontend
build_frontend:
docker-compose -f docker-compose.yml down --rmi all --volumes --remove-orphans
docker-compose -f docker-compose.yml rm -f
docker-compose -f docker-compose.yml build build_optinist_frontend
docker-compose -f docker-compose.yml run build_optinist_frontend
docker-compose -f docker-compose.test.yml down --rmi all --volumes --remove-orphans
docker-compose -f docker-compose.test.yml rm -f
docker-compose -f docker-compose.test.yml build build_studio_frontend
docker-compose -f docker-compose.test.yml run build_studio_frontend

.PHONY: docs
docs:
rm -rf docs/_build/
# sphinx-apidoc -f -o ./docs/_build/modules ./optinist
pip install -e '.[doc]'
# sphinx-apidoc -f -o ./docs/_build/modules ./studio
sphinx-autobuild -b html docs docs/_build --port 8001

.PHONY: dockerhub
Expand All @@ -41,25 +42,27 @@ dockerhub:

.PHONY: local_build
local_build:
cp -r frontend/build optinist/frontend/build
cd frontend
yarn install && yarn build
cd ../
pip install .

.PHONY: upload_testpypi
upload_testpypi:
mkdir -p optinist/frontend/build
cp -r frontend/build optinist/frontend/
python setup.py sdist
python -m build
twine upload --repository testpypi dist/*

.PHONY: test_pypi
test_pypi:
python3 -m pip install --index-url https://test.pypi.org/simple/ optinist
python3 -m pip install --index-url https://test.pypi.org/simple/ studio

.PHONY: push_pypi
push_pypi:
twine upload --repository pypi dist/*

.PHONY: test_doc
test_doc:
python3 -m pip install -r docs/requirements.txt
sphinx-autobuild -b html docs docs/_build --port 8001

.PHONY: format
format:
black studio *.py
isort studio *.py
flake8 studio *.py
110 changes: 14 additions & 96 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,23 @@
# optinist <img src="docs/_static/optinist.png" width="250" title="optinist" alt="optinist" align="right" vspace = "50">

# Studio
<p align="center">
<a>
<img src="https://img.shields.io/badge/-Python-F9DC3E.svg?logo=python&style=flat">
</a>
<a>
<img src="https://img.shields.io/badge/-TypeScript-007ACC.svg?logo=typescript&style=flat&logoColor=white">
</a>
<a href="https://pypi.org/project/optinist">
<img alt="PYPI" src="https://static.pepy.tech/personalized-badge/optinist?period=total&units=international_system&left_color=black&right_color=blue&left_text=Downloads(PYPI)">
</a>
<a href="https://pypi.org/project/optinist">
<img alt="PYPI" src="https://static.pepy.tech/personalized-badge/optinist?period=week&units=international_system&left_color=black&right_color=blue&left_text=Downloads/week(PYPI)">
</a>
<a href="https://pypi.org/project/optinist">
<img alt="" src="https://badge.fury.io/py/optinist.svg">
<a href="https://github.com/arayabrain/optinist-for-server">
<img alt="" src="https://img.shields.io/github/repo-size/arayabrain/optinist-for-server">
</a>
<a href="https://github.com/oist/optinist">
<img alt="" src="https://img.shields.io/github/repo-size/oist/optinist">
<a href="https://github.com/arayabrain/optinist-for-server">
<img alt="" src="https://img.shields.io/github/stars/arayabrain/optinist-for-server?style=social">
</a>
<a href="https://github.com/oist/optinist">
<img alt="" src="https://img.shields.io/github/stars/oist/optinist?style=social">
</a>
<a href="https://github.com/oist/optinist">
<img alt="" src="https://img.shields.io/github/forks/oist/optinist?style=social">
<a href="https://github.com/arayabrain/optinist-for-server">
<img alt="" src="https://img.shields.io/github/forks/arayabrain/optinist-for-server?style=social">
</a>
</p>

OptiNiSt(Optical Neuroimage Studio) is a GUI based workflow pipeline tools for processing two-photon calcium imaging data.

OptiNiSt helps researchers try multiple data analysis methods, visualize the results, and construct the data analysis pipelines easily and quickly on GUI. OptiNiSt's data-saving format follows NWB standards.

OptiNiSt also supports reproducibility of scientific research, standardization of analysis protocols, and developments of novel analysis tools as plug-in.

## Support library
### ROI detection
- [x] [Suite2p](https://github.com/MouseLand/suite2p)
- [x] [CaImAn](https://github.com/flatironinstitute/CaImAn)
- [x] [LCCD](https://github.com/magnetizedCell/lccd-python)

### Postprocessing
- [x] Basic Neural Analysis(Event Trigger Average...)
- [x] Dimenstion Reduction(PCA...)
- [x] Neural Decoding(LDA...)
- [x] Neural Population Analysis(Correlation...)

### Saving Format
- [x] [NWB](https://github.com/NeurodataWithoutBorders/pynwb)
Studio is a platform for sharing datasets, analyzing data of marmoset brain. Analysis using pipeline is based on OptiNiSt(Optical Neuroimage Studio), a GUI based workflow pipeline tools for processing two-photon calcium imaging data.


## Key Features
Expand All @@ -59,77 +30,24 @@ OptiNiSt also supports reproducibility of scientific research, standardization o
### :rocket: Managing Workflows
- **recording and reproducing**: OptiNiSt records and reproduces the workflow pipelines easily.


## Installation
Need anaconda or miniconda environment.
```
conda create -n optinist python=3.8
conda activate optinist
```

Install from pip.
```
pip install optinist
```

launch.
```
run_optinist
```

Open browser. http://localhost:8000

## Documentation
https://optinist.readthedocs.io/en/latest/


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



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

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



## Contributors
### Proposers
Kenji Doya, Yukako Yamane [OIST Neural Computation Unit](https://groups.oist.jp/ncu)

### Main Developers
[Shogo Akiyama](https://github.com/ShogoAkiyama), [Yoshifumi Takeshima](https://github.com/Yoshifumi14)
Kenichi Ohki [University of Tokyo](https://physiol1.m.u-tokyo.ac.jp/ern24596/)

### Support Developers
[Tatsuya Tanabe](https://github.com/ttya16), [Yosuke Kaneko](https://github.com/toto-maru), [Syuya Saeki](https://github.com/hiiaka)
### Developers
[Keita Matsumoto](https://github.com/emuemuJP), [Nobuo Kawada](https://github.com/itutu-tienday), [Rei Hashimoto](https://github.com/ReiHashimoto)


## References
[[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
[[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
[[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
[[PyNWB]](https://github.com/NeurodataWithoutBorders/pynwb) Oliver Rübel, Andrew Tritt, Ryan Ly, Benjamin K. Dichter, Satrajit Ghosh, Lawrence Niu, Ivan Soltesz, Karel Svoboda, Loren Frank, Kristofer E. Bouchard, "The Neurodata Without Borders ecosystem for neurophysiological data science", bioRxiv 2021.03.13.435173, March 15, 2021
[[Optinist]](https://github.com/oist/optinist)

<!-- ## Citing the Project
To cite this repository in publications:
```
@misc{OptiNiSt,
@misc{Studio,
author = {name},
title = {title},
year = {2022},
year = {2023},
publisher = {},
journal = {},
howpublished = {},
Expand Down
Loading

0 comments on commit 42005b5

Please sign in to comment.