Skip to content

Commit

Permalink
rename master to main wherever possible, fix (some) broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Jan 24, 2023
1 parent 54871b5 commit 05d3b22
Show file tree
Hide file tree
Showing 19 changed files with 53 additions and 53 deletions.
6 changes: 3 additions & 3 deletions .binder/README
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build jupyterlab_widgets

on:
push:
branches: master
branches: main
pull_request:
branches: '*'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/devinstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run the dev-install script

on:
push:
branches: master
branches: main
pull_request:
branches: '*'

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Packaging

on:
push:
branches: [master]
branches:
- main
pull_request:
branches: '*'

Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/source/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion docs/source/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion docs/source/dev_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions docs/source/dev_release.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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).
Expand All @@ -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
Expand All @@ -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
```
6 changes: 3 additions & 3 deletions docs/source/dev_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
Loading

0 comments on commit 05d3b22

Please sign in to comment.