forked from arayabrain/barebone-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from arayabrain/feature/update-developer-guid…
…eline update developer guidelines
- Loading branch information
Showing
20 changed files
with
147 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
## Architecture | ||
### Frontend | ||
- language: TypeScript | ||
- environment: Node.js (v20) | ||
- 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 (v3.8) | ||
- 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 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. | ||
- `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. | ||
- `__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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## 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 | ||
``` | ||
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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
(Visualize)= | ||
Visualize | ||
================= | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,4 @@ Main Features | |
gui/index | ||
host_for_multiuser/index | ||
utils/index | ||
for_developers/index |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.