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/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,
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/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 37c873e947..cd2bcecb17 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -31,6 +31,10 @@ jobs:
run: |
cd docs/source
python -m sphinx -T -E -b html -d ../build/doctrees -D language=en . ../build/html
+ - name: Check internal links
+ run: |
+ cd docs/build/html
+ pytest-check-links -vv --check-anchors --check-links-ignore "^https?://" --links-ext html
js:
name: JavaScript
runs-on: ubuntu-latest
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)** | [](https://github.com/jupyter-widgets/ipywidgets/actions?query=branch%3Amaster) [](https://ipywidgets.readthedocs.io/en/latest/?badge=latest) [](https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/master?urlpath=lab/tree/docs%2Fsource%2Fexamples) |
+| **Latest (`main`: future 8.0)** | [](https://github.com/jupyter-widgets/ipywidgets/actions?query=branch%3Amain) [](https://ipywidgets.readthedocs.io/en/latest/?badge=latest) [](https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/main?urlpath=lab/tree/docs%2Fsource%2Fexamples) |
| **Stable** | [](https://pypi.python.org/pypi/ipywidgets) [](https://anaconda.org/conda-forge/ipywidgets) [](https://ipywidgets.readthedocs.io/en/stable/?badge=stable) [](https://mybinder.org/v2/gh/jupyter-widgets/ipywidgets/7.x?urlpath=lab/tree/docs%2Fsource%2Fexamples) |
| **Communication** | [](https://gitter.im/jupyter-widgets/Lobby) [](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/environment.yml b/docs/environment.yml
index 81e9b89540..bfc6005ce7 100644
--- a/docs/environment.yml
+++ b/docs/environment.yml
@@ -33,7 +33,10 @@ dependencies:
- scikit-image
- scikit-learn
- sympy
- # jupyterlite dependencies
+ # test
+ - pytest-check-links
+ - requests-cache
+ # jupyterlite
- doit
- pkginfo
- python-libarchive-c
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"
]
}
}
diff --git a/docs/requirements.txt b/docs/requirements.txt
index a751839769..e30f9645ad 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -13,7 +13,9 @@ numpy
packaging
pkginfo
pydata-sphinx-theme
+pytest-check-links
recommonmark
+requests-cache
scikit-image
scikit-learn
sphinx >=1.4.6
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
=^]))?([+\-\( ])?([$#])?(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']