Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update references to master to point to main #3351

Merged
merged 5 commits into from Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/make_bundle.yml
Expand Up @@ -4,10 +4,10 @@ on:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
branches:
- master
- main
pull_request:
branches:
- master
- main
schedule:
- cron: "0 0 * * *"
# Allows you to run this workflow manually from the Actions tab
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/make_docs.yml
@@ -1,7 +1,7 @@
on:
push:
branches:
- master
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # accept all tags of the format vX.X.X

Expand All @@ -14,7 +14,7 @@ jobs:
if: github.repository == 'napari/napari'
steps:
- name: Clone main repo
uses: actions/checkout@master
uses: actions/checkout@main
with:
path: main # place in a named directory
- name: Install Python
Expand All @@ -26,10 +26,10 @@ jobs:
pip install --upgrade pip
pip install pyyaml
- name: Clone napari.github.io repository
uses: actions/checkout@master
uses: actions/checkout@main
with:
repository: 'napari/napari.github.io'
ref: master
ref: main
path: 'napari.github.io'
token: ${{ secrets.DOCS_GITHUB_TOKEN }}
- name: copy doc sources
Expand All @@ -41,7 +41,7 @@ jobs:
message: |
update doc sources
autogenerated from ${{ github.repository }}@${{ github.sha }}
ref: master
ref: main
add: .
cwd: ./napari.github.io
env:
Expand All @@ -53,7 +53,7 @@ jobs:
if: github.repository == 'napari/napari'
steps:
- name: Clone main repo
uses: actions/checkout@master
uses: actions/checkout@main
with:
fetch-depth: 0 # keep all commit history
path: main # place in a named directory
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
DISPLAY: ":99.0"

- name: Clone docs repo
uses: actions/checkout@master
uses: actions/checkout@main
with:
repository: 'napari/docs'
ref: master
Expand All @@ -104,7 +104,7 @@ jobs:
VER=${GIT_TAG_NAME:-dev}
DIR=./docs/$VER
rm -rf $DIR
cp -r ./main/docs/_build/html $DIR
cp -r ./master/docs/_build/html $DIR
echo "::set-output name=directory::$VER"
- name: Add & commit changes
uses: EndBug/add-and-commit@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/make_release.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
if: github.repository == 'napari/napari'
steps:
- name: Checkout code
uses: actions/checkout@master
uses: actions/checkout@main
- name: Install Python
uses: actions/setup-python@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_comprehensive.yml
@@ -1,11 +1,11 @@
# The full test suite, which will be run anytime anything is merged into master.
# The full test suite, which will be run anytime anything is merged into main.
# See test_pull_request.yml for the tests that will be run
name: Full Test

on:
push:
branches:
- master
- main
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
# Allows you to run this workflow manually from the Actions tab
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_prereleases.yml
Expand Up @@ -6,7 +6,7 @@ name: --pre Test
on:
push:
branches:
- master
- main
schedule:
- cron: '0 */12 * * *' # every 12 hours
# Allows you to run this workflow manually from the Actions tab
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_pull_requests.yml
Expand Up @@ -4,7 +4,7 @@ name: PR Test
on:
pull_request:
branches:
- master
- main

jobs:
code:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -2,11 +2,11 @@

