From 43b0b38b79896a526a78bef610835968651737cd Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sun, 18 Dec 2022 13:14:10 -0600 Subject: [PATCH 01/12] register is a function --- python/ipywidgets/ipywidgets/widgets/widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ipywidgets/ipywidgets/widgets/widget.py b/python/ipywidgets/ipywidgets/widgets/widget.py index 4f4dcb3732..030fdc45ce 100644 --- a/python/ipywidgets/ipywidgets/widgets/widget.py +++ b/python/ipywidgets/ipywidgets/widgets/widget.py @@ -418,7 +418,7 @@ def handle_comm_opened(comm, msg): state = data['state'] # Find the widget class to instantiate in the registered widgets - widget_class = register.get(state['_model_module'], + widget_class = _registry.get(state['_model_module'], state['_model_module_version'], state['_model_name'], state['_view_module'], From b9e40f9bcd63be310703a3e0f8fd7a011875da1d Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sun, 18 Dec 2022 13:44:29 -0600 Subject: [PATCH 02/12] some debugging of js tests --- .github/workflows/tests.yml | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3a1a5121c9..2181d9dabd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,7 +37,8 @@ jobs: js: name: JavaScript runs-on: ubuntu-latest - + env: + CI: true steps: - uses: actions/checkout@v2 - name: Set up Python @@ -48,22 +49,33 @@ jobs: cache-dependency-path: | **/setup.cfg **/requirements*.txt - - name: Install dependencies + - name: Install apt dependencies run: | sudo apt-get install -y firefox - python -m pip install --upgrade pip - python -m pip install jupyterlab~=3.0 - name: Install node uses: actions/setup-node@v3 with: node-version: '14' cache: 'yarn' - - name: yarn install, build, test + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + python -m pip install jupyterlab~=3.0 + - name: cache (node) + uses: actions/cache@v3 + id: cache-node-modules + with: + path: '**/node_modules' + key: js-test-node-modules-${{ hashFiles('yarn.lock') }} + - name: yarn install run: | yarn install --frozen-lockfile + - name: yarn build, test + run: | yarn run build yarn run build:examples - + - name: yarn build, test + run: | pushd packages/base yarn run test:unit:firefox:headless popd @@ -83,9 +95,14 @@ jobs: pushd examples/web1 yarn run test:firefox:headless popd + - name: upload npm debug logs + if: failure() + uses: actions/upload-artifact@v2 + with: + name: ipywidgets-js-debug-logs + path: | + ~/.npm/_logs - env: - CI: true python: name: Python runs-on: ubuntu-latest From cbcaf4f263c496a8f470c192bf461bd4322690a6 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sun, 18 Dec 2022 13:47:12 -0600 Subject: [PATCH 03/12] remove extra node_modules cache --- .github/workflows/tests.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2181d9dabd..46cecebd90 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -61,12 +61,6 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install jupyterlab~=3.0 - - name: cache (node) - uses: actions/cache@v3 - id: cache-node-modules - with: - path: '**/node_modules' - key: js-test-node-modules-${{ hashFiles('yarn.lock') }} - name: yarn install run: | yarn install --frozen-lockfile @@ -74,7 +68,7 @@ jobs: run: | yarn run build yarn run build:examples - - name: yarn build, test + - name: yarn test run: | pushd packages/base yarn run test:unit:firefox:headless From 9db5f7c1ea4b9871faf846bca9a50f8aa9d8f694 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sun, 18 Dec 2022 13:57:44 -0600 Subject: [PATCH 04/12] bump action versions for deprecation warnings --- .github/workflows/build.yml | 6 +++--- .github/workflows/devinstall.yml | 6 +++--- .github/workflows/lint.yml | 2 +- .github/workflows/packaging.yml | 16 ++++++++-------- .github/workflows/tests.yml | 18 +++++++++--------- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3dce50a112..fb165e2a4f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,19 +11,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Install node uses: actions/setup-node@v3 with: node-version: '14' cache: 'yarn' - name: Install Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: '3.8' architecture: 'x64' - name: Cache pip on Linux - uses: actions/cache@v1 + uses: actions/cache@v3 if: startsWith(runner.os, 'Linux') with: path: ~/.cache/pip diff --git a/.github/workflows/devinstall.yml b/.github/workflows/devinstall.yml index 88ef1530ef..4d6c2b9da1 100644 --- a/.github/workflows/devinstall.yml +++ b/.github/workflows/devinstall.yml @@ -11,19 +11,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Install node uses: actions/setup-node@v3 with: node-version: '14' cache: 'yarn' - name: Install Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: '3.8' architecture: 'x64' - name: Cache pip on Linux - uses: actions/cache@v1 + uses: actions/cache@v3 if: startsWith(runner.os, 'Linux') with: path: ~/.cache/pip diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9c2e764c84..c595a32206 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install node uses: actions/setup-node@v3 with: diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 69f938b604..efd4b7dfb9 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -18,19 +18,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install node uses: actions/setup-node@v3 with: node-version: '14' cache: 'yarn' - name: Install Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.10' architecture: 'x64' - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} @@ -65,7 +65,7 @@ jobs: cd dist sha256sum * | tee SHA256SUMS - name: Upload distributions - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: dist ${{ github.run_number }} path: ./dist @@ -91,19 +91,19 @@ jobs: os: 'ubuntu' steps: - name: Install Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} architecture: 'x64' - name: Checkout # For the cache keys - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Get pip cache dir id: pip-cache run: | echo "::set-output name=dir::$(pip cache dir)" - name: pip cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.pip-cache.outputs.dir }} key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} @@ -113,7 +113,7 @@ jobs: - name: Install the prerequisites run: | python -m pip install pip - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: dist ${{ github.run_number }} path: ./dist diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 46cecebd90..6d11c584c0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: name: Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: @@ -40,7 +40,7 @@ jobs: env: CI: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: @@ -91,7 +91,7 @@ jobs: popd - name: upload npm debug logs if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ipywidgets-js-debug-logs path: | @@ -106,7 +106,7 @@ jobs: python-version: ['3.7', '3.8', '3.9', '3.10', '3.11-dev'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: @@ -128,7 +128,7 @@ jobs: name: Message Specification runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: @@ -150,7 +150,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: @@ -215,7 +215,7 @@ jobs: - name: Upload Playwright Test assets if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ipywidgets-test-assets path: | @@ -223,7 +223,7 @@ jobs: - name: Upload Playwright Test report if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ipywidgets-test-report path: | @@ -237,7 +237,7 @@ jobs: - name: Upload updated snapshots if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ipywidgets-updated-snapshots path: ui-tests/tests From cd03fca11905a7d37cde50b1045bc04b1dd4d9c9 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sun, 18 Dec 2022 13:59:51 -0600 Subject: [PATCH 05/12] more step naming --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6d11c584c0..0896507a21 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -64,7 +64,7 @@ jobs: - name: yarn install run: | yarn install --frozen-lockfile - - name: yarn build, test + - name: yarn build run: | yarn run build yarn run build:examples From 5ef65738ea88d0ff941cddc17cc5fcb65890966e Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sun, 18 Dec 2022 14:56:25 -0600 Subject: [PATCH 06/12] try some docs pins --- docs/environment.yml | 12 +++++++----- docs/requirements.txt | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/environment.yml b/docs/environment.yml index 8daa0c4e60..db7b955d6a 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -5,18 +5,16 @@ channels: dependencies: - bqplot - build - - empack - - ipykernel + - ipykernel !=6.19.* - jupyter_client - jupyterlab >=3,<4 - jupyter-packaging - - matplotlib + - matplotlib-base - nbsphinx - nodejs=14 - numpy - packaging - pandoc - - pip - python=3.10 - recommonmark - scikit-image @@ -24,6 +22,10 @@ dependencies: - sphinx - sphinx_rtd_theme - sympy + # lite deps + - pip + - doit + - pkginfo - pip: - - jupyterlite==0.1.0b14 + - jupyterlite==0.1.0b15 - jupyterlite-sphinx~=0.7.2 diff --git a/docs/requirements.txt b/docs/requirements.txt index 6dea92f913..12390a418a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ bqplot build -ipykernel +ipykernel !=6.19.* jupyter_client jupyterlab>=3,<4 jupyterlite-sphinx From e16d5a8fed923c7da33d94d2fe51758f70d3224b Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Mon, 19 Dec 2022 15:16:59 +0100 Subject: [PATCH 07/12] test: create widget from frontend --- .../ipywidgets/widgets/tests/test_widget.py | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/python/ipywidgets/ipywidgets/widgets/tests/test_widget.py b/python/ipywidgets/ipywidgets/widgets/tests/test_widget.py index 065aa1fc67..d897306e0b 100644 --- a/python/ipywidgets/ipywidgets/widgets/tests/test_widget.py +++ b/python/ipywidgets/ipywidgets/widgets/tests/test_widget.py @@ -3,15 +3,19 @@ """Test Widget.""" +import inspect + +import pytest from IPython.core.interactiveshell import InteractiveShell from IPython.display import display from IPython.utils.capture import capture_output -import inspect -import pytest +from ..._version import __jupyter_widgets_controls_version__ from .. import widget -from ..widget import Widget +from ..widget import PROTOCOL_VERSION_MAJOR, Widget from ..widget_button import Button +from .utils import DummyComm, setup, teardown + def test_no_widget_view(): # ensure IPython shell is instantiated @@ -74,3 +78,27 @@ def test_compatibility(): caller_path = inspect.stack(context=0)[1].filename assert all(x.filename == caller_path for x in record) assert len(record) == 6 + + +def test_create_from_frontend(): + comm = DummyComm() + assert widget._instances == {} + msg = { + "content": { + "data": { + "model_id": "foo", + "model_name": "Button", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": __jupyter_widgets_controls_version__, + "_model_name": "ButtonModel", + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": __jupyter_widgets_controls_version__, + "_view_name": "ButtonView", + }, + } + }, + "metadata": {"version": PROTOCOL_VERSION_MAJOR}, + } + Widget.handle_comm_opened(comm, msg) + assert isinstance(list(widget._instances.values())[0], Button) From 4c9eda15b9d5f0fd475b997975cd575b3b0f9f59 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Mon, 19 Dec 2022 09:01:13 -0600 Subject: [PATCH 08/12] remove ipykernel pin --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 12390a418a..6dea92f913 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ bqplot build -ipykernel !=6.19.* +ipykernel jupyter_client jupyterlab>=3,<4 jupyterlite-sphinx From 8fcd447ea1f6e9da8528df7f6b1eabeff565e886 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Mon, 19 Dec 2022 09:01:35 -0600 Subject: [PATCH 09/12] remove ipykernel pin (conda) --- docs/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/environment.yml b/docs/environment.yml index db7b955d6a..fed2bcd60d 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -5,7 +5,7 @@ channels: dependencies: - bqplot - build - - ipykernel !=6.19.* + - ipykernel - jupyter_client - jupyterlab >=3,<4 - jupyter-packaging From de23fa6930fcee2a42c4cdd5542a121a3a27db60 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 20 Dec 2022 18:46:48 +0100 Subject: [PATCH 10/12] fix test, setup and teardown messed things up, refactor --- .../widgets/tests/test_send_state.py | 19 ++------ .../ipywidgets/widgets/tests/test_widget.py | 48 +++++-------------- 2 files changed, 18 insertions(+), 49 deletions(-) diff --git a/python/ipywidgets/ipywidgets/widgets/tests/test_send_state.py b/python/ipywidgets/ipywidgets/widgets/tests/test_send_state.py index a39252319e..ec18ae4af1 100644 --- a/python/ipywidgets/ipywidgets/widgets/tests/test_send_state.py +++ b/python/ipywidgets/ipywidgets/widgets/tests/test_send_state.py @@ -12,29 +12,20 @@ # A widget with simple traits class SimpleWidget(Widget): a = Bool().tag(sync=True) - b = Tuple(Bool(), Bool(), Bool(), default_value=(False, False, False)).tag(sync=True) + b = Tuple(Bool(), Bool(), Bool(), default_value=(False, False, False)).tag( + sync=True + ) c = List(Bool()).tag(sync=True) + def test_empty_send_state(): w = SimpleWidget() w.send_state([]) assert w.comm.messages == [] + def test_empty_hold_sync(): w = SimpleWidget() with w.hold_sync(): pass assert w.comm.messages == [] - - -def test_control(): - comm = DummyComm() - Widget.close_all() - w = SimpleWidget() - Widget.handle_control_comm_opened( - comm, dict(metadata={'version': __control_protocol_version__}) - ) - Widget._handle_control_comm_msg(dict(content=dict( - data={'method': 'request_states'} - ))) - assert comm.messages diff --git a/python/ipywidgets/ipywidgets/widgets/tests/test_widget.py b/python/ipywidgets/ipywidgets/widgets/tests/test_widget.py index d897306e0b..7f7425a9b9 100644 --- a/python/ipywidgets/ipywidgets/widgets/tests/test_widget.py +++ b/python/ipywidgets/ipywidgets/widgets/tests/test_widget.py @@ -10,11 +10,9 @@ from IPython.display import display from IPython.utils.capture import capture_output -from ..._version import __jupyter_widgets_controls_version__ from .. import widget -from ..widget import PROTOCOL_VERSION_MAJOR, Widget +from ..widget import Widget from ..widget_button import Button -from .utils import DummyComm, setup, teardown def test_no_widget_view(): @@ -28,10 +26,12 @@ def test_no_widget_view(): assert len(cap.outputs) == 1, "expect 1 output" mime_bundle = cap.outputs[0].data - assert mime_bundle['text/plain'] == repr(w), "expected plain text output" - assert 'application/vnd.jupyter.widget-view+json' not in mime_bundle, "widget has no view" - assert cap.stdout == '', repr(cap.stdout) - assert cap.stderr == '', repr(cap.stderr) + assert mime_bundle["text/plain"] == repr(w), "expected plain text output" + assert ( + "application/vnd.jupyter.widget-view+json" not in mime_bundle + ), "widget has no view" + assert cap.stdout == "", repr(cap.stdout) + assert cap.stderr == "", repr(cap.stderr) def test_widget_view(): @@ -45,10 +45,12 @@ def test_widget_view(): assert len(cap.outputs) == 1, "expect 1 output" mime_bundle = cap.outputs[0].data - assert mime_bundle['text/plain'] == repr(w), "expected plain text output" - assert 'application/vnd.jupyter.widget-view+json' in mime_bundle, "widget should have have a view" - assert cap.stdout == '', repr(cap.stdout) - assert cap.stderr == '', repr(cap.stderr) + assert mime_bundle["text/plain"] == repr(w), "expected plain text output" + assert ( + "application/vnd.jupyter.widget-view+json" in mime_bundle + ), "widget should have have a view" + assert cap.stdout == "", repr(cap.stdout) + assert cap.stderr == "", repr(cap.stderr) def test_close_all(): @@ -78,27 +80,3 @@ def test_compatibility(): caller_path = inspect.stack(context=0)[1].filename assert all(x.filename == caller_path for x in record) assert len(record) == 6 - - -def test_create_from_frontend(): - comm = DummyComm() - assert widget._instances == {} - msg = { - "content": { - "data": { - "model_id": "foo", - "model_name": "Button", - "state": { - "_model_module": "@jupyter-widgets/controls", - "_model_module_version": __jupyter_widgets_controls_version__, - "_model_name": "ButtonModel", - "_view_module": "@jupyter-widgets/controls", - "_view_module_version": __jupyter_widgets_controls_version__, - "_view_name": "ButtonView", - }, - } - }, - "metadata": {"version": PROTOCOL_VERSION_MAJOR}, - } - Widget.handle_comm_opened(comm, msg) - assert isinstance(list(widget._instances.values())[0], Button) From 651ac2301ed001658c370eafdc479ebec8dcacfc Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Tue, 20 Dec 2022 21:25:28 -0600 Subject: [PATCH 11/12] roll back ci changes to simplify ci --- .github/workflows/build.yml | 6 ++--- .github/workflows/devinstall.yml | 6 ++--- .github/workflows/lint.yml | 2 +- .github/workflows/packaging.yml | 16 ++++++------ .github/workflows/tests.yml | 43 ++++++++++++-------------------- docs/environment.yml | 12 ++++----- docs/requirements.txt | 2 +- 7 files changed, 37 insertions(+), 50 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb165e2a4f..3dce50a112 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,19 +11,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v1 - name: Install node uses: actions/setup-node@v3 with: node-version: '14' cache: 'yarn' - name: Install Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v1 with: python-version: '3.8' architecture: 'x64' - name: Cache pip on Linux - uses: actions/cache@v3 + uses: actions/cache@v1 if: startsWith(runner.os, 'Linux') with: path: ~/.cache/pip diff --git a/.github/workflows/devinstall.yml b/.github/workflows/devinstall.yml index 4d6c2b9da1..88ef1530ef 100644 --- a/.github/workflows/devinstall.yml +++ b/.github/workflows/devinstall.yml @@ -11,19 +11,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v1 - name: Install node uses: actions/setup-node@v3 with: node-version: '14' cache: 'yarn' - name: Install Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v1 with: python-version: '3.8' architecture: 'x64' - name: Cache pip on Linux - uses: actions/cache@v3 + uses: actions/cache@v1 if: startsWith(runner.os, 'Linux') with: path: ~/.cache/pip diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c595a32206..9c2e764c84 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 - name: Install node uses: actions/setup-node@v3 with: diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index efd4b7dfb9..69f938b604 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -18,19 +18,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v2 - name: Install node uses: actions/setup-node@v3 with: node-version: '14' cache: 'yarn' - name: Install Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v2 with: python-version: '3.10' architecture: 'x64' - - uses: actions/cache@v3 + - uses: actions/cache@v2 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} @@ -65,7 +65,7 @@ jobs: cd dist sha256sum * | tee SHA256SUMS - name: Upload distributions - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v2 with: name: dist ${{ github.run_number }} path: ./dist @@ -91,19 +91,19 @@ jobs: os: 'ubuntu' steps: - name: Install Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python }} architecture: 'x64' - name: Checkout # For the cache keys - uses: actions/checkout@v3 + uses: actions/checkout@v2 - name: Get pip cache dir id: pip-cache run: | echo "::set-output name=dir::$(pip cache dir)" - name: pip cache - uses: actions/cache@v3 + uses: actions/cache@v2 with: path: ${{ steps.pip-cache.outputs.dir }} key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} @@ -113,7 +113,7 @@ jobs: - name: Install the prerequisites run: | python -m pip install pip - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v2 with: name: dist ${{ github.run_number }} path: ./dist diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0896507a21..3a1a5121c9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: name: Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v4 with: @@ -37,10 +37,9 @@ jobs: js: name: JavaScript runs-on: ubuntu-latest - env: - CI: true + steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v4 with: @@ -49,27 +48,22 @@ jobs: cache-dependency-path: | **/setup.cfg **/requirements*.txt - - name: Install apt dependencies + - name: Install dependencies run: | sudo apt-get install -y firefox + python -m pip install --upgrade pip + python -m pip install jupyterlab~=3.0 - name: Install node uses: actions/setup-node@v3 with: node-version: '14' cache: 'yarn' - - name: Install python dependencies - run: | - python -m pip install --upgrade pip - python -m pip install jupyterlab~=3.0 - - name: yarn install + - name: yarn install, build, test run: | yarn install --frozen-lockfile - - name: yarn build - run: | yarn run build yarn run build:examples - - name: yarn test - run: | + pushd packages/base yarn run test:unit:firefox:headless popd @@ -89,14 +83,9 @@ jobs: pushd examples/web1 yarn run test:firefox:headless popd - - name: upload npm debug logs - if: failure() - uses: actions/upload-artifact@v3 - with: - name: ipywidgets-js-debug-logs - path: | - ~/.npm/_logs + env: + CI: true python: name: Python runs-on: ubuntu-latest @@ -106,7 +95,7 @@ jobs: python-version: ['3.7', '3.8', '3.9', '3.10', '3.11-dev'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: @@ -128,7 +117,7 @@ jobs: name: Message Specification runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v4 with: @@ -150,7 +139,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v4 with: @@ -215,7 +204,7 @@ jobs: - name: Upload Playwright Test assets if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v2 with: name: ipywidgets-test-assets path: | @@ -223,7 +212,7 @@ jobs: - name: Upload Playwright Test report if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v2 with: name: ipywidgets-test-report path: | @@ -237,7 +226,7 @@ jobs: - name: Upload updated snapshots if: failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v2 with: name: ipywidgets-updated-snapshots path: ui-tests/tests diff --git a/docs/environment.yml b/docs/environment.yml index db7b955d6a..8daa0c4e60 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -5,16 +5,18 @@ channels: dependencies: - bqplot - build - - ipykernel !=6.19.* + - empack + - ipykernel - jupyter_client - jupyterlab >=3,<4 - jupyter-packaging - - matplotlib-base + - matplotlib - nbsphinx - nodejs=14 - numpy - packaging - pandoc + - pip - python=3.10 - recommonmark - scikit-image @@ -22,10 +24,6 @@ dependencies: - sphinx - sphinx_rtd_theme - sympy - # lite deps - - pip - - doit - - pkginfo - pip: - - jupyterlite==0.1.0b15 + - jupyterlite==0.1.0b14 - jupyterlite-sphinx~=0.7.2 diff --git a/docs/requirements.txt b/docs/requirements.txt index 12390a418a..6dea92f913 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ bqplot build -ipykernel !=6.19.* +ipykernel jupyter_client jupyterlab>=3,<4 jupyterlite-sphinx From 3ac0ab3b143280f190ef390eb003b91ae4146349 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Wed, 21 Dec 2022 13:49:13 -0600 Subject: [PATCH 12/12] use ubuntu-20.04 for js CI --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3a1a5121c9..5881c64da3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,8 @@ jobs: python -m sphinx -T -E -b html -d ../build/doctrees -D language=en . ../build/html js: name: JavaScript - runs-on: ubuntu-latest + # as of #3653 ubuntu-latest wasn't working + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 @@ -50,7 +51,6 @@ jobs: **/requirements*.txt - name: Install dependencies run: | - sudo apt-get install -y firefox python -m pip install --upgrade pip python -m pip install jupyterlab~=3.0 - name: Install node