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

Improve API Error Handling, etc #647

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
ea1af91
adjust caiman dependencies
Apr 18, 2024
4765836
Merge pull request #342 from arayabrain/feature/adjust-caiman-depende…
ahadjiev Apr 22, 2024
6d0277f
Update docs about x86_64 installation
Jun 4, 2024
c93fa91
improve logger
Jun 6, 2024
e2f3db9
add rule name for each rules
Jun 7, 2024
7a8d082
add validation for node input data
Jun 7, 2024
c580332
refactor snakemake modules
Jun 7, 2024
9b0e3f1
Merge pull request #347 from arayabrain/feature/improve-logger
emuemuJP Jun 11, 2024
e9cf786
Merge pull request #348 from arayabrain/feature/improve-snakemake-runner
emuemuJP Jun 11, 2024
a37bf5e
improve workflow runner
Jun 13, 2024
dcc791d
improve workflow runner
Jun 13, 2024
6e4e207
refactor ACCEPT_FILE_EXT
Jun 13, 2024
a71045a
fix typo
Jun 13, 2024
2e157a0
fix typo
Jun 13, 2024
7b2fe11
Merge pull request #354 from arayabrain/feature/improve-workflow-runner
emuemuJP Jun 14, 2024
ef3bc35
modify poetry option on dockerfile
Jun 21, 2024
ddd1f09
modify poetry option on dockerfile
Jun 21, 2024
c434c55
update vscode settings (for prettier)
Jun 24, 2024
a8afd5b
update settings for multiuser mode
Jun 25, 2024
3af0e07
update docs for multiuser mode
Jun 25, 2024
56124c3
corrected grammar
Jun 25, 2024
49cec32
update multiuser mode setup docs
Jun 27, 2024
af8bc92
add ExptDataWriter
Jun 27, 2024
ad49e3f
Merge pull request #363 from arayabrain/feature/update-vscode-settings
emuemuJP Jun 27, 2024
b8b9938
Merge pull request #366 from arayabrain/feature/add_expt-data-writer
emuemuJP Jun 27, 2024
74d885b
corrected wording
Jun 28, 2024
91dcdb8
Fixed ExptDataWriter bug
Jun 28, 2024
f878c29
Merge pull request #369 from arayabrain/feature/add_expt-data-writer
itutu-tienday Jul 1, 2024
e3da36d
refactor api loading icon display
Jul 1, 2024
16eacd3
Merge pull request #364 from arayabrain/feature/update-multiuser-sett…
emuemuJP Jul 2, 2024
34a4931
add api loading icon display for workflow screen
Jul 2, 2024
583c830
Merge branch 'develop-main' into feature/refactor-api-loading-icon
Jul 2, 2024
38f836b
added matPath to test snakemake.yaml
milesAraya Jul 2, 2024
1cd1937
add api loading icon display - for record screen
Jul 2, 2024
c22d03a
add api loading icon display - visualize - roi
Jul 2, 2024
16e49f3
api loading icon display) fix test code
Jul 2, 2024
502f7d1
Merge pull request #345 from arayabrain/feature/docsExplainRosetta
itutu-tienday Jul 4, 2024
d95227a
Merge branch 'develop-main' into feature/refactor-api-loading-icon
Jul 8, 2024
69141c3
modify doc internal link
Jul 9, 2024
2a8816c
Merge pull request #382 from arayabrain/feature/update-multiuser-setu…
itutu-tienday Jul 9, 2024
c0c54bc
build frontend for refactor loading icon
Jul 9, 2024
03193ad
Merge pull request #376 from arayabrain/feature/refactor-api-loading-…
itutu-tienday Jul 9, 2024
1fb604f
add ExptOutputPathIds
Jul 11, 2024
225ae0c
Merge pull request #386 from arayabrain/feature/add-output-path-id-pa…
itutu-tienday Jul 11, 2024
189653a
add loading icon for fetch workflow api
Jul 16, 2024
9bbf4e6
Merge pull request #388 from arayabrain/feature/refactor-api-loading-…
itutu-tienday Jul 16, 2024
e9bc416
Merge branch 'develop-main' into feature/test_update
Jul 23, 2024
df8c373
update makefile
Jul 25, 2024
6d2aedc
update makefile
Jul 25, 2024
e23dae9
Merge branch 'feature/update-makefile' into feature/test_update
Jul 25, 2024
33b77d6
Merge pull request #393 from arayabrain/feature/update-makefile
itutu-tienday Jul 29, 2024
c775e9b
improve suite2p conda yaml
Jul 30, 2024
bdfa5e2
add export version info script
Aug 1, 2024
27c318a
add DevelopmentInformation component
Aug 1, 2024
c86b46f
add export version info script (add prebuild option)
Aug 1, 2024
ec52a86
support dynamic import of .versions.json
Aug 2, 2024
75155e0
Merge pull request #401 from arayabrain/feature/add-development-info
itutu-tienday Aug 5, 2024
a4daf31
Merge pull request #400 from arayabrain/feature/improve-suite2p-conda…
itutu-tienday Aug 6, 2024
72a8fe1
Merge branch 'develop-main' into feature/test_update
Aug 6, 2024
359862d
update test makefile and docker files
Aug 7, 2024
bff7062
modify test_snakemake_executor.py
Aug 7, 2024
4ac3e2a
resolve pytest warnings
Aug 7, 2024
bbe2ecd
test code refactoring
Aug 7, 2024
7549b05
add util func to PickleReader
Aug 8, 2024
4019720
add lccd workflow to snakemake test code
Aug 8, 2024
4d22983
add lccd workflow to snakemake test code #2
Aug 8, 2024
451e99a
Supports mode switching for testing by environment
Aug 8, 2024
994bd5a
update docs with algorithm node descriptions & Some renaming/reorgani…
milesAraya Aug 15, 2024
cffa1f5
Update docs and Visualise naming of ref image and windows/boxes
milesAraya Aug 16, 2024
3a7ba4b
Merge pull request #405 from arayabrain/feature/update-test-run
itutu-tienday Aug 20, 2024
be0aebf
adjusted document tree hierarchy
Aug 20, 2024
3e4b028
adjusted document tree hierarchy (additional fixes)
Aug 20, 2024
f7ab834
fixed a bug in the rename of exepriment name
Aug 20, 2024
b5eb69b
Merge pull request #416 from arayabrain/feature/add_expt-data-writer
itutu-tienday Aug 21, 2024
0823d17
Merge pull request #415 from arayabrain/feature/update-docs-2
milesAraya Aug 21, 2024
0448e0a
update docs with algorithm node descriptions & Some renaming/reorgani…
milesAraya Aug 15, 2024
8707be3
Update docs and Visualise naming of ref image and windows/boxes
milesAraya Aug 16, 2024
c1ab962
adjusted document tree hierarchy
Aug 20, 2024
a9ce49a
adjusted document tree hierarchy (additional fixes)
Aug 20, 2024
89a1e80
fixes based on PR comments
milesAraya Aug 21, 2024
5d4fab6
Merge branch 'feature/update-docs' of https://github.com/arayabrain/b…
milesAraya Aug 21, 2024
d61227b
New images, rename file, fix link
milesAraya Aug 27, 2024
c56089a
nwb file to for_developer
milesAraya Aug 30, 2024
ac7c7e5
Improved handling of authentication errors
Sep 10, 2024
f8e3958
Adjusted header icon display in multiuser mode
Sep 10, 2024
42e6cde
Merge pull request #430 from arayabrain/feature/improve-auth-and-mino…
itutu-tienday Sep 10, 2024
a2c9148
multiuser mode docs fix
milesAraya Sep 17, 2024
eb7ec03
multiuser mode docs fix-spelling update
milesAraya Sep 17, 2024
be95cd9
multiuser mode docs fix-spelling update
milesAraya Sep 17, 2024
5008a07
multiuser mode docs fix-spelling update
milesAraya Sep 17, 2024
227b1b7
Merge branch 'feature/update-docs' of https://github.com/arayabrain/b…
milesAraya Sep 17, 2024
5cf66c4
[edit_roi] improve loading icon: consider async requests to multiple api
Sep 26, 2024
f4bd705
[edit_roi] improve loading icon: Full screen display of loading icon …
Sep 26, 2024
7a8ff69
[edit roi] Improved message display in frontend when backend errors o…
Sep 26, 2024
2990532
[edit roi] refactor variables
Sep 27, 2024
29a93a4
Merge pull request #446 from arayabrain/feature/edit-roi-ui-improve-b…
itutu-tienday Sep 27, 2024
283e4ec
Merge pull request #410 from arayabrain/feature/update-docs
milesAraya Oct 1, 2024
99ff301
improve frontend dotenv
Oct 7, 2024
e4c0cdf
Merge pull request #458 from arayabrain/feature/improve-fe-dotenv
itutu-tienday Oct 8, 2024
426d864
improve api request error handling
Oct 12, 2024
664e7c8
improve frontend .env validation
Oct 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
2 changes: 2 additions & 0 deletions .vscode/settings.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
}
},
"eslint.workingDirectories": ["frontend"],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"flake8.args": ["--config=.flake8"],
// NOTE: Uncomment following line and fix "optinist_dev" to your conda env name
// "flake8.path": ["conda", "run", "-n", "optinist_dev", "python", "-m", "flake8"],
Expand Down
82 changes: 61 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,69 @@
#
# optinist Makefile
#

