From 54871b5970a22f538bf186b7f86aa50b87a09868 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Mon, 23 Jan 2023 17:55:08 -0600 Subject: [PATCH 1/6] fix custom wheel url for lite --- docs/lite/jupyter_lite_config.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/lite/jupyter_lite_config.json b/docs/lite/jupyter_lite_config.json index 3c450c8afd..0084492c6b 100644 --- a/docs/lite/jupyter_lite_config.json +++ b/docs/lite/jupyter_lite_config.json @@ -5,11 +5,13 @@ "Layout Templates\\.ipynb", "Variable Inspector\\.ipynb" ], - "contents": ["../source/examples"], + "contents": ["../source/examples"] + }, + "PipliteAddon": { "piplite_urls": [ - "../python/ipywidgets/dist", - "../python/widgetsnbextension/dist", - "../python/jupyterlab_widgets/dist" + "../../python/ipywidgets/dist", + "../../python/widgetsnbextension/dist", + "../../python/jupyterlab_widgets/dist" ] } } From 05d3b22b071a5ba4554a95d09e14075a3f9232f0 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Mon, 23 Jan 2023 18:12:22 -0600 Subject: [PATCH 2/6] rename master to main wherever possible, fix (some) broken links --- .binder/README | 6 ++--- .github/workflows/build.yml | 2 +- .github/workflows/devinstall.yml | 2 +- .github/workflows/packaging.yml | 3 ++- README.md | 22 +++++++++---------- docs/source/changelog.md | 4 ++-- docs/source/conf.py | 2 +- docs/source/contributing.md | 2 +- docs/source/dev_install.md | 2 +- docs/source/dev_release.md | 20 ++++++++--------- docs/source/dev_testing.md | 6 ++--- docs/source/embedding.md | 12 +++++----- docs/source/index.md | 2 +- docs/source/migration_guides.md | 4 ++-- docs/source/user_install.md | 2 +- packages/base/src/services-shim.ts | 1 - python/ipywidgets/README.md | 4 ++-- .../ipywidgets/widgets/trait_types.py | 4 ++-- scripts/milestone_check.py | 6 ++--- 19 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.binder/README b/.binder/README index f445232916..b373649ece 100644 --- a/.binder/README +++ b/.binder/README @@ -1,10 +1,10 @@ This directory holds configuration files for https://mybinder.org/. The interactive notebooks can be accessed with this link: -https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/master?filepath=docs/source/examples +https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/main?filepath=docs/source/examples -To check out a different version, just replace "master" with the desired +To check out a different version, just replace `main` with the desired branch/tag name or commit hash. To use JupyterLab, use: -https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/master?urlpath=lab/tree/docs/source/examples +https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/main?urlpath=lab/tree/docs/source/examples diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 142f6358a9..06a67de95c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build jupyterlab_widgets on: push: - branches: master + branches: main pull_request: branches: '*' diff --git a/.github/workflows/devinstall.yml b/.github/workflows/devinstall.yml index 10093fb686..3451711e93 100644 --- a/.github/workflows/devinstall.yml +++ b/.github/workflows/devinstall.yml @@ -2,7 +2,7 @@ name: Run the dev-install script on: push: - branches: master + branches: main pull_request: branches: '*' diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 22bd940acf..79381df58e 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -2,7 +2,8 @@ name: Packaging on: push: - branches: [master] + branches: + - main pull_request: branches: '*' diff --git a/README.md b/README.md index 7ead6d6bdb..0f413911e8 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,13 @@ | Purpose | Badges | | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Latest (master: future 8.0)** | [![Test Status](https://github.com/jupyter-widgets/ipywidgets/actions/workflows/tests.yml/badge.svg?query=branch%3Amaster)](https://github.com/jupyter-widgets/ipywidgets/actions?query=branch%3Amaster) [![Documentation Status: latest](https://img.shields.io/readthedocs/ipywidgets?logo=read-the-docs)](https://ipywidgets.readthedocs.io/en/latest/?badge=latest) [![Binder:master](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/master?urlpath=lab/tree/docs%2Fsource%2Fexamples) | +| **Latest (`main`: future 8.0)** | [![Test Status](https://github.com/jupyter-widgets/ipywidgets/actions/workflows/tests.yml/badge.svg?query=branch%3Amain)](https://github.com/jupyter-widgets/ipywidgets/actions?query=branch%3Amain) [![Documentation Status: latest](https://img.shields.io/readthedocs/ipywidgets?logo=read-the-docs)](https://ipywidgets.readthedocs.io/en/latest/?badge=latest) [![Binder:main](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/main?urlpath=lab/tree/docs%2Fsource%2Fexamples) | | **Stable** | [![Version](https://img.shields.io/pypi/v/ipywidgets.svg?logo=pypi)](https://pypi.python.org/pypi/ipywidgets) [![Conda Version](https://img.shields.io/conda/vn/conda-forge/ipywidgets.svg?logo=conda-forge)](https://anaconda.org/conda-forge/ipywidgets) [![Documentation Status](https://img.shields.io/readthedocs/ipywidgets?logo=read-the-docs)](https://ipywidgets.readthedocs.io/en/stable/?badge=stable) [![Binder:7.x](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/7.x?urlpath=lab/tree/docs%2Fsource%2Fexamples) | | **Communication** | [![Join the chat at https://gitter.im/ipython/ipywidgets](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jupyter-widgets/Lobby) [![Discourse](https://img.shields.io/badge/help_forum-discourse-blue?logo=discourse)](https://discourse.jupyter.org/c/widgets/46) | | | | **ipywidgets**, also known as jupyter-widgets or simply widgets, are -[interactive HTML widgets](https://github.com/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Index.ipynb) +[interactive HTML widgets](https://github.com/jupyter-widgets/ipywidgets/blob/main/docs/source/examples/Index.ipynb) for Jupyter notebooks and the IPython kernel. Notebooks come alive when interactive widgets are used. Users gain control of @@ -21,7 +21,7 @@ ipywidgets to your notebooks, and we're here to help you get started. ## Core Interactive Widgets The fundamental widgets provided by this library are called core interactive -widgets. A [demonstration notebook](https://github.com/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Index.ipynb) +widgets. A [demonstration notebook](https://github.com/jupyter-widgets/ipywidgets/blob/main/docs/source/examples/Index.ipynb) provides an overview of the core interactive widgets, including: - sliders @@ -87,14 +87,14 @@ see the detailed [developer install](docs/source/dev_install.md) instructions. If you want to install ipywidgets from source, **you will need the [yarn](https://yarnpkg.com/) package manager version 1.2.1 or later**. -To install the latest master version from the root directory of the source +To install the latest `main` version from the root directory of the source code, run `dev-install.sh`. To only build the Python package enter `pip install -e .`. ## Usage See the [examples](docs/source/examples.md) section of the documentation. The widgets are being used in a variety of ways; some uses can be seen in these notebooks: -[Demo notebook of interactive widgets](https://github.com/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Index.ipynb) +[Demo notebook of interactive widgets](https://github.com/jupyter-widgets/ipywidgets/blob/main/docs/source/examples/Index.ipynb) ## Change log @@ -106,13 +106,13 @@ Refer to change log for more detail. | ipywidgets | JupyterLab | [Classic Notebook](https://github.com/jupyter/notebook) | [nbclassic](https://github.com/jupyterlab/nbclassic) | | ---------- | :--------: | :-----------------------------------------------------: | :--------------------------------------------------: | -| master | | - | TBD | -| 7.6.3 | | | 0.2.6 | +| `main` | | - | TBD | +| `7.6.3` | | | 0.2.6 | | **Legacy** | | | | -| 6.x | | | - | -| 5.x | | 4.2 | - | -| 4.1.x | | 4.1 | - | -| 4.0.x | | 4.0 | - | +| `6.x` | | | - | +| `5.x` | | 4.2 | - | +| `4.1.x` | | 4.1 | - | +| `4.0.x` | | 4.0 | - | ## Contributing to ipywidgets diff --git a/docs/source/changelog.md b/docs/source/changelog.md index e45c3e79ae..ca3c018983 100644 --- a/docs/source/changelog.md +++ b/docs/source/changelog.md @@ -447,7 +447,7 @@ If you are developing a custom widget or widget manager, here are some major cha - A custom serializer is given the widget instance as its second argument, and a custom deserializer is given the widget manager as its second argument. - The Javascript model `.id` attribute has been renamed to `.model_id` to avoid conflicting with the Backbone `.id` attribute. ([#1410](https://github.com/jupyter-widgets/ipywidgets/pull/1410)) - Regarding widget managers and the syncing message protocol: - - The widget protocol was significantly overhauled. The new widget messaging protocol (version 2) is specified in the [version 2 protocol documentation](https://github.com/jupyter-widgets/ipywidgets/blob/master/jupyter-widgets-schema/messages.md). + - The widget protocol was significantly overhauled. The new widget messaging protocol (version 2) is specified in the [version 2 protocol documentation](https://github.com/jupyter-widgets/ipywidgets/blob/main/jupyter-widgets-schema/messages.md). - Widgets are now displayed with a `display_data` message instead of with a custom comm message. See the [ipywidgets](https://github.com/jupyter-widgets/ipywidgets/blob/20cd0f050090b1b19bb9657b8c3fa42ae384cfca/ipywidgets/widgets/widget.py#L656) implementation for an example. ([#1274](https://github.com/jupyter-widgets/ipywidgets/pull/1274)) - Custom widget managers are now responsible completely for loading widget model and view classes. Widget managers should provide an output model and view class appropriate for their environment so that the `Output` widget works. ([#1313](https://github.com/jupyter-widgets/ipywidgets/pull/1313)) - The widget manager `clear_state` method no longer has a `commlessOnly` argument. All models in the widget manager will be closed and cleared when `clear_state` is called. ([#1354](https://github.com/jupyter-widgets/ipywidgets/pull/1354)) @@ -459,7 +459,7 @@ Major user-visible changes in ipywidgets 6.0 include: - Rendering of Jupyter interactive widgets in various web contexts sphinx documentation: http://ipywidgets.readthedocs.io/en/latest/examples/Widget%20List.html - nbviewer: http://nbviewer.jupyter.org/github/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Widget%20List.ipynb + nbviewer: http://nbviewer.jupyter.org/github/jupyter-widgets/ipywidgets/blob/main/docs/source/examples/Widget%20List.ipynb Static web pages: http://jupyter.org/widgets - Addition of a DatePicker widget in the core widget collection. diff --git a/docs/source/conf.py b/docs/source/conf.py index 5ce98f387a..8fc5034fa5 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -178,7 +178,7 @@ def setup(app): "doc_path": "docs", "github_repo": "ipywidgets", "github_user": "jupyter-widgets", - "github_version": "master", + "github_version": "main", } html_sidebars = { diff --git a/docs/source/contributing.md b/docs/source/contributing.md index 987ab9ef2b..d2f7405a11 100644 --- a/docs/source/contributing.md +++ b/docs/source/contributing.md @@ -2,5 +2,5 @@ We appreciate contributions from the community. -We follow the [IPython Contributing Guide](https://github.com/ipython/ipython/blob/master/CONTRIBUTING.md) +We follow the [IPython Contributing Guide](https://github.com/ipython/ipython/blob/main/CONTRIBUTING.md) and [Jupyter Contributing Guides](https://jupyter.readthedocs.io/en/latest/contributor/content-contributor.html). diff --git a/docs/source/dev_install.md b/docs/source/dev_install.md index 486fd5eb36..3e64b4e0f3 100644 --- a/docs/source/dev_install.md +++ b/docs/source/dev_install.md @@ -12,7 +12,7 @@ To install ipywidgets from git, you will need: - the latest [Jupyter Notebook development release](https://github.com/jupyter/notebook/releases) - Everything in the ipywidgets repository is developed using Jupyter - notebook's master branch. + notebook's `main` branch. - If you want to have a copy of ipywidgets that works against a stable version of the notebook, checkout the appropriate tag. - See the diff --git a/docs/source/dev_release.md b/docs/source/dev_release.md index 0b9f34799c..2d6c4412af 100644 --- a/docs/source/dev_release.md +++ b/docs/source/dev_release.md @@ -1,7 +1,7 @@ # Developer Release Procedure To release a new version of the widgets on PyPI and npm, first checkout the -`master` branch and `cd` into the repo root. +`main` branch and `cd` into the repo root. ``` cd release @@ -43,9 +43,9 @@ Commit the changes (don't forget to `git add` the new model spec file). ``` # clean out all dirty files -git checkout master -git pull origin master -git reset --hard origin/master +git checkout main +git pull origin main +git reset --hard origin/main git clean -fdx yarn install yarn version @@ -121,11 +121,11 @@ Using the above script, you can do: ./scripts/hashes python/jupyterlab_widgets/dist/* ``` -Commit the changes you've made above, and include the uploaded files hashes in the commit message. Tag the release if ipywidgets was released. Push to origin master (and include the tag in the push), e.g: +Commit the changes you've made above, and include the uploaded files hashes in the commit message. Tag the release if ipywidgets was released. Push to origin `main` (and include the tag in the push), e.g: ``` git tag 8.0.4 -git push origin master 8.0.4 +git push origin main 8.0.4 ``` Update conda-forge packages (if the requirements changed to ipywidgets, make sure to update widgetsnbextension first). @@ -150,7 +150,7 @@ Here are some commands used to generate some of the statistics above. ``` # merges since in 6.0.0, but not 7.0.0, which is a rough list of merged PRs -git log --merges 6.0.0...master --pretty=oneline +git log --merges 6.0.0...main --pretty=oneline # To really make sure we get all PRs, we could write a program that # pulled all of the PRs, examined a commit in each one, and did @@ -164,11 +164,11 @@ git log --merges 6.0.0...master --pretty=oneline git show -s --format=%cd --date=short 6.0.0^{commit} # Non-merge commits in 7.0.0 not in any 6.x release -git log --pretty=oneline --no-merges ^6.0.0 master | wc -l +git log --pretty=oneline --no-merges ^6.0.0 main | wc -l # Authors of non-merge commits -git shortlog -s 6.0.0..master --no-merges | cut -c8- | sort -f +git shortlog -s 6.0.0..main --no-merges | cut -c8- | sort -f # New committers: authors unique in the 6.0.0..7.0.0 logs, but not in the 6.0.0 log -comm -23 <(git shortlog -s -n 6.0.0..master --no-merges | cut -c8- | sort) <(git shortlog -s -n 6.0.0 --no-merges | cut -c8- | sort) | sort -f +comm -23 <(git shortlog -s -n 6.0.0..main --no-merges | cut -c8- | sort) <(git shortlog -s -n 6.0.0 --no-merges | cut -c8- | sort) | sort -f ``` diff --git a/docs/source/dev_testing.md b/docs/source/dev_testing.md index c4cd699e09..c9750770a4 100644 --- a/docs/source/dev_testing.md +++ b/docs/source/dev_testing.md @@ -18,9 +18,9 @@ This will run the test suite using `karma` with 'debug' level logging. `ipywidgets` uses the [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) framework for visual regression testing. Galata provides a high level API to programmatically interact with the JupyterLab UI, and tools for taking screenshots and generating test reports. -UI tests are written in TypeScript and run with the Playwright test runner. The test suites are located in the [ui-tests/tests](https://github.com/jupyter-widgets/ipywidgets/tree/master/ui-tests/tests) directory. +UI tests are written in TypeScript and run with the Playwright test runner. The test suites are located in the [ui-tests/tests](https://github.com/jupyter-widgets/ipywidgets/tree/main/ui-tests/tests) directory. -The [main test suite](https://github.com/jupyter-widgets/ipywidgets/tree/master/ui-tests/tests/widgets.test.ts) uploads a [notebook](https://github.com/jupyter-widgets/ipywidgets/tree/master/ui-tests/tests/notebooks/widgets.ipynb) to JupyterLab, runs it cell by cell and captures a screenshot of the cell outputs. The cell outputs correspond to widgets of different types. The cell outputs captures are then compared to the [reference snapshots](https://github.com/jupyter-widgets/ipywidgets/tree/master/ui-tests/tests/widgets.test.ts-snapshots/) to detect any visual regression. The test report (diffs, result, videos) is uploaded to GitHub as an artifact and accessible from the GitHub Actions page in `Artifacts` section. +The [main test suite](https://github.com/jupyter-widgets/ipywidgets/tree/main/ui-tests/tests/widgets.test.ts) uploads a [notebook](https://github.com/jupyter-widgets/ipywidgets/tree/main/ui-tests/tests/notebooks/widgets.ipynb) to JupyterLab, runs it cell by cell and captures a screenshot of the cell outputs. The cell outputs correspond to widgets of different types. The cell outputs captures are then compared to the [reference snapshots](https://github.com/jupyter-widgets/ipywidgets/tree/main/ui-tests/tests/widgets.test.ts-snapshots/) to detect any visual regression. The test report (diffs, result, videos) is uploaded to GitHub as an artifact and accessible from the GitHub Actions page in `Artifacts` section. ## Running Tests Locally @@ -51,7 +51,7 @@ Checkout the [Playwright Command Line Reference](https://playwright.dev/docs/tes ## Adding new UI tests -New test suites can be added to the [ui-tests/tests](https://github.com/jupyter-widgets/ipywidgets/tree/master/ui-tests/tests) directory. Their names need to end with `.test.ts`. You can see some additional example test suites in the [JupyterLab repo](https://github.com/jupyterlab/jupyterlab/blob/master/galata/test). If the tests in new suites are doing visual regression tests or HTML source regression tests then you also need to add their reference images to the `-snapshots` directories. +New test suites can be added to the [ui-tests/tests](https://github.com/jupyter-widgets/ipywidgets/tree/main/ui-tests/tests) directory. Their names need to end with `.test.ts`. You can see some additional example test suites in the [JupyterLab repo](https://github.com/jupyterlab/jupyterlab/blob/master/galata/test). If the tests in new suites are doing visual regression tests or HTML source regression tests then you also need to add their reference images to the `-snapshots` directories. ## Reference Image Captures diff --git a/docs/source/embedding.md b/docs/source/embedding.md index 9459ddc1d2..1094ec63a6 100644 --- a/docs/source/embedding.md +++ b/docs/source/embedding.md @@ -252,7 +252,7 @@ If your notebook was saved with the special "Save Notebook Widget State" action in the Widgets menu, interactive widgets displayed in your notebook should also be rendered on nbviewer. -See e.g. the [Widget List](http://nbviewer.jupyter.org/github/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Widget%20List.ipynb) +See e.g. the [Widget List](http://nbviewer.jupyter.org/github/jupyter-widgets/ipywidgets/blob/main/docs/source/examples/Widget%20List.ipynb) example from the documentation. ## The Case of Custom Widget Libraries @@ -306,14 +306,14 @@ Specifically: the `Sphinx` extension, `nbviewer`, and the "Embed Widgets" command discussed above. -We provide [additional examples](https://github.com/jupyter-widgets/ipywidgets/tree/master/examples) of specializations of the base widget manager +We provide [additional examples](https://github.com/jupyter-widgets/ipywidgets/tree/main/examples) of specializations of the base widget manager implementing other usages of Jupyter widgets in web contexts. -1. The [`web1`](https://github.com/jupyter-widgets/ipywidgets/tree/master/examples/web1) example is a simplistic example showcasing the use of +1. The [`web1`](https://github.com/jupyter-widgets/ipywidgets/tree/main/examples/web1) example is a simplistic example showcasing the use of Jupyter widgets in a web context. -2. The [`web2`](https://github.com/jupyter-widgets/ipywidgets/tree/master/examples/web2) example is a simple example making use of the +2. The [`web2`](https://github.com/jupyter-widgets/ipywidgets/tree/main/examples/web2) example is a simple example making use of the `application/vnd.jupyter.widget-state+json` mime type. -3. The [`web3`](https://github.com/jupyter-widgets/ipywidgets/tree/master/examples/web3) example showcases how communication with a Jupyter kernel can +3. The [`web3`](https://github.com/jupyter-widgets/ipywidgets/tree/main/examples/web3) example showcases how communication with a Jupyter kernel can happen in a web context outside of the notebook or jupyterlab contexts. -4. The [`web4`](https://github.com/jupyter-widgets/ipywidgets/tree/master/examples/web4) example shows how to embed widgets in an HTML document +4. The [`web4`](https://github.com/jupyter-widgets/ipywidgets/tree/main/examples/web4) example shows how to embed widgets in an HTML document using the HTML widget manager. diff --git a/docs/source/index.md b/docs/source/index.md index 866e19544a..d04a32c902 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -9,7 +9,7 @@ The documentation for `ipywidgets` 7 is available at [ipywidgets 7 documentation](https://ipywidgets.readthedocs.io/en/7.x). ``` -Jupyter Widgets are [interactive browser controls](https://github.com/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Index.ipynb) +Jupyter Widgets are [interactive browser controls](https://github.com/jupyter-widgets/ipywidgets/blob/main/docs/source/examples/Index.ipynb) for Jupyter notebooks. Examples include: - Basic form controls like **sliders**, **checkboxes**, **text inputs** diff --git a/docs/source/migration_guides.md b/docs/source/migration_guides.md index 34d09aa299..598a1d91b3 100644 --- a/docs/source/migration_guides.md +++ b/docs/source/migration_guides.md @@ -313,10 +313,10 @@ for details. Since you probably want to avoid repeating the module version in every widget, a common pattern is to import the version from `package.json` and prepend a `~`. See -[ipyvolume](https://github.com/maartenbreddels/ipyvolume/blob/master/js/src/figure.js#L1245) +[ipyvolume](https://github.com/widgetti/ipyvolume/blob/master/js/src/figure.ts) for an example. If you do this, make sure that your webpack configuration includes a JSON loader. See the Webpack configuration for -[ipyvolume](https://github.com/maartenbreddels/ipyvolume/blob/master/js/webpack.config.js#L7) +[ipyvolume](https://github.com/widgetti/ipyvolume/blob/master/js/webpack.config.js#L7) for an example. ### Updating the notebook extension diff --git a/docs/source/user_install.md b/docs/source/user_install.md index 4fbe7041c4..53590185e2 100644 --- a/docs/source/user_install.md +++ b/docs/source/user_install.md @@ -77,7 +77,7 @@ jupyter labextension install @jupyter-widgets/jupyterlab-manager This command defaults to installing the latest version of the **ipywidgets** JupyterLab extension. Depending on the version of JupyterLab you have installed, you -may need to install [an older version](https://github.com/jupyter-widgets/ipywidgets/tree/master/packages/jupyterlab-manager#version-compatibility). +may need to install [an older version](https://github.com/jupyter-widgets/ipywidgets/tree/main/packages/jupyterlab-manager#version-compatibility). If you install this extension while JupyterLab is running, you will need to refresh the page or restart JupyterLab before the changes take effect. diff --git a/packages/base/src/services-shim.ts b/packages/base/src/services-shim.ts index 06cc909d83..d19a37d803 100644 --- a/packages/base/src/services-shim.ts +++ b/packages/base/src/services-shim.ts @@ -295,7 +295,6 @@ export namespace shims { if (callbacks.shell && callbacks.shell.reply) { callbacks.shell.reply(msg); } - // TODO: Handle payloads. See https://github.com/jupyter/notebook/blob/master/notebook/static/services/kernels/kernel.js#L923-L947 }; future.onStdin = function (msg): void { diff --git a/python/ipywidgets/README.md b/python/ipywidgets/README.md index 230c74ffa7..877a428c1f 100644 --- a/python/ipywidgets/README.md +++ b/python/ipywidgets/README.md @@ -1,7 +1,7 @@ # ipywidgets: Interactive HTML Widgets **ipywidgets**, also known as jupyter-widgets or simply widgets, are -[interactive HTML widgets](https://github.com/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Index.ipynb) +[interactive HTML widgets](https://github.com/jupyter-widgets/ipywidgets/blob/main/docs/source/examples/Index.ipynb) for Jupyter notebooks and the IPython kernel. This package contains the python implementation of the core interactive widgets bundled in ipywidgets. @@ -9,7 +9,7 @@ This package contains the python implementation of the core interactive widgets ## Core Interactive Widgets The fundamental widgets provided by this library are called core interactive -widgets. A [demonstration notebook](https://github.com/jupyter-widgets/ipywidgets/blob/master/docs/source/examples/Index.ipynb) +widgets. A [demonstration notebook](https://github.com/jupyter-widgets/ipywidgets/blob/main/docs/source/examples/Index.ipynb) provides an overview of the core interactive widgets, including: - sliders diff --git a/python/ipywidgets/ipywidgets/widgets/trait_types.py b/python/ipywidgets/ipywidgets/widgets/trait_types.py index 591f2a8fb0..4f8e078d43 100644 --- a/python/ipywidgets/ipywidgets/widgets/trait_types.py +++ b/python/ipywidgets/ipywidgets/widgets/trait_types.py @@ -367,11 +367,11 @@ def make_dynamic_default(self): # The regexp is taken -# from https://github.com/d3/d3-format/blob/master/src/formatSpecifier.js +# from https://github.com/d3/d3-format/blob/main/src/formatSpecifier.js _number_format_re = re.compile(r'^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$', re.I) # The valid types are taken from -# https://github.com/d3/d3-format/blob/master/src/formatTypes.js +# https://github.com/d3/d3-format/blob/main/src/formatTypes.js _number_format_types = { 'e', 'f', 'g', 'r', 's', '%', 'p', 'b', 'o', 'd', 'x', 'X', 'c', '' diff --git a/scripts/milestone_check.py b/scripts/milestone_check.py index 6212c1966e..2f49735379 100644 --- a/scripts/milestone_check.py +++ b/scripts/milestone_check.py @@ -15,7 +15,7 @@ REPO = 'jupyter-widgets/ipywidgets' ranges = { - '8.0': 'origin/master ^7.x', + '8.0': 'origin/main ^7.x', } try: @@ -182,7 +182,7 @@ if len(prs_not_represented) > 0: print(""" -PRs that are in the milestone, but have no commits in the version range. +PRs that are in the milestone, but have no commits in the version range. These PRs probably belong in a different milestone. """) print('\n'.join(f'https://github.com/{REPO}/pull/{i}' for i in prs_not_represented)) @@ -196,7 +196,7 @@ if len(notfound): print("""The following commits are not included in any PR on this milestone. This probably means the commit's PR needs to be assigned to this milestone, -or the commit was pushed to master directly. +or the commit was pushed to main directly. """) print('\n'.join('%s %s %s'%(c, commits[c][0], commits[c][1]) for c in notfound)) prs_to_check = [c for c in notfound if 'Merge pull request #' in commits[c][1] and commits[c][0] == 'noreply@github.com'] From 5a2773e8dfcc80b64834c309a46dc297c48af91e Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Mon, 23 Jan 2023 18:16:43 -0600 Subject: [PATCH 3/6] fix some sphinx warnings --- docs/source/conf.py | 1 - docs/source/examples/Layout Templates.ipynb | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 8fc5034fa5..aa052737e8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -46,7 +46,6 @@ def setup(app): extensions = [ 'myst_nb', - 'sphinx.ext.autosectionlabel', 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.intersphinx', diff --git a/docs/source/examples/Layout Templates.ipynb b/docs/source/examples/Layout Templates.ipynb index e4edffa8af..f7ec13d5da 100644 --- a/docs/source/examples/Layout Templates.ipynb +++ b/docs/source/examples/Layout Templates.ipynb @@ -6,7 +6,7 @@ "source": [ "# Using Layout Templates\n", "\n", - "As we showed in [Layout of Jupyter widgets](Widget%20Layout.ipynb), multiple widgets can be arranged together using the flexible [GridBox](Widget%20Styling.ipynb#The-Grid-layout) specification. However, use of the specification involves some understanding of CSS properties and may impose sharp learning curve. Here, we will describe layout templates built on top of `GridBox` that simplify creation of common widget layouts." + "As we showed in [Layout of Jupyter widgets](Widget%20Layout.ipynb), multiple widgets can be arranged together using the flexible [GridBox](Widget%20Layout.ipynb#The-Grid-layout) specification. However, use of the specification involves some understanding of CSS properties and may impose sharp learning curve. Here, we will describe layout templates built on top of `GridBox` that simplify creation of common widget layouts." ] }, { From 1f5c21957f2f7e3a0c090be38c2729f49ec57b45 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Mon, 23 Jan 2023 18:25:50 -0600 Subject: [PATCH 4/6] only open one notebook in lite --- docs/source/_templates/demo.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/_templates/demo.html b/docs/source/_templates/demo.html index bc18326f84..a8561fb4c5 100644 --- a/docs/source/_templates/demo.html +++ b/docs/source/_templates/demo.html @@ -11,7 +11,7 @@ autocomplete="off" checked title="Lab" - value="{{ pathto('try/lab/index') }}?path=Index.ipynb&path=Widget%20List.ipynb" + value="{{ pathto('try/lab/index') }}?path=Widget%20List.ipynb" > Lab @@ -20,14 +20,14 @@ type="radio" name="demo-app" title="Notebook" - value="{{ pathto('try/retro/index') }}?path=Index.ipynb&path=Widget%20List.ipynb" + value="{{ pathto('try/retro/index') }}?path=Widget%20List.ipynb" > Notebook Date: Mon, 23 Jan 2023 18:28:23 -0600 Subject: [PATCH 5/6] update binder workflow --- .github/workflows/binder-on-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/binder-on-pr.yml b/.github/workflows/binder-on-pr.yml index 3693330d9a..6e56aaa482 100644 --- a/.github/workflows/binder-on-pr.yml +++ b/.github/workflows/binder-on-pr.yml @@ -18,7 +18,7 @@ jobs: script: | var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO; var PR_HEAD_REF = process.env.PR_HEAD_REF; - github.issues.createComment({ + github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, From 0a2951420fc5bca4be82953410d5c3bf9f4b7ed3 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Wed, 25 Jan 2023 09:38:04 -0600 Subject: [PATCH 6/6] rework demo card, restore all content on index sidebar --- docs/source/_static/theme.css | 34 ++++++++++++++---- docs/source/_templates/demo.html | 36 +++++++++---------- .../_templates/sidebar-nav-bs-index.html | 24 +++++++++++++ docs/source/conf.py | 8 ++++- 4 files changed, 77 insertions(+), 25 deletions(-) create mode 100644 docs/source/_templates/sidebar-nav-bs-index.html diff --git a/docs/source/_static/theme.css b/docs/source/_static/theme.css index f851ae6659..dca8dfe4e5 100644 --- a/docs/source/_static/theme.css +++ b/docs/source/_static/theme.css @@ -1,9 +1,31 @@ -.demo-sidebar .demo-title { - font-size: var(--pst-sidebar-header-font-size); - font-weight: var(--pst-sidebar-header-font-weight); - margin-bottom: 0.5rem; -} - +/* index */ table.indextable tr.cap { background-color: var(--pst-color-on-background) !important; } + +/* demo */ +#demo-sidebar { + margin: 0; +} + +#demo-sidebar .demo-app { + display: inline; + display: flex; + flex-direction: row; + align-items: baseline; + flex-wrap: wrap; + margin: 0.75rem 0.25rem 0 0.25rem; +} + +.demo-app > * { + flex: 1 auto; + white-space: nowrap; +} + +#demo-sidebar .admonition-title::after { + display: none; +} + +#demo-sidebar .admonition-title { + padding-left: 0.75rem; +} diff --git a/docs/source/_templates/demo.html b/docs/source/_templates/demo.html index a8561fb4c5..cb0c901f62 100644 --- a/docs/source/_templates/demo.html +++ b/docs/source/_templates/demo.html @@ -1,41 +1,41 @@ -
-

- Try Jupyter Widgets Now +

+

+ + Try Jupyter Widgets

-
- - - - Try Now -