From ce4116a3f220f0c063f2c54df53ca589cb2d3879 Mon Sep 17 00:00:00 2001 From: ReiHashimoto <42664619+ReiHashimoto@users.noreply.github.com> Date: Tue, 7 Nov 2023 18:09:55 +0900 Subject: [PATCH 1/9] update internal links --- docs/gui/visualize.md | 1 + docs/gui/workflow.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/gui/visualize.md b/docs/gui/visualize.md index ec3738789..0dffd0bcb 100644 --- a/docs/gui/visualize.md +++ b/docs/gui/visualize.md @@ -1,3 +1,4 @@ +(Visualize)= Visualize ================= diff --git a/docs/gui/workflow.md b/docs/gui/workflow.md index 7e233c105..cd5c4d2f3 100644 --- a/docs/gui/workflow.md +++ b/docs/gui/workflow.md @@ -100,7 +100,7 @@ Select algorithms or analysis methods from the treeview on the left by clicking The left side of the window displays all available analysis methods. Clicking on the + mark adds the analysis nodes to the Workflow field. ROI detection tools (currently Suite2P, CaImAn and LCCD) are in the "Algorithm" category, and all other pre-installed analyses are in the "optinist" category. Let's start with sample TIFF data (`mouse2p_2_long.tiff`) and try Suite2P ROI detection. -First, you need to determine the image you will use. Select your image as explained [above](#assigning-input-data-path). +First, you need to determine the image you will use. Select your image as explained [above](#setting-input-data). Once it is selected, the name of the files is shown in the Image node. ### Parameter button and output button on the node @@ -115,7 +115,7 @@ Each node has PARAM button and OUTPUT button. - **Editing Parameters:** Click on the PARAM button to view the parameters. You can edit them as needed. The names, types, and default values of the parameters are the same as the original algorithms. Refer to the original documentation to confirm the meaning of the parameters. The link list is available at [Implemented Analysis](https://optinist.readthedocs.io/en/latest/utils/implemented_analysis.html). -- **Checking Results:** The OUTPUT button is for a quick check of the results. The button becomes active after the successful execution of the pipeline. For details about the charts, see [Inspecting the Images and the Plots on Visualize](#inspecting-the-images-and-the-plots-on-visualize). +- **Checking Results:** The OUTPUT button is for a quick check of the results. The button becomes active after the successful execution of the pipeline. For details about the charts, see [](Visualize). ### Connecting Nodes From a35af042e999d2d7599c7eb5fc5beef7f1972460 Mon Sep 17 00:00:00 2001 From: ReiHashimoto <42664619+ReiHashimoto@users.noreply.github.com> Date: Tue, 7 Nov 2023 18:10:26 +0900 Subject: [PATCH 2/9] remove unused files --- docs/installation/create_virtualenv.md | 40 ----- .../each_platforms_for_developer_use_mamba.md | 152 ------------------ docs/installation/settings.md | 35 ---- 3 files changed, 227 deletions(-) delete mode 100644 docs/installation/create_virtualenv.md delete mode 100644 docs/installation/each_platforms_for_developer_use_mamba.md delete mode 100644 docs/installation/settings.md diff --git a/docs/installation/create_virtualenv.md b/docs/installation/create_virtualenv.md deleted file mode 100644 index 9e6643e4a..000000000 --- a/docs/installation/create_virtualenv.md +++ /dev/null @@ -1,40 +0,0 @@ -Run workflow from an existing conda environment -================= - -snakemake can be executed using an existing virtual environment. -The following is the procedure to execute a function in a virtual environment created in advance. - -```{contents} -:depth: 4 -``` - -## create a virtual environment -Create a virtual environment for suite2p. (Make sure you are on the optinist root directory.) - -### create suite2p environment -``` -conda env create --prefix ./conda/envs/suite2p -f ./conda/yaml/suite2p_env.yaml --force -``` - -### create optinist postprocessing(PCA, ETA, etc.) environment -``` -conda env create --prefix ./conda/envs/optinist -f ./conda/yaml/optinist_env.yaml --force -``` - -### create caiman environment -``` -conda env create --prefix ./conda/envs/caiman -f ./conda/yaml/caiman_env.yaml --force -``` - -For M1 mac, re-install tensorflow. -[Downalod tensorflow.whl]( -https://drive.google.com/drive/folders/1oSipZLnoeQB0Awz8U68KYeCPsULy_dQ7) -``` -conda activate ./conda/envs/caiman && pip install ./tensorflow-2.4.1-py3-none-any.whl --no-dependencies --force-reinstall -```` - -## FAQ - -A virtual environment will be created in `optinist/conda/envs`. - -*If you have errors here, it would be helpful if you could check conda's install errors or ask questions on issue, etc. diff --git a/docs/installation/each_platforms_for_developer_use_mamba.md b/docs/installation/each_platforms_for_developer_use_mamba.md deleted file mode 100644 index 00415a4bb..000000000 --- a/docs/installation/each_platforms_for_developer_use_mamba.md +++ /dev/null @@ -1,152 +0,0 @@ -Each Platforms for Developer (Use Mamba) -================= - -```{contents} -:depth: 4 -``` - -## Installation - -We introduce how to install optinist for developer. -We have developed optinist python(backend) and typescript(frontend), so you need to make both environment. -Please follow instructions below. - -## 1. Make backend environment - -### Install Tools - -- Unix-like platforms - - Linux - - [Install Tools](linux.md#install-tools) - - Windows WSL - - [Install Tools](windows.md#install-tools-1) - - Mac - - [Install Tools](mac.md#install-tools) -- Windows - - *Under construction. - -#### Install Node.js - -Get node with version 16 or 18 -- [Node.js Official](https://nodejs.org/ja) -- version 20 is not supported yet. - -You can also install node via [nvm](https://github.com/nvm-sh/nvm) - -After install node, install yarn. -```bash -npm install -g yarn -``` - -#### Install Mamba - -- Unix-like platforms - - https://mamba.readthedocs.io/en/latest/installation.html - - Use Mambaforge - - https://github.com/conda-forge/miniforge#mambaforge - - Install - - for Linux - ``` - curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh" - bash Mambaforge-$(uname)-$(uname -m).sh - - # restart shell, and check mamba installed. (show version) - mamba --version - ``` - - for Mac (fixed with x86_64) - ``` - curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-x86_64.sh" - bash Mambaforge-$(uname)-x86_64.sh - - # restart shell, and check mamba installed. (show version) - mamba --version - ``` -- Windows - - *Under construction. - -### Clone repository - -``` -git clone https://github.com/oist/optinist.git -cd ./optinist -``` - -### Create mamba(anaconda) environment - - - -``` -mamba create -n optinist_dev python=3.8 -conda activate optinist_dev -``` - -``` -conda config --set channel_priority strict -``` - -- Note: - - If mamba is already installed, snakamake prefers to use mamba over conda. - - -### Install requirements - -``` -pip install -e '.[dev]' -``` - -### Set saving directory - -Optinist default saving directory is `/tmp/studio`. If you reboot your PC, this repogitory content is deleted. And setting the saving directory in environment path. -``` -export OPTINIST_DIR="your_saving_dir" -``` - - - -## 2. Run backend - -``` -python main.py -``` -- `python main.py` log is as blow: -``` -$ run_optinist -INFO: Will watch for changes in these directories: ['/home/oist/optinist/backend'] -INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) -INFO: Started reloader process [6520] using statreload -INFO: Started server process [6557] -INFO: Waiting for application startup. -INFO: Application startup complete. -``` - -## 3. Run frontend - -Open new terminal window, and go to `frontend` directory. - -``` -cd optinist/frontend -``` - -Then install packages and run. -``` -yarn install -yarn start -``` - -- Launch browser, and go to http://localhost:3000 - -```{eval-rst} -.. note:: - frontend in development environment uses port 3000, - while production optinist uses 8000. -``` - -It opens correctly! - -Done! diff --git a/docs/installation/settings.md b/docs/installation/settings.md deleted file mode 100644 index 6acb58221..000000000 --- a/docs/installation/settings.md +++ /dev/null @@ -1,35 +0,0 @@ -# GitHub SSH access settings -**You only need to do the following once.** - -**CAUTION for Windows Users** : If you don't have git installed, you need to install [git-for-windows](https://git-scm.com/download/win) or, git command in WSL2. - -On Terminal or Git Bash or WSL2 terminal, -``` -git config --global user.name "user.name" -git config --global user.email "user@oist.jp" -git config --global core.quotepath false -``` -On your shell, -``` -git config --global user.name "user.name" -git config --global user.email "user@oist.jp" -git config --global core.quotepath false -``` -make your ssh key -``` -mkdir ~/.ssh -cd ~/.ssh -ssh-keygen -t rsa -#Enter -#Input passphrase (empty for no passphrase): -#Input passphrase (again) -``` -Open the generated public key (rsa.pub) with a text editor and copy all the contents. -Go to GitHub and follow the steps below to register your public key. - -1. Log in to GitHub and select `Settings` from the menu on the top right -2. Select `SSH and GPG keys` -3. Press `New SSH Key` -4. Enter the `Title` (optional) and `Key` (paste the copied content) and press `Add SSH` key. - -This completes the SSH connection settings! From 9a668f1301e2ce901d5eeca01a4e5be8aaa50a6e Mon Sep 17 00:00:00 2001 From: ReiHashimoto <42664619+ReiHashimoto@users.noreply.github.com> Date: Tue, 7 Nov 2023 18:10:56 +0900 Subject: [PATCH 3/9] update recommended extensions --- .vscode/extensions.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 7dac179ce..140ade0ba 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,6 +2,8 @@ "recommendations": [ "ms-python.black-formatter", "ms-python.flake8", - "ms-python.isort" + "ms-python.isort", + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode" ] } From d6f967c768158b7f15a5b21ef1b7c31e85e22e5c Mon Sep 17 00:00:00 2001 From: ReiHashimoto <42664619+ReiHashimoto@users.noreply.github.com> Date: Tue, 7 Nov 2023 19:54:58 +0900 Subject: [PATCH 4/9] remove unused comment outs --- docs/installation/docker_for_developer.md | 8 +-- .../each_platforms_for_developer.md | 11 +--- docs/installation/index.rst | 1 - docs/installation/linux.md | 25 --------- docs/installation/mac.md | 17 ------ docs/installation/windows.md | 54 +------------------ 6 files changed, 4 insertions(+), 112 deletions(-) diff --git a/docs/installation/docker_for_developer.md b/docs/installation/docker_for_developer.md index e247101c1..5d48856f0 100644 --- a/docs/installation/docker_for_developer.md +++ b/docs/installation/docker_for_developer.md @@ -32,12 +32,6 @@ docker compose -f docker-compose.dev.yml up - add `-d` option to make container run in background - - ## 2. Access to backend - Launch browser, and go to http://localhost:3000 @@ -51,4 +45,4 @@ Under maintenance... Done! -If you will make PRs, please see the [](Contributing) section. +If you will make PRs, please see the [](for_developers) section. diff --git a/docs/installation/each_platforms_for_developer.md b/docs/installation/each_platforms_for_developer.md index 219b9b4bf..2b2a18487 100644 --- a/docs/installation/each_platforms_for_developer.md +++ b/docs/installation/each_platforms_for_developer.md @@ -28,9 +28,8 @@ Please follow instructions below. #### Install Node.js -Get node with version 16 or 18 +Get node with version 20 - [Node.js Official](https://nodejs.org/ja) -- version 20 is not supported yet. You can also install node via [nvm](https://github.com/nvm-sh/nvm) @@ -63,7 +62,7 @@ conda config --set channel_priority strict pip install -e '.[dev]' ``` -If you will make PRs, please see the [](Contributing) section. +If you will make PRs, please see the [](for_developers) section. ### Set saving directory @@ -72,12 +71,6 @@ Optinist default saving directory is `/tmp/studio`. If you reboot your PC, this export OPTINIST_DIR="your_saving_dir" ``` - - ## 2. Run backend ``` diff --git a/docs/installation/index.rst b/docs/installation/index.rst index 3ae3edb06..75a551022 100644 --- a/docs/installation/index.rst +++ b/docs/installation/index.rst @@ -17,4 +17,3 @@ Installation docker_for_developer each_platforms_for_developer -.. each_platforms_for_developer_use_mamba diff --git a/docs/installation/linux.md b/docs/installation/linux.md index 19dc2c051..4bacac2f6 100644 --- a/docs/installation/linux.md +++ b/docs/installation/linux.md @@ -39,18 +39,6 @@ conda create -n optinist python=3.8 conda activate optinist ``` - - - ### Install library @@ -65,19 +53,6 @@ Optinist default saving directory is `/tmp/studio`. If you reboot your PC, this export OPTINIST_DIR="your_saving_dir" ``` - - - ## 2. Run backend ``` diff --git a/docs/installation/mac.md b/docs/installation/mac.md index cffbab5a9..3aeb3e6d6 100644 --- a/docs/installation/mac.md +++ b/docs/installation/mac.md @@ -37,9 +37,6 @@ conda create -n optinist python=3.8 conda activate optinist ``` - ### Install library @@ -54,20 +51,6 @@ Optinist default saving directory is `/tmp/studio`. If you reboot your PC, this export OPTINIST_DIR="your_saving_dir" ``` - - - ## 2. Run backend ``` diff --git a/docs/installation/windows.md b/docs/installation/windows.md index 4fdc2dfd3..cee72f629 100644 --- a/docs/installation/windows.md +++ b/docs/installation/windows.md @@ -45,19 +45,7 @@ conda create -n optinist python=3.8 conda activate optinist ``` - - #### Install library @@ -65,22 +53,7 @@ conda install -n base -c conda-forge mamba pip install optinist ``` - + #### Set saving directory @@ -142,18 +115,6 @@ conda create -n optinist python=3.8 conda activate optinist ``` - - - #### Install library @@ -168,19 +129,6 @@ Optinist default saving directory is `/tmp/studio`. If you reboot your PC, this export OPTINIST_DIR="your_saving_dir" ``` - - ### 2. Run backend From b8468efa76aaa7c8ef8d9c9512a8bdeea25a0490 Mon Sep 17 00:00:00 2001 From: ReiHashimoto <42664619+ReiHashimoto@users.noreply.github.com> Date: Tue, 7 Nov 2023 20:01:40 +0900 Subject: [PATCH 5/9] fix broken nodejs link --- docs/host_for_multiuser/setup.md | 4 ++-- docs/installation/each_platforms_for_developer.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/host_for_multiuser/setup.md b/docs/host_for_multiuser/setup.md index 523495478..438f7704e 100644 --- a/docs/host_for_multiuser/setup.md +++ b/docs/host_for_multiuser/setup.md @@ -98,8 +98,8 @@ Follow the steps below to setup `multiuser` mode. - `MYSQL_ROOT_PASSWORD` can be left commented. ### Setup Frontend -1. Install node.js(version 18) - - https://nodejs.org/ja +1. Install node.js(version 20) + - https://nodejs.org 2. Install yarn ```bash npm install -g yarn diff --git a/docs/installation/each_platforms_for_developer.md b/docs/installation/each_platforms_for_developer.md index 2b2a18487..33ae8b8d9 100644 --- a/docs/installation/each_platforms_for_developer.md +++ b/docs/installation/each_platforms_for_developer.md @@ -29,7 +29,7 @@ Please follow instructions below. #### Install Node.js Get node with version 20 -- [Node.js Official](https://nodejs.org/ja) +- [Node.js Official](https://nodejs.org) You can also install node via [nvm](https://github.com/nvm-sh/nvm) From 45ae6249bfa5ab79d5dcf023d4bb975f3bb76a00 Mon Sep 17 00:00:00 2001 From: ReiHashimoto <42664619+ReiHashimoto@users.noreply.github.com> Date: Tue, 7 Nov 2023 20:07:10 +0900 Subject: [PATCH 6/9] improve caution message --- docs/installation/linux.md | 5 ++++- docs/installation/mac.md | 8 +++++--- docs/installation/windows.md | 5 ++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/installation/linux.md b/docs/installation/linux.md index 4bacac2f6..d328cf6a2 100644 --- a/docs/installation/linux.md +++ b/docs/installation/linux.md @@ -11,7 +11,10 @@ We introduce how to install optinist. We have developed optinist python(backend) and typescript(frontend), so you need to make both environment. Please follow instructions below. -**CAUTION**: We confirmed them on Ubuntu 18.04/20.04/22.04. +```{eval-rst} +.. caution:: + We confirmed them on Ubuntu 18.04/20.04/22.04. +``` ## 1. Make backend environment diff --git a/docs/installation/mac.md b/docs/installation/mac.md index 3aeb3e6d6..ff8f3667c 100644 --- a/docs/installation/mac.md +++ b/docs/installation/mac.md @@ -26,9 +26,11 @@ Please follow instructions below. - Anaconda3-\*.\*-MacOSX-x86_64.pkg - *The latest version of the module is ok. -- **CAUTION** - - On mac, you must use the x86_64 version. - - The arm64 version has some modules that cannot be installed by conda install or pip install. +```{eval-rst} +.. caution:: + Even if you're using arm64 (Apple Sillicon, M1, M2...) architecture's Mac, x86_64 version is required. + Some modules cannot be installed by conda install or pip install in arm64 version. +``` ### Create anaconda environment diff --git a/docs/installation/windows.md b/docs/installation/windows.md index cee72f629..0d99985cb 100644 --- a/docs/installation/windows.md +++ b/docs/installation/windows.md @@ -13,7 +13,10 @@ Please follow instructions below.
-**CAUTION**: For WSL2, we confirmed them on Ubuntu 20.04/22.04. +```{eval-rst} +.. caution:: + For WSL2, we confirmed them on Ubuntu 20.04/22.04. +``` ## For Windows (PowerShell) From 83cfa63d27bfd3b91abc88e7a969fc1099c671a6 Mon Sep 17 00:00:00 2001 From: ReiHashimoto <42664619+ReiHashimoto@users.noreply.github.com> Date: Wed, 8 Nov 2023 09:17:49 +0900 Subject: [PATCH 7/9] update docs for developers --- docs/for_developers/architecture.md | 55 +++++++++++++++++++ docs/for_developers/index.rst | 16 ++++++ docs/for_developers/pull_request.md | 15 +++++ .../style.md} | 23 +++----- docs/for_developers/test.md | 16 ++++++ docs/index.rst | 1 + docs/utils/index.rst | 1 - 7 files changed, 112 insertions(+), 15 deletions(-) create mode 100644 docs/for_developers/architecture.md create mode 100644 docs/for_developers/index.rst create mode 100644 docs/for_developers/pull_request.md rename docs/{utils/contributing.md => for_developers/style.md} (77%) create mode 100644 docs/for_developers/test.md diff --git a/docs/for_developers/architecture.md b/docs/for_developers/architecture.md new file mode 100644 index 000000000..d816d269a --- /dev/null +++ b/docs/for_developers/architecture.md @@ -0,0 +1,55 @@ +## Architecture +### Frontend +- language: TypeScript +- framework: React (v18) +- middleware: Redux, Redux Toolkit, React Router + +#### Directory structure +Following is the summary of directory structure. + +- frontend + - src + - api: handle API requests. + - components: React components. + - const: constants. + - pages: Components set as `element` in `Route` component of react-router. + - store: Redux store. + - slice + - Some + - SomeActions.ts: create actions like async thunk from api response. + - SomeSelectors.ts: select state from store. + - SomeSlice.ts: define reducers. + - SomeType.ts: define data type. + - SomeUtils.ts: define utility functions if needed. + - style: extra css files. + - utils: common utility functions. + +- api, components, store/slice directories are separated by its domain. + +### Backend +- language: Python +- framework: FastAPI +- handle workflow by snakemake. + +#### Directory structure +Following is the summary of directory structure. +- studio + - alembic: files for database migration. database is used in multi-user mode. + - app + - `Snakefile`: File read by snakemake. It defines how to run workflow by language like Python. + - common: common modules(not for specific domain) + - core: define core functions. + - dataclass: define [dataclasses](#dataclass) that are passed between nodes or used as visualize outputs. + - db: database general configuration. + - models: database models. + - routers: define fastapi routers. + - schemas: define pydantic schemas for api requests and responses. + - wrappers: functions for algorithm nodes. + - optinist: modules specific to calcium imaging data processing domain. It has same structure as common. + - config: configuration files. + - test_data: test data for unit tests. + - tests: unit tests. + - `__main__.py`: entry point of backend in production. + - `__main_unit__.py`: core main unit. called by `studio/__main__.py` and `main.py`. +- `main.py`: entry point of backend in development. +- `run_cluster.py`: entry point for CLI run. diff --git a/docs/for_developers/index.rst b/docs/for_developers/index.rst new file mode 100644 index 000000000..a1a7815c5 --- /dev/null +++ b/docs/for_developers/index.rst @@ -0,0 +1,16 @@ +.. _for_developers: + +*************** +FOR DEVELOPERS +*************** + +OptiNiSt welcomes your contributions. +See the following guidelines before submitting Pull Requests. + +.. toctree:: + :maxdepth: 2 + + style + pull_request + architecture + test diff --git a/docs/for_developers/pull_request.md b/docs/for_developers/pull_request.md new file mode 100644 index 000000000..7757c43ed --- /dev/null +++ b/docs/for_developers/pull_request.md @@ -0,0 +1,15 @@ +## Pull Request +### Pre Commit +- run following command before your first commit + ``` + pre-commit install + ``` + - Once installed, it automatically checks your coding style on every commits. + +### Branch rules +- You can submit Pull Request by pushing new branch. + - Make sure the base branch is `develop-main`, and PR is to `develop-main`. + - You can't push to the `develop-main` branch directly, the branch is protected. + - Make sure new branch name is in following format (`xxx` is the name of the feature or bug you are working on.). + - `feature/xxx` + - `fix/xxx` diff --git a/docs/utils/contributing.md b/docs/for_developers/style.md similarity index 77% rename from docs/utils/contributing.md rename to docs/for_developers/style.md index 363518eec..d4f23f49e 100644 --- a/docs/utils/contributing.md +++ b/docs/for_developers/style.md @@ -1,16 +1,4 @@ -(Contributing)= -# Contributing to OptiNiSt -OptiNiSt welcomes your contributions. -See the following guidelines before submitting Pull Requests. - -## Coding Style -### Pre Commit -- run following command before your first commit - ``` - pre-commit install - ``` - - Once installed, it automatically checkes your code style on every commits. - +## Style Guides ### Python - Format all files using [black](https://black.readthedocs.io/en/stable/#). - Check the code for problems using [flake8](https://pypi.org/project/flake8/). @@ -19,7 +7,14 @@ See the following guidelines before submitting Pull Requests. - Sort your import using [isort](https://github.com/PyCQA/isort). - These guides are checked by pre-commits, github workflow on submitting Pull Requests. -#### VSCode Settings +### TypeScript +- Format all files using [prettier](https://prettier.io/). + - Rules are defined in `frontend/.prettierrc.json`. +- Check the code for problems using [eslint](https://eslint.org/). + - Rules are defined in `frontend/.eslintrc.json`. + +### Editor support +#### VSCode - If you are using VSCode, you can use features (like format/lint on save) by installing and activating the extensions in `.vscode/extensions.json`. - For these extensions, we provide example settings in `.vscode/settings.example.json` - To use this, diff --git a/docs/for_developers/test.md b/docs/for_developers/test.md new file mode 100644 index 000000000..56c9d3e74 --- /dev/null +++ b/docs/for_developers/test.md @@ -0,0 +1,16 @@ +## Test +- We have unit tests for both frontend and backend. They are automatically run by github workflow on submitting Pull Requests. +- You can also run them locally. + - Frontend and Backend (Requires docker) + ``` + make test_run + ``` + - Frontend only + ``` + yarn test + # or yarn test:ci + ``` + - Backend only + ``` + pytest + ``` diff --git a/docs/index.rst b/docs/index.rst index 1f393ec78..b5e0b991d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -36,3 +36,4 @@ Main Features gui/index host_for_multiuser/index utils/index + for_developers/index diff --git a/docs/utils/index.rst b/docs/utils/index.rst index 30f56956d..628b4319b 100644 --- a/docs/utils/index.rst +++ b/docs/utils/index.rst @@ -9,4 +9,3 @@ OTHER add_algorithm cui_execution implemented_analysis - contributing \ No newline at end of file From e6f1bdc9e7ac2ae3d13a7be74b91f298d428d34c Mon Sep 17 00:00:00 2001 From: ReiHashimoto <42664619+ReiHashimoto@users.noreply.github.com> Date: Wed, 15 Nov 2023 13:51:50 +0900 Subject: [PATCH 8/9] add pr link --- docs/for_developers/pull_request.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/for_developers/pull_request.md b/docs/for_developers/pull_request.md index 7757c43ed..7d93ce33c 100644 --- a/docs/for_developers/pull_request.md +++ b/docs/for_developers/pull_request.md @@ -1,4 +1,7 @@ ## Pull Request +- GitHub Pull Request page + - [https://github.com/oist/optinist/pulls](https://github.com/oist/optinist/pulls) + ### Pre Commit - run following command before your first commit ``` From 07fcd38dba1ef93ffcd63dd6cb1300bd7d9a584f Mon Sep 17 00:00:00 2001 From: ReiHashimoto <42664619+ReiHashimoto@users.noreply.github.com> Date: Wed, 15 Nov 2023 13:52:08 +0900 Subject: [PATCH 9/9] update architecture contents --- docs/for_developers/architecture.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/for_developers/architecture.md b/docs/for_developers/architecture.md index d816d269a..aef7c5c41 100644 --- a/docs/for_developers/architecture.md +++ b/docs/for_developers/architecture.md @@ -1,6 +1,7 @@ ## Architecture ### Frontend - language: TypeScript +- environment: Node.js (v20) - framework: React (v18) - middleware: Redux, Redux Toolkit, React Router @@ -27,7 +28,7 @@ Following is the summary of directory structure. - api, components, store/slice directories are separated by its domain. ### Backend -- language: Python +- language: Python (v3.8) - framework: FastAPI - handle workflow by snakemake. @@ -39,7 +40,7 @@ Following is the summary of directory structure. - `Snakefile`: File read by snakemake. It defines how to run workflow by language like Python. - common: common modules(not for specific domain) - core: define core functions. - - dataclass: define [dataclasses](#dataclass) that are passed between nodes or used as visualize outputs. + - dataclass: define dataclasses that are passed between nodes or used as visualize outputs. - db: database general configuration. - models: database models. - routers: define fastapi routers. @@ -47,6 +48,11 @@ Following is the summary of directory structure. - wrappers: functions for algorithm nodes. - optinist: modules specific to calcium imaging data processing domain. It has same structure as common. - config: configuration files. + - `standalone-logging.yaml`: logging config for standalone mode. In standalone mode, logs are sent to streams. + - `logging.yaml`: logging config for multi-user mode. In multi-user mode, logs are sent to file (in `logs` dir). log file rotation settings are included. + - you can manage log configurations by editing these files. + - auth: put Firebase authentication secret files. + - docker: backend Dockerfiles for each environment. - test_data: test data for unit tests. - tests: unit tests. - `__main__.py`: entry point of backend in production.