############################## For Testing ##############################

define rm_unused_docker_containers
docker ps -a --filter "status=exited" --filter "name=$(1)" --format "{{.ID}}" | xargs --no-run-if-empty docker rm
endef

PYTEST = poetry run pytest -s

.PHONY: test_run
test_run:
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.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
# cleanup
docker compose -f docker-compose.test.yml down
docker compose -f docker-compose.test.yml rm -f
@$(call rm_unused_docker_containers, test_studio_backend)
# build/run
docker compose -f docker-compose.test.yml build test_studio_backend
docker compose -f docker-compose.test.yml build test_studio_frontend
docker compose -f docker-compose.test.yml run test_studio_backend $(PYTEST) -m "not heavier_processing"
docker compose -f docker-compose.test.yml run test_studio_frontend

.PHONY: test_backend
test_backend:
# cleanup
docker compose -f docker-compose.test.yml down
docker compose -f docker-compose.test.yml rm -f
@$(call rm_unused_docker_containers, test_studio_backend)
# build/run
docker compose -f docker-compose.test.yml build test_studio_backend
docker compose -f docker-compose.test.yml run test_studio_backend $(PYTEST) -m "not heavier_processing"

.PHONY: test_backend_full
test_backend_full:
# cleanup
docker compose -f docker-compose.test.yml down
docker compose -f docker-compose.test.yml rm -f
@$(call rm_unused_docker_containers, test_studio_backend)
# build/run
docker compose -f docker-compose.test.yml build test_studio_backend
docker compose -f docker-compose.test.yml run test_studio_backend $(PYTEST)

