From 8f9f9f7e4a9fd5c43a97c0b3058d8ad87fa8c7b9 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 12:19:09 +0200 Subject: [PATCH 01/24] Testing --- environments/environment-MAC.yml | 11 +++++------ package.json | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/environments/environment-MAC.yml b/environments/environment-MAC.yml index cd76d4596..58c1a6855 100644 --- a/environments/environment-MAC.yml +++ b/environments/environment-MAC.yml @@ -1,11 +1,11 @@ name: nwb-guide channels: - - defaults - conda-forge + - defaults dependencies: - - python = 3.9.17 - - nodejs = 18.16.1 + - python = 3.9.18 - PyInstaller = 5.13.0 + - nodejs = 18.16.1 - numcodecs = 0.11.0 - jsonschema = 4.18.0 # this installs jsonschema-specifications which is needed for validation - pydantic[email] = 2.0.2 # email validator is used by dandi @@ -14,9 +14,8 @@ dependencies: - chardet == 5.1.0 - configparser == 6.0.0 - flask == 2.3.2 - - flask-cors === 3.0.10 + - flask-cors == 4.0.0 - flask_restx == 1.1.0 - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@main#neuroconv[full] - - hdmf >= 3.7.0 - - pytest == 7.2.2 + - pytest == 7.4.0 - pytest-cov == 4.1.0 diff --git a/package.json b/package.json index bad2cfe3e..90c229d6e 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "build:win": "npm run build && npm run build:flask:win && npm run build:electron:win", "build:mac": "npm run build && npm run build:flask:unix && npm run build:electron:mac", "build:linux": "npm run build && npm run build:flask:unix && npm run build:electron:linux", - "build:flask:base": "python -m PyInstaller --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", + "build:flask:base": "python -m PyInstaller --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --collect-all sonpy --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", "build:flask:win": "npm run build:flask:base -- --add-data ./paths.config.json;. --add-data ./package.json;.", "build:flask:unix": "npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --collect-all ndx_dandi_icephys", "build:electron:win": "electron-builder build --win --publish never", From f49184dbf9584f2d98052df6adea4e41dd183805 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 18:31:38 +0200 Subject: [PATCH 02/24] Set pyinstaller log level to debug --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 90c229d6e..3838c86fb 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "build:win": "npm run build && npm run build:flask:win && npm run build:electron:win", "build:mac": "npm run build && npm run build:flask:unix && npm run build:electron:mac", "build:linux": "npm run build && npm run build:flask:unix && npm run build:electron:linux", - "build:flask:base": "python -m PyInstaller --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --collect-all sonpy --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", + "build:flask:base": "python -m PyInstaller --log-level DEBUG --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --collect-all sonpy --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", "build:flask:win": "npm run build:flask:base -- --add-data ./paths.config.json;. --add-data ./package.json;.", "build:flask:unix": "npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --collect-all ndx_dandi_icephys", "build:electron:win": "electron-builder build --win --publish never", From 7005c4bf3215c5926e03c3d73715476aa96e2185 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 18:55:07 +0200 Subject: [PATCH 03/24] Add sonpy.so explicitly --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3838c86fb..1564ef8bb 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,9 @@ "build:win": "npm run build && npm run build:flask:win && npm run build:electron:win", "build:mac": "npm run build && npm run build:flask:unix && npm run build:electron:mac", "build:linux": "npm run build && npm run build:flask:unix && npm run build:electron:linux", - "build:flask:base": "python -m PyInstaller --log-level DEBUG --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --collect-all sonpy --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", + "build:flask:base": "python -m PyInstaller --log-level DEBUG --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", "build:flask:win": "npm run build:flask:base -- --add-data ./paths.config.json;. --add-data ./package.json;.", - "build:flask:unix": "npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --collect-all ndx_dandi_icephys", + "build:flask:unix": "npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --add-data /Users/rly/mambaforge/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so:. --collect-all ndx_dandi_icephys", "build:electron:win": "electron-builder build --win --publish never", "build:electron:mac": "electron-builder build --mac --publish never", "build:electron:linux": "electron-builder build --linux --publish never", From 5ead0115b34ff768e35ab3ab42440243d716b634 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 19:52:56 +0200 Subject: [PATCH 04/24] Testing --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1564ef8bb..da33c69cb 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build:linux": "npm run build && npm run build:flask:unix && npm run build:electron:linux", "build:flask:base": "python -m PyInstaller --log-level DEBUG --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", "build:flask:win": "npm run build:flask:base -- --add-data ./paths.config.json;. --add-data ./package.json;.", - "build:flask:unix": "npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --add-data /Users/rly/mambaforge/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so:. --collect-all ndx_dandi_icephys", + "build:flask:unix": "npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --add-data /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so:. --collect-all ndx_dandi_icephys", "build:electron:win": "electron-builder build --win --publish never", "build:electron:mac": "electron-builder build --mac --publish never", "build:electron:linux": "electron-builder build --linux --publish never", From 0d346cfe8302177645df1200700fdc9d112b3704 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 20:14:55 +0200 Subject: [PATCH 05/24] Testing --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index da33c69cb..5a54117b3 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build:linux": "npm run build && npm run build:flask:unix && npm run build:electron:linux", "build:flask:base": "python -m PyInstaller --log-level DEBUG --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", "build:flask:win": "npm run build:flask:base -- --add-data ./paths.config.json;. --add-data ./package.json;.", - "build:flask:unix": "npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --add-data /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so:. --collect-all ndx_dandi_icephys", + "build:flask:unix": "npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --add-binary /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so:. --collect-all ndx_dandi_icephys", "build:electron:win": "electron-builder build --win --publish never", "build:electron:mac": "electron-builder build --mac --publish never", "build:electron:linux": "electron-builder build --linux --publish never", From 53e62b26330af3e5a3fa5eefae1552b7e16a9717 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 20:49:49 +0200 Subject: [PATCH 06/24] Testing --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5a54117b3..c55b82cc3 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build:linux": "npm run build && npm run build:flask:unix && npm run build:electron:linux", "build:flask:base": "python -m PyInstaller --log-level DEBUG --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", "build:flask:win": "npm run build:flask:base -- --add-data ./paths.config.json;. --add-data ./package.json;.", - "build:flask:unix": "npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --add-binary /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so:. --collect-all ndx_dandi_icephys", + "build:flask:unix": "rm /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so && npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --add-binary /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so:. --collect-all ndx_dandi_icephys", "build:electron:win": "electron-builder build --win --publish never", "build:electron:mac": "electron-builder build --mac --publish never", "build:electron:linux": "electron-builder build --linux --publish never", From e55b823a40c6902ba9f199e5cdf87087f327182d Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 20:50:13 +0200 Subject: [PATCH 07/24] Testing --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c55b82cc3..6edc0071a 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build:linux": "npm run build && npm run build:flask:unix && npm run build:electron:linux", "build:flask:base": "python -m PyInstaller --log-level DEBUG --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", "build:flask:win": "npm run build:flask:base -- --add-data ./paths.config.json;. --add-data ./package.json;.", - "build:flask:unix": "rm /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so && npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --add-binary /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so:. --collect-all ndx_dandi_icephys", + "build:flask:unix": "rm /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so && npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --collect-all ndx_dandi_icephys", "build:electron:win": "electron-builder build --win --publish never", "build:electron:mac": "electron-builder build --mac --publish never", "build:electron:linux": "electron-builder build --linux --publish never", From 499dc92f43c70551f205f9a0536ca9e850f7cff0 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 21:16:26 +0200 Subject: [PATCH 08/24] Fix --- environments/environment-Windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environments/environment-Windows.yml b/environments/environment-Windows.yml index 7faeba0ee..eb846dee2 100644 --- a/environments/environment-Windows.yml +++ b/environments/environment-Windows.yml @@ -20,3 +20,4 @@ dependencies: - hdmf >= 3.7.0 - pytest == 7.2.2 - pytest-cov == 4.1.0 + - email-validator == 2.0.0 From 074c2a6220855e99a08d42791796b62eae70a255 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 21:28:55 +0200 Subject: [PATCH 09/24] Fix --- package.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6edc0071a..08db3502b 100644 --- a/package.json +++ b/package.json @@ -13,18 +13,19 @@ "build": "npm run build:app", "build:app": "electron-vite build --outDir build", "build:win": "npm run build && npm run build:flask:win && npm run build:electron:win", - "build:mac": "npm run build && npm run build:flask:unix && npm run build:electron:mac", + "build:mac": "npm run build && rm /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so && npm run build:flask:unix && npm run build:electron:mac", "build:linux": "npm run build && npm run build:flask:unix && npm run build:electron:linux", - "build:flask:base": "python -m PyInstaller --log-level DEBUG --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", + "build:flask:base": "python -m PyInstaller --log-level DEBUG --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --collect-all ndx_dandi_icephys --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", "build:flask:win": "npm run build:flask:base -- --add-data ./paths.config.json;. --add-data ./package.json;.", - "build:flask:unix": "rm /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so && npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:. --collect-all ndx_dandi_icephys", + "build:flask:unix": "npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:.", "build:electron:win": "electron-builder build --win --publish never", "build:electron:mac": "electron-builder build --mac --publish never", "build:electron:linux": "electron-builder build --linux --publish never", "test": "npm run test:app && npm run test:server", "test:app": "vitest run", "test:server": "pytest pyflask/tests/ -s", - "test:executable": "concurrently -n EXE,TEST --kill-others \"node tests/testPyinstallerExecutable.js --port 3434 --forever\" \"pytest pyflask/tests/ -s --target http://localhost:3434\"", + "wait3s": "node -e \"setTimeout(() => process.exit(0),3000)\"", + "test:executable": "concurrently -n EXE,TEST --kill-others --success first \"node tests/testPyinstallerExecutable.js --port 3434 --forever\" \"npm run wait3s && pytest pyflask/tests/ -s --target http://localhost:3434\"", "test:coverage": "npm run coverage:app && npm run coverage:server", "coverage:app": "vitest run --coverage", "coverage:server": "pytest pyflask/tests/ -s --cov=pyflask --cov-report=xml", From e29e43e9c8203214d7a2dcf46e3433e4742ae610 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 21:29:18 +0200 Subject: [PATCH 10/24] Update arm64 env --- environments/environment-MAC-arm64.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/environments/environment-MAC-arm64.yml b/environments/environment-MAC-arm64.yml index 4c0ca3ae3..20d6619d4 100644 --- a/environments/environment-MAC-arm64.yml +++ b/environments/environment-MAC-arm64.yml @@ -3,21 +3,22 @@ channels: - conda-forge - defaults dependencies: - - python = 3.9.17 + - python = 3.9.18 - PyInstaller = 5.13.0 - nodejs = 18.16.1 - numcodecs = 0.11.0 - - lxml = 4.9.3 # pypi build fails due to x64/arm64 mismatch so install from conda-forge - - pyedflib = 0.1.32 # pypi build fails due to x64/arm64 mismatch so install from conda-forge - jsonschema = 4.18.0 # this installs jsonschema-specifications which is needed for validation - pydantic[email] = 2.0.2 # email validator is used by dandi + - lxml = 4.9.3 # pypi build fails due to x64/arm64 mismatch so install from conda-forge + - pyedflib = 0.1.32 # pypi build fails due to x64/arm64 mismatch so install from conda-forge - numpy # may have x64/arm64 mismatch issues so install from conda-forge - pip - pip: - chardet == 5.1.0 - configparser == 6.0.0 - flask == 2.3.2 - - flask_restx == 1.1.0 - flask-cors == 4.0.0 + - flask_restx == 1.1.0 - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@main#neuroconv[ecephys] - pytest == 7.4.0 + - pytest-cov == 4.1.0 From d1be94ad225f4e16164021bbc5e85715fc08f320 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 22:02:04 +0200 Subject: [PATCH 11/24] Adjust all envs --- .../pyflask-build-and-dist-tests.yml | 4 ++ environments/environment-Linux.yml | 37 +++++++------------ environments/environment-MAC-arm64.yml | 5 ++- environments/environment-MAC.yml | 5 ++- environments/environment-Windows.yml | 21 ++++++----- package.json | 2 +- 6 files changed, 36 insertions(+), 38 deletions(-) diff --git a/.github/workflows/pyflask-build-and-dist-tests.yml b/.github/workflows/pyflask-build-and-dist-tests.yml index e2e983010..8bf667130 100644 --- a/.github/workflows/pyflask-build-and-dist-tests.yml +++ b/.github/workflows/pyflask-build-and-dist-tests.yml @@ -83,6 +83,10 @@ jobs: - run: npm ci + # fix for macos build + - if: matrix.os == 'macos-latest' + run: rm /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so + - name: Build PyFlask distribution run: npm run build:flask:${{ matrix.shorthand }} diff --git a/environments/environment-Linux.yml b/environments/environment-Linux.yml index 87a4fe4a1..d55ea40bf 100644 --- a/environments/environment-Linux.yml +++ b/environments/environment-Linux.yml @@ -1,31 +1,22 @@ name: nwb-guide channels: - - defaults - conda-forge + - defaults dependencies: - - python = 3.9.17 - - PyInstaller = 4.7 - - nodejs = 16.14.2 - - libgcc = 7.2.0 - - git = 2.20.1 + - python = 3.9.18 + - PyInstaller = 5.13.0 + - nodejs = 18.16.1 + - numcodecs = 0.11.0 + # install these from conda-forge so that dependent packages get included in the distributable + - jsonschema = 4.18.0 # installs jsonschema-specifications + - pydantic[email] = 2.0.2 # installs email-validator - pip - pip: - - chardet == 4.0.0 - - pandas == 1.4.2 - - openpyxl == 3.0.3 - - pennsieve == 6.1.2 - - configparser == 4.0.2 - - python-docx == 0.8.10 - - xlrd == 1.2.0 - - biopython == 1.79 - - flask == 2.0.2 - - flask_restx - - protobuf == 3.20.0 - - gevent == 21.12.0 - - werkzeug == 2.0.2 - - opencv-python == 4.5.3.56 + - chardet == 5.1.0 + - configparser == 6.0.0 + - flask == 2.3.2 + - flask-cors == 4.0.0 + - flask_restx == 1.1.0 - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@main#neuroconv[full] - - hdmf >= 3.7.0 - - pytest == 7.2.2 + - pytest == 7.4.0 - pytest-cov == 4.1.0 - - flask-cors === 3.0.10 diff --git a/environments/environment-MAC-arm64.yml b/environments/environment-MAC-arm64.yml index 20d6619d4..bb11633f9 100644 --- a/environments/environment-MAC-arm64.yml +++ b/environments/environment-MAC-arm64.yml @@ -7,11 +7,12 @@ dependencies: - PyInstaller = 5.13.0 - nodejs = 18.16.1 - numcodecs = 0.11.0 - - jsonschema = 4.18.0 # this installs jsonschema-specifications which is needed for validation - - pydantic[email] = 2.0.2 # email validator is used by dandi - lxml = 4.9.3 # pypi build fails due to x64/arm64 mismatch so install from conda-forge - pyedflib = 0.1.32 # pypi build fails due to x64/arm64 mismatch so install from conda-forge - numpy # may have x64/arm64 mismatch issues so install from conda-forge + # install these from conda-forge so that dependent packages get included in the distributable + - jsonschema = 4.18.0 # installs jsonschema-specifications + - pydantic[email] = 2.0.2 # installs email-validator - pip - pip: - chardet == 5.1.0 diff --git a/environments/environment-MAC.yml b/environments/environment-MAC.yml index 58c1a6855..d55ea40bf 100644 --- a/environments/environment-MAC.yml +++ b/environments/environment-MAC.yml @@ -7,8 +7,9 @@ dependencies: - PyInstaller = 5.13.0 - nodejs = 18.16.1 - numcodecs = 0.11.0 - - jsonschema = 4.18.0 # this installs jsonschema-specifications which is needed for validation - - pydantic[email] = 2.0.2 # email validator is used by dandi + # install these from conda-forge so that dependent packages get included in the distributable + - jsonschema = 4.18.0 # installs jsonschema-specifications + - pydantic[email] = 2.0.2 # installs email-validator - pip - pip: - chardet == 5.1.0 diff --git a/environments/environment-Windows.yml b/environments/environment-Windows.yml index eb846dee2..6a53b6567 100644 --- a/environments/environment-Windows.yml +++ b/environments/environment-Windows.yml @@ -1,23 +1,24 @@ name: nwb-guide channels: - - defaults - conda-forge + - defaults dependencies: - - python = 3.9.17 - - nodejs = 18.16.1 + - python = 3.9.18 - PyInstaller = 5.13.0 - - pywin32 = 303 - - git = 2.20.1 - - setuptools=58.0.4 + - nodejs = 18.16.1 + - numcodecs = 0.11.0 # not sure if this is needed + - pywin32 = 303 # not sure if this is needed + # install these from conda-forge so that dependent packages get included in the distributable + - jsonschema = 4.18.0 # installs jsonschema-specifications + - pydantic[email] = 2.0.2 # installs email-validator - pip - pip: - chardet == 5.1.0 - configparser == 6.0.0 - flask == 2.3.2 - - flask-cors === 3.0.10 + - flask-cors == 4.0.0 - flask_restx == 1.1.0 - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@main#neuroconv[full] - - hdmf >= 3.7.0 - - pytest == 7.2.2 + - pytest == 7.4.0 - pytest-cov == 4.1.0 - - email-validator == 2.0.0 + diff --git a/package.json b/package.json index 08db3502b..f9aff8eab 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "build": "npm run build:app", "build:app": "electron-vite build --outDir build", "build:win": "npm run build && npm run build:flask:win && npm run build:electron:win", - "build:mac": "npm run build && rm /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so && npm run build:flask:unix && npm run build:electron:mac", + "build:mac": "npm run build && npm run build:flask:unix && npm run build:electron:mac", "build:linux": "npm run build && npm run build:flask:unix && npm run build:electron:linux", "build:flask:base": "python -m PyInstaller --log-level DEBUG --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --collect-all ndx_dandi_icephys --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", "build:flask:win": "npm run build:flask:base -- --add-data ./paths.config.json;. --add-data ./package.json;.", From 18c363ce6563d68b2ca5dfa1c905d54ef29cbec8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 9 Sep 2023 20:02:22 +0000 Subject: [PATCH 12/24] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- environments/environment-Windows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environments/environment-Windows.yml b/environments/environment-Windows.yml index 6a53b6567..5783d3f9b 100644 --- a/environments/environment-Windows.yml +++ b/environments/environment-Windows.yml @@ -21,4 +21,3 @@ dependencies: - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@main#neuroconv[full] - pytest == 7.4.0 - pytest-cov == 4.1.0 - From 0760fc4d2ce8d9b3a515b90ac5d04f25f50899e2 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 22:38:12 +0200 Subject: [PATCH 13/24] Fix windows? --- environments/environment-Windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environments/environment-Windows.yml b/environments/environment-Windows.yml index 5783d3f9b..6e8bf2815 100644 --- a/environments/environment-Windows.yml +++ b/environments/environment-Windows.yml @@ -19,5 +19,6 @@ dependencies: - flask-cors == 4.0.0 - flask_restx == 1.1.0 - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@main#neuroconv[full] + - hdmf >= 3.7.0 - pytest == 7.4.0 - pytest-cov == 4.1.0 From cd9e512dc1ea172ff31b9171609151510b3aadc0 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 22:56:10 +0200 Subject: [PATCH 14/24] Fix mac build from cache --- .github/workflows/pyflask-build-and-dist-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pyflask-build-and-dist-tests.yml b/.github/workflows/pyflask-build-and-dist-tests.yml index 8bf667130..5fbea858d 100644 --- a/.github/workflows/pyflask-build-and-dist-tests.yml +++ b/.github/workflows/pyflask-build-and-dist-tests.yml @@ -85,7 +85,7 @@ jobs: # fix for macos build - if: matrix.os == 'macos-latest' - run: rm /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so + run: rm -f /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so - name: Build PyFlask distribution run: npm run build:flask:${{ matrix.shorthand }} From 7f1d4d6474cfa068b1ed6523345e02ed2992e9a0 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 22:56:14 +0200 Subject: [PATCH 15/24] reset windows --- environments/environment-Windows.yml | 43 ++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/environments/environment-Windows.yml b/environments/environment-Windows.yml index 6e8bf2815..9030ad6b0 100644 --- a/environments/environment-Windows.yml +++ b/environments/environment-Windows.yml @@ -1,24 +1,49 @@ name: nwb-guide channels: - - conda-forge - defaults + - conda-forge dependencies: - - python = 3.9.18 - - PyInstaller = 5.13.0 + - python = 3.9.17 - nodejs = 18.16.1 - - numcodecs = 0.11.0 # not sure if this is needed - - pywin32 = 303 # not sure if this is needed - # install these from conda-forge so that dependent packages get included in the distributable - - jsonschema = 4.18.0 # installs jsonschema-specifications + - PyInstaller = 5.13.0 + - pywin32 = 303 + - git = 2.20.1 + - setuptools=58.0.4 - pydantic[email] = 2.0.2 # installs email-validator - pip - pip: - chardet == 5.1.0 - configparser == 6.0.0 - flask == 2.3.2 - - flask-cors == 4.0.0 + - flask-cors === 3.0.10 - flask_restx == 1.1.0 - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@main#neuroconv[full] - hdmf >= 3.7.0 - - pytest == 7.4.0 + - pytest == 7.2.2 - pytest-cov == 4.1.0 + # - email-validator == 2.0.0 + +# name: nwb-guide +# channels: +# - conda-forge +# - defaults +# dependencies: +# - python = 3.9.18 +# - PyInstaller = 5.13.0 +# - nodejs = 18.16.1 +# - numcodecs = 0.11.0 # not sure if this is needed +# - pywin32 = 303 # not sure if this is needed +# # install these from conda-forge so that dependent packages get included in the distributable +# - jsonschema = 4.18.0 # installs jsonschema-specifications +# - pydantic[email] = 2.0.2 # installs email-validator +# - pip +# - pip: +# - chardet == 5.1.0 +# - configparser == 6.0.0 +# - flask == 2.3.2 +# - flask-cors == 4.0.0 +# - flask_restx == 1.1.0 +# - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@main#neuroconv[full] +# - hdmf >= 3.7.0 +# - pytest == 7.4.0 +# - pytest-cov == 4.1.0 From 0a5d9d0db7eed16efc4d4a1c3fb65cad59687a41 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 23:30:43 +0200 Subject: [PATCH 16/24] reset windows --- environments/environment-Windows.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/environments/environment-Windows.yml b/environments/environment-Windows.yml index 9030ad6b0..44ef46d0c 100644 --- a/environments/environment-Windows.yml +++ b/environments/environment-Windows.yml @@ -9,7 +9,6 @@ dependencies: - pywin32 = 303 - git = 2.20.1 - setuptools=58.0.4 - - pydantic[email] = 2.0.2 # installs email-validator - pip - pip: - chardet == 5.1.0 @@ -21,7 +20,7 @@ dependencies: - hdmf >= 3.7.0 - pytest == 7.2.2 - pytest-cov == 4.1.0 - # - email-validator == 2.0.0 + - email-validator == 2.0.0 # name: nwb-guide # channels: From 92e1f4653ce298542e62b2139024c7a9a31ea032 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 9 Sep 2023 23:47:22 +0200 Subject: [PATCH 17/24] Fix missing import --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f9aff8eab..7bfa42d93 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "build:win": "npm run build && npm run build:flask:win && npm run build:electron:win", "build:mac": "npm run build && npm run build:flask:unix && npm run build:electron:mac", "build:linux": "npm run build && npm run build:flask:unix && npm run build:electron:linux", - "build:flask:base": "python -m PyInstaller --log-level DEBUG --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --collect-all ndx_dandi_icephys --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils", + "build:flask:base": "python -m PyInstaller --log-level DEBUG --name nwb-guide --onedir --clean --noconfirm ./pyflask/app.py --distpath ./build/flask --collect-data jsonschema_specifications --collect-all nwbinspector --collect-all neuroconv --collect-all pynwb --collect-all hdmf --collect-all ci_info --collect-all ndx_dandi_icephys --hidden-import scipy._distributor_init --hidden-import scipy._lib.messagestream --hidden-import scipy._lib._ccallback --hidden-import scipy._lib._testutils --hidden-import email_validator", "build:flask:win": "npm run build:flask:base -- --add-data ./paths.config.json;. --add-data ./package.json;.", "build:flask:unix": "npm run build:flask:base -- --add-data ./paths.config.json:. --add-data ./package.json:.", "build:electron:win": "electron-builder build --win --publish never", From 9b84832a524e99a6b38b2a7a18eb110046f5f0be Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Tue, 12 Sep 2023 12:30:08 -0400 Subject: [PATCH 18/24] try neuroconv specific debug --- environments/environment-MAC-arm64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environments/environment-MAC-arm64.yml b/environments/environment-MAC-arm64.yml index bb11633f9..93bd9ef53 100644 --- a/environments/environment-MAC-arm64.yml +++ b/environments/environment-MAC-arm64.yml @@ -20,6 +20,6 @@ dependencies: - flask == 2.3.2 - flask-cors == 4.0.0 - flask_restx == 1.1.0 - - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@main#neuroconv[ecephys] + - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@improve_sonpy_installation_m1#neuroconv[full] - pytest == 7.4.0 - pytest-cov == 4.1.0 From c3658e7bf71d7a2ca6545a11161c39f9cd23bedd Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Tue, 12 Sep 2023 13:45:44 -0400 Subject: [PATCH 19/24] Update pyflask-build-and-dist-tests.yml --- .github/workflows/pyflask-build-and-dist-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pyflask-build-and-dist-tests.yml b/.github/workflows/pyflask-build-and-dist-tests.yml index 5fbea858d..a58c77944 100644 --- a/.github/workflows/pyflask-build-and-dist-tests.yml +++ b/.github/workflows/pyflask-build-and-dist-tests.yml @@ -85,7 +85,9 @@ jobs: # fix for macos build - if: matrix.os == 'macos-latest' - run: rm -f /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so + run: | + rm -f /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so + rm -f /usr/local/miniconda/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so - name: Build PyFlask distribution run: npm run build:flask:${{ matrix.shorthand }} From e3d9eff1acc6f20a561d4d6c6e74ef3401e614c3 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Tue, 12 Sep 2023 13:46:59 -0400 Subject: [PATCH 20/24] Update Build-and-deploy-mac.yml --- .github/workflows/Build-and-deploy-mac.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Build-and-deploy-mac.yml b/.github/workflows/Build-and-deploy-mac.yml index e4ee051bf..3411f2fed 100644 --- a/.github/workflows/Build-and-deploy-mac.yml +++ b/.github/workflows/Build-and-deploy-mac.yml @@ -33,6 +33,9 @@ jobs: - name: Install package.json modules and their dependencies run: npm install --ignore-scripts + - if: matrix.os == 'macos-latest' + run: rm -f /usr/local/miniconda/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so + - uses: apple-actions/import-codesign-certs@v1 with: # https://developer.apple.com/account/resources/certificates/add @@ -56,5 +59,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} appleId: ${{ secrets.APPLE_ID }} # currently this is set to Ryan's Apple ID and password appleIdPassword: ${{ secrets.APPLE_PASSWORD }} - run: | - npm run deploy:mac + run: npm run deploy:mac From 97b1caa6eee66f4e1d398ea7d97e59e9c6897bc0 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Tue, 12 Sep 2023 13:47:13 -0400 Subject: [PATCH 21/24] Update pyflask-build-and-dist-tests.yml --- .github/workflows/pyflask-build-and-dist-tests.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pyflask-build-and-dist-tests.yml b/.github/workflows/pyflask-build-and-dist-tests.yml index a58c77944..5fbea858d 100644 --- a/.github/workflows/pyflask-build-and-dist-tests.yml +++ b/.github/workflows/pyflask-build-and-dist-tests.yml @@ -85,9 +85,7 @@ jobs: # fix for macos build - if: matrix.os == 'macos-latest' - run: | - rm -f /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so - rm -f /usr/local/miniconda/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so + run: rm -f /Users/runner/miniconda3/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so - name: Build PyFlask distribution run: npm run build:flask:${{ matrix.shorthand }} From 97b8d8f86cc26e140272f564479372960c070aca Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Tue, 12 Sep 2023 14:08:21 -0400 Subject: [PATCH 22/24] Update Build-and-deploy-mac.yml --- .github/workflows/Build-and-deploy-mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Build-and-deploy-mac.yml b/.github/workflows/Build-and-deploy-mac.yml index 3411f2fed..dd7a77988 100644 --- a/.github/workflows/Build-and-deploy-mac.yml +++ b/.github/workflows/Build-and-deploy-mac.yml @@ -33,7 +33,7 @@ jobs: - name: Install package.json modules and their dependencies run: npm install --ignore-scripts - - if: matrix.os == 'macos-latest' + - name: Remove bad sonpy file (might make Spike2 format unusable on Mac - should exclude from selection) run: rm -f /usr/local/miniconda/envs/nwb-guide/lib/python3.9/site-packages/sonpy/linux/sonpy.so - uses: apple-actions/import-codesign-certs@v1 From 942edbdbbf4ab441faebf59372cccfdf7abecf13 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Tue, 12 Sep 2023 14:09:15 -0400 Subject: [PATCH 23/24] update to main post merge --- environments/environment-MAC-arm64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environments/environment-MAC-arm64.yml b/environments/environment-MAC-arm64.yml index 93bd9ef53..6e4508a61 100644 --- a/environments/environment-MAC-arm64.yml +++ b/environments/environment-MAC-arm64.yml @@ -20,6 +20,6 @@ dependencies: - flask == 2.3.2 - flask-cors == 4.0.0 - flask_restx == 1.1.0 - - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@improve_sonpy_installation_m1#neuroconv[full] + - neuroconv @ git+https://github.com/catalystneuro/neuroconv.git@main#neuroconv[full] - pytest == 7.4.0 - pytest-cov == 4.1.0 From ddcbc4b255789e7a454ee432bd3fa73243c69809 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Tue, 12 Sep 2023 15:09:56 -0400 Subject: [PATCH 24/24] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7bfa42d93..3ea6741de 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nwb-guide", "productName": "NWB GUIDE", - "version": "0.0.4", + "version": "0.0.5", "description": "", "main": "./build/main/main.js", "scripts": {