diff --git a/.github/workflows/standalone.yml b/.github/workflows/standalone.yml index 3368e4e7f5..b920c497bf 100644 --- a/.github/workflows/standalone.yml +++ b/.github/workflows/standalone.yml @@ -36,7 +36,7 @@ jobs: python-version: "3.10" - name: Install jdaviz - run: pip install . + run: pip install .[test] - name: Install pyinstaller run: pip install pyinstaller==5.11 @@ -116,7 +116,7 @@ jobs: timeout: 60000 - name: Test standalone - run: (cd standalone; touch pytest.ini; JUPYTER_PLATFORM_DIRS=1 pytest test.py --video=on) + run: (cd standalone; touch pytest.ini; JUPYTER_PLATFORM_DIRS=1 pytest test_standalone.py --video=on) - name: Upload Test artifacts if: always() diff --git a/standalone/hooks/hook-asdf.py b/standalone/hooks/hook-asdf.py new file mode 100644 index 0000000000..d9b558605f --- /dev/null +++ b/standalone/hooks/hook-asdf.py @@ -0,0 +1,4 @@ +from PyInstaller.utils.hooks import collect_data_files, copy_metadata + +datas = collect_data_files('asdf') +datas += copy_metadata('asdf') diff --git a/standalone/hooks/hook-jdaviz.py b/standalone/hooks/hook-jdaviz.py index c7abff2b5e..97016da6f6 100644 --- a/standalone/hooks/hook-jdaviz.py +++ b/standalone/hooks/hook-jdaviz.py @@ -1,4 +1,5 @@ -from PyInstaller.utils.hooks import collect_data_files, copy_metadata +from PyInstaller.utils.hooks import collect_data_files, copy_metadata, collect_submodules +hiddenimports = collect_submodules("jdaviz") datas = collect_data_files('jdaviz') datas += copy_metadata('jdaviz') diff --git a/standalone/hooks/hook-jupyter_events.py b/standalone/hooks/hook-jupyter_events.py new file mode 100644 index 0000000000..f65a57edf9 --- /dev/null +++ b/standalone/hooks/hook-jupyter_events.py @@ -0,0 +1,4 @@ +from PyInstaller.utils.hooks import collect_data_files, copy_metadata + +datas = collect_data_files('jupyter_events') +datas += copy_metadata('jupyter_events') diff --git a/standalone/hooks/hook-jupyter_server.py b/standalone/hooks/hook-jupyter_server.py new file mode 100644 index 0000000000..c5fdf5e39b --- /dev/null +++ b/standalone/hooks/hook-jupyter_server.py @@ -0,0 +1,4 @@ +from PyInstaller.utils.hooks import collect_submodules, collect_data_files + +datas = collect_data_files('jupyter_server') +hiddenimports = collect_submodules("jupyter_server") diff --git a/standalone/hooks/hook-pysiaf.py b/standalone/hooks/hook-pysiaf.py new file mode 100644 index 0000000000..246ed743f9 --- /dev/null +++ b/standalone/hooks/hook-pysiaf.py @@ -0,0 +1,4 @@ +from PyInstaller.utils.hooks import collect_data_files, copy_metadata + +datas = collect_data_files('pysiaf') +datas += copy_metadata('pysiaf') diff --git a/standalone/hooks/hook-specreduce.py b/standalone/hooks/hook-specreduce.py new file mode 100644 index 0000000000..c45113ebb8 --- /dev/null +++ b/standalone/hooks/hook-specreduce.py @@ -0,0 +1,4 @@ +from PyInstaller.utils.hooks import collect_data_files, copy_metadata + +datas = collect_data_files('specreduce') +datas += copy_metadata('specreduce') diff --git a/standalone/jdaviz-cli-entrypoint.py b/standalone/jdaviz-cli-entrypoint.py index f77f124eef..27dde09c5c 100644 --- a/standalone/jdaviz-cli-entrypoint.py +++ b/standalone/jdaviz-cli-entrypoint.py @@ -1,6 +1,5 @@ import sys - def start_as_kernel(): # similar to https://github.com/astrofrog/voila-qt-app/blob/master/voila_demo.py import sys diff --git a/standalone/jdaviz.spec b/standalone/jdaviz.spec index 45768f2db4..31e9f2f11b 100644 --- a/standalone/jdaviz.spec +++ b/standalone/jdaviz.spec @@ -8,6 +8,7 @@ from PyInstaller.building.api import COLLECT, EXE, PYZ from PyInstaller.building.osx import BUNDLE import jdaviz +from jdaviz.configs import Specviz, Specviz2d, Cubeviz, Mosviz, Imviz codesign_identity = os.environ.get("DEVELOPER_ID_APPLICATION") # this copies over the nbextensions enabling json and the js assets diff --git a/standalone/test.py b/standalone/test_standalone.py similarity index 82% rename from standalone/test.py rename to standalone/test_standalone.py index fb3276a7fa..2864d6362e 100644 --- a/standalone/test.py +++ b/standalone/test_standalone.py @@ -5,8 +5,8 @@ def test_voila_basics(page: Page): page.goto("http://localhost:8866/") - + # basic voila is loaded page.locator("body.theme-light").wait_for() # when jdaviz is loaded (button at the top left) - page.locator("text=Import Data").wait_for() + page.locator("text=Welcome to Jdaviz").wait_for()