.PHONY: test_frontend
test_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
# cleanup
docker compose -f docker-compose.test.yml down
docker compose -f docker-compose.test.yml rm -f
@$(call rm_unused_docker_containers, test_studio_frontend)
# build/run
docker compose -f docker-compose.test.yml build test_studio_frontend
docker compose -f docker-compose.test.yml run test_studio_frontend


############################## For Building ##############################

.PHONY: build_frontend
build_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
# cleanup
docker compose -f docker-compose.build.yml down
docker compose -f docker-compose.build.yml rm -f
@$(call rm_unused_docker_containers, studio-build-fe)
# build/run
docker compose -f docker-compose.build.yml build studio-build-fe
docker compose -f docker-compose.build.yml run studio-build-fe

.PHONY: format
format:
Expand All @@ -47,6 +84,9 @@ local_build:
cd frontend && yarn install --ignore-scripts && yarn build
poetry build


############################## For Deployment ##############################

.PHONY: push_testpypi
push_testpypi:
poetry publish -r testpypi
Expand Down
58 changes: 58 additions & 0 deletions docker-compose.dev.multiuser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
version: "3"

services:
db:
image: mysql:8.4
ports:
- "127.0.0.1:13306:3306"
env_file:
- studio/config/.env
volumes:
- db_data:/var/lib/mysql
environment:
TZ: Asia/Tokyo
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"]
interval: 10s
timeout: 5s
retries: 3