### multi-dimensional image viewer for python

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/napari/napari/master?urlpath=%2Fdesktop)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/napari/napari/main?urlpath=%2Fdesktop)
[![image.sc forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&url=https%3A%2F%2Fforum.image.sc%2Ftags%2Fnapari.json&query=%24.topic_list.tags.0.topic_count&colorB=brightgreen&suffix=%20topics&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tag/napari)
[![License](https://img.shields.io/pypi/l/napari.svg)](https://github.com/napari/napari/raw/master/LICENSE)
[![License](https://img.shields.io/pypi/l/napari.svg)](https://github.com/napari/napari/raw/main/LICENSE)
[![Build Status](https://api.cirrus-ci.com/github/Napari/napari.svg)](https://cirrus-ci.com/napari/napari)
[![codecov](https://codecov.io/gh/napari/napari/branch/master/graph/badge.svg)](https://codecov.io/gh/napari/napari)
[![codecov](https://codecov.io/gh/napari/napari/branch/main/graph/badge.svg)](https://codecov.io/gh/napari/napari)
[![Python Version](https://img.shields.io/pypi/pyversions/napari.svg)](https://python.org)
[![PyPI](https://img.shields.io/pypi/v/napari.svg)](https://pypi.org/project/napari)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/napari.svg)](https://pypistats.org/packages/napari)
Expand Down
2 changes: 1 addition & 1 deletion asv.conf.json
Expand Up @@ -17,7 +17,7 @@
"install_command": ["in-dir={env_dir} python -m pip install {conf_dir}[all]"],

// List of branches to benchmark
"branches": ["master"],
"branches": ["main"],

// The tool to use to create environments.
"environment_type": "virtualenv",
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Expand Up @@ -15,7 +15,7 @@ execute:
repository:
url: https://github.com/napari/napari # Online location of your book
path_to_book: docs # Optional path to your book, relative to the repository root
branch: master # Which branch of the repository should be used when creating links (optional)
branch: main # Which branch of the repository should be used when creating links (optional)

# Add GitHub buttons to your book
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
Expand Down
4 changes: 2 additions & 2 deletions docs/community/code_of_conduct.md
Expand Up @@ -62,7 +62,7 @@ If your report involves any members of the committee, or if they feel they have

## Incident reporting resolution & Code of Conduct enforcement

*This section summarizes the most important points, more details can be found in [napari Code of Conduct - How to follow up on a report.](https://github.com/napari/napari/blob/master/docs/developers/code_of_conduct_reporting.md)*
*This section summarizes the most important points, more details can be found in [napari Code of Conduct - How to follow up on a report.](https://github.com/napari/napari/blob/main/docs/developers/code_of_conduct_reporting.md)*

We will investigate and respond to all complaints. The napari Code of Conduct Committee will protect the identity of the reporter, and treat the content of complaints as confidential (unless the reporter agrees otherwise).

Expand All @@ -76,7 +76,7 @@ In cases not involving clear severe and obvious breaches of this code of conduct

3. mediation (if feedback didn’t help, and only if both reporter and reportee agree to this)

4. enforcement via transparent decision (see [Resolutions](https://github.com/napari/napari/blob/master/docs/REPORT_HANDLING_MANUAL.md#resolutions)) by the Code of Conduct Committee
4. enforcement via transparent decision (see [Resolutions](https://github.com/napari/napari/blob/main/docs/REPORT_HANDLING_MANUAL.md#resolutions)) by the Code of Conduct Committee

The committee will respond to any report as soon as possible, and at most within 72 hours.

Expand Down
12 changes: 6 additions & 6 deletions docs/developers/benchmarks.md
Expand Up @@ -101,24 +101,24 @@ of time since building napari can be a time consuming task:
asv run -E existing -b ViewImageSuite
```

## Comparing results to master
## Comparing results to main

Often, the goal of a PR is to compare the results of the modifications in terms
of speed to a snapshot of the code that is in the master branch of the
of speed to a snapshot of the code that is in the main branch of the
``napari`` repository. The command ``asv continuous`` is of help here:

```bash
asv continuous master your-current-branch -b ViewImageSuite
asv continuous main your-current-branch -b ViewImageSuite
```

This call will build out the environments specified in the ``asv.conf.json``
file and compare the performance of the benchmark between your current commit
and the code in the master branch.
and the code in the main branch.

The output may look something like:

```bash
$ asv continuous master your-current-branch -b ViewImageSuite
$ asv continuous main your-current-branch -b ViewImageSuite
· Creating environments
· Discovering benchmarks
·· Uninstalling from conda-py3.7-cython-numpy1.15-scipy
Expand All @@ -131,7 +131,7 @@ $ asv continuous master your-current-branch -b ViewImageSuite
BENCHMARKS NOT SIGNIFICANTLY CHANGED.
```

In this case, the differences between HEAD on your-current-branch and master are not significant
In this case, the differences between HEAD on your-current-branch and main are not significant
enough for airspeed velocity to report.

## profiling
Expand Down
23 changes: 12 additions & 11 deletions docs/developers/contributing.md
Expand Up @@ -39,12 +39,12 @@ pre-commit install
```

Upon committing, your code will be formatted according to our [`black`
configuration](https://github.com/napari/napari/blob/master/pyproject.toml), which includes the settings
configuration](https://github.com/napari/napari/blob/main/pyproject.toml), which includes the settings
`skip-string-normalization = true` and `max-line-length = 79`. To learn more,
see [`black`'s documentation](https://black.readthedocs.io/en/stable/).

Code will also be linted to enforce the stylistic and logistical rules specified
in our [`flake8` configuration](https://github.com/napari/napari/blob/master/setup.cfg), which currently ignores
in our [`flake8` configuration](https://github.com/napari/napari/blob/main/setup.cfg), which currently ignores
[E203](https://lintlyci.github.io/Flake8Rules/rules/E203.html),
[E501](https://lintlyci.github.io/Flake8Rules/rules/E501.html),
[W503](https://lintlyci.github.io/Flake8Rules/rules/W503.html) and
Expand Down Expand Up @@ -142,7 +142,7 @@ To learn more, please see the [translations guide](../guides/translations.md).

Create a new feature branch:
```sh
git checkout master -b your-branch-name
git checkout main -b your-branch-name
```

`git` will automatically detect changes to a repository.
Expand Down Expand Up @@ -175,26 +175,26 @@ To set it, use `git config --global user.email your-address@example.com`.

## Keeping your branches up-to-date

Switch to the `master` branch:
Switch to the `main` branch:
```sh
git checkout master
git checkout main
```

Fetch changes and update `master`:
Fetch changes and update `main`:
```sh
git pull upstream master --tags
git pull upstream main --tags
```

This is shorthand for:
```sh
git fetch upstream master --tags
git merge upstream/master
git fetch upstream main --tags
git merge upstream/main
```

Update your other branches:
```sh
git checkout your-branch-name
git merge master
git merge main
```

## Sharing your changes
Expand All @@ -204,7 +204,8 @@ Update your remote branch:
git push -u origin your-branch-name
```

You can then make a [pull-request](https://guides.github.com/activities/forking/#making-a-pull-request) to `napari`'s `master` branch.
You can then make a
[pull-request](https://guides.github.com/activities/forking/#making-a-pull-request) to `napari`'s `main` branch.

## Building the docs

Expand Down
12 changes: 6 additions & 6 deletions docs/developers/release.md
Expand Up @@ -9,7 +9,7 @@ They will need to have a [PyPI](https://pypi.org) account with upload permission

You will also need the additional `release` dependencies (`pip install -e .[release]`) to complete the release process.

> [`MANIFEST.in`](https://github.com/napari/napari/blob/master/MANIFEST.in) determines which non-Python files are included.
> [`MANIFEST.in`](https://github.com/napari/napari/blob/main/MANIFEST.in) determines which non-Python files are included.
> Make sure to check that all necessary ones are listed before beginning the release process.

The `napari/napari` repository must have a PyPI API token as a GitHub secret.
Expand Down Expand Up @@ -37,7 +37,7 @@ release though we need to generate the release notes.
for the `0.2.1` release can be done as follows:

```bash
python docs/release/generate_release_notes.py v0.2.0 master --version 0.2.1 | tee docs/release/release_0_2_1.md
python docs/release/generate_release_notes.py v0.2.0 main --version 0.2.1 | tee docs/release/release_0_2_1.md
```

2. Scan the PR titles for highlights, deprecations, API changes,
Expand All @@ -55,7 +55,7 @@ release though we need to generate the release notes.
As new code is included in the codebase, some of the strings that need to be translated might
not yet be using the `trans` methods. To help keep the codebase up to date in terms
of translations we added a test script that
[runs daily on CI](https://github.com/napari/napari/actions/workflows/test_translations.yml)
[runs daily on CI](https://github.com/napari/napari/actions/workflows/test_translations.yml)
and can be also run locally to ensure that a release includes the most up to date translatable
strings.

Expand Down Expand Up @@ -84,10 +84,10 @@ release number.
You can tag the current source code as a release candidate with:

```bash
git tag vX.Y.Zrc1 master
git tag vX.Y.Zrc1 main
```

If the tag is meant for a previous version of master, simply reference the specific commit:
If the tag is meant for a previous version of main, simply reference the specific commit:

```bash
git tag vX.Y.Zrc1 abcde42
Expand Down Expand Up @@ -126,6 +126,6 @@ To generate the actual release you will now repeat the processes above but now d
For example:

```bash
git tag vX.Y.Z master
git tag vX.Y.Z main
git push upstream --tags
```
6 changes: 3 additions & 3 deletions docs/guides/3D_interactivity.md
Expand Up @@ -73,12 +73,12 @@ def get_ray_intersections(
```

## Adding 3D interactivity via mouse events
Custom 3D interactivity can be added via mouse callbacks. The `layer.get_ray_intersections()` function has been designed to work seamlessly with the napari mouse callback event. You can pass the mouse callback event properties to `layer.get_ray_intersections()` get the `start_point` and `end_point` of where the click line intersects the layer data.
Custom 3D interactivity can be added via mouse callbacks. The `layer.get_ray_intersections()` function has been designed to work seamlessly with the napari mouse callback event. You can pass the mouse callback event properties to `layer.get_ray_intersections()` get the `start_point` and `end_point` of where the click line intersects the layer data.

```
@layer.mouse_drag_callbacks.append
def on_click(layer, event):
# get the points where the click intersects the
# get the points where the click intersects the
start_point, end_point = layer.get_ray_intersections(
position=event.position,
view_direction=event.view_direction,
Expand All @@ -89,7 +89,7 @@ def on_click(layer, event):
# use start_point and end_point to interrogate layer data
```

For an example implementation, see [`cursor_ray.py`](https://github.com/napari/napari/blob/master/examples/cursor_ray.py).
For an example implementation, see [`cursor_ray.py`](https://github.com/napari/napari/blob/main/examples/cursor_ray.py).

## Getting the layer data under the cursor
There are convenience methods in the layer objects (`layer.get_value()`) to get the layer data value underneath the cursor that is "on top" (i.e., closest to `start_point`). Like `layer.get_ray_intersections()`, `layer.get_value()` takes the click position, view direction, dims_displayed in either world or layer coordinates (see `world` argument) as input. Thus, it can be easily integrated into a mouse event callback. Note that `layer.get_value()` returns `None` if the layer is not currently visible. See the docstring below for details.
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/connecting_events.md
Expand Up @@ -48,7 +48,7 @@ napari.run()
```

See also this [custom key bindings
example](https://github.com/napari/napari/blob/master/examples/custom_key_bindings.py).
example](https://github.com/napari/napari/blob/main/examples/custom_key_bindings.py).

### Listening for mouse events

Expand Down Expand Up @@ -83,9 +83,9 @@ registered with `mouse_drag_callbacks`, and `mouse_double_click_callbacks` is
triggered _in addition to_ mouse `mouse_drag_callbacks`.

See also the [custom mouse
functions](https://github.com/napari/napari/blob/master/examples/custom_mouse_functions.py)
functions](https://github.com/napari/napari/blob/main/examples/custom_mouse_functions.py)
and [mouse drag
callback](https://github.com/napari/napari/blob/master/examples/mouse_drag_callback.py)
callback](https://github.com/napari/napari/blob/main/examples/mouse_drag_callback.py)
examples.

### Connection functions to native napari events
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/perfmon.md
Expand Up @@ -262,9 +262,9 @@ at every point in time. For example you could record the length of a queue,
and see the queue grow and shrink over time.

Calls to `perf_timer`, `add_instant_event` and `add_counter_event` should
be removed before merging code into master. Think of them like "debug
be removed before merging code into main. Think of them like "debug
prints", things you add while investigating a problem, but you do not leave
them in the code permanently.

You can save JSON files so that you can compare how things looked
You can save JSON files so that you can compare how things looked
before and after your changes.