You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this PR @dk3yyyy! Would it be possible to adapt your contribution to have the test run without a pytest.monkeypach()? I think we have a CI run that only does the base installation or at least options to have certain optional deps not included. Thanks again for this PR!
Thanks @mattijn! I’ve updated the test to avoid pytest.monkeypatch and module reloading. It now runs directly against alt.JupyterChart when anywidget is unavailable, using the existing Python 3.10 CI jobs where anywidget is explicitly uninstalled.
The test covers both JupyterChart.enable_offline() and construction through the public API. I also verified it locally in the equivalent no-anywidget setup: 1 passed, with the 5 tests requiring anywidget correctly skipped.
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
enable_offline()API to theJupyterChartfallback used whenanywidgetis unavailablefind_spec()and expose the real class during type checkingFixes #3801
Testing
uv run task testuv run pytest tests/test_jupyter_chart.py -q --numprocesses=1uv run pytest tests/vegalite/v6/test_renderers.py -q --numprocesses=1anywidgetreports the intendedImportErrorforalt.JupyterChart,enable_offline(), and thejupyterrenderer