studio-dev-be:
build:
context: .
dockerfile: studio/config/docker/Dockerfile.dev
working_dir: /app
volumes:
- .:/app
# optinist data outputs directories
- ../optinist-docker-volumes/.snakemake/:/app/.snakemake
- ../optinist-docker-volumes/logs/:/app/logs
- ../optinist-docker-volumes/studio_data/:/app/studio_data
ports:
- "127.0.0.1:8000:8000"
command: >
bash -c "
alembic upgrade head &&
poetry run python main.py --reload --host 0.0.0.0 --port 8000
"
environment:
PYTHONPATH: /app/
TZ: Asia/Tokyo
OPTINIST_DIR: /app/studio_data
depends_on:
db:
condition: service_healthy

studio-dev-fe:
image: node:20.8.0-alpine3.18
working_dir: /app/frontend
volumes:
- ./frontend/:/app/frontend/:cached
ports:
- "127.0.0.1:3000:3000"
command: ash -c 'yarn install && yarn start'
environment:
TZ: Asia/Tokyo

volumes:
db_data:
3 changes: 3 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ services:
working_dir: /app
volumes:
- .:/app
# optinist data outputs directories
- ../optinist-docker-volumes/.snakemake/:/app/.snakemake
- ../optinist-docker-volumes/logs/:/app/logs
- ../optinist-docker-volumes/studio_data/:/app/studio_data
ports:
- "127.0.0.1:8000:8000"
Expand Down
9 changes: 3 additions & 6 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
version: "3.8"

services:
test_studio:
image: test_studio
container_name: test_studio
test_studio_backend:
image: test_studio_backend
container_name: test_studio_backend
build:
context: .
dockerfile: studio/config/docker/Dockerfile.test
environment:
PYTHONPATH: .
TZ: Asia/Tokyo
command: bash -c "poetry install --no-root --with test && poetry run python3 -m pytest -s"
volumes:
- .:/app

Expand Down
12 changes: 12 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Documentation

### Sphinx
Make HTML using Sphinx. Used to see changes made when updating readthedocs.
- [Sphinx documentation](https://docs.readthedocs.io/en/stable/config-file/v2.html)

1. `cd docs`
2. `pip install -r requirements.txt`
3. `make html`
4. Open the generated HTML:
- Mac: `open _build/html/index.html`
- Windows: `start _build/html/index.html`
Binary file added docs/_static/visualize/add_roi_clicked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/visualize/commit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/visualize/drag_select.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_static/visualize/edit-roi/add_roi_clicked.png
Binary file not shown.
Binary file removed docs/_static/visualize/edit-roi/box.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/_static/visualize/edit_roi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/visualize/edit_roi_clicked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/visualize/fluo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/visualize/merge_roi_clicked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_static/visualize/ref_image.png
Binary file not shown.
Binary file modified docs/_static/visualize/roi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/visualize/roi_fluo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/visualize/select_item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/visualize/select_timecourse_unit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_static/visualize/timecourse_time_unit.png
Binary file not shown.
Binary file modified docs/_static/visualize/twobox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/visualize/whole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions docs/for_developers/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _for_developers:

***************
FOR DEVELOPERS
For Developers
***************

OptiNiSt welcomes your contributions.
Expand All @@ -10,7 +10,8 @@ See the following guidelines before submitting Pull Requests.
.. toctree::
:maxdepth: 2

../README
style
pull_request
architecture
test
nwb_file
Loading
Loading