diff --git a/.github/workflows/upstream-dev-ci.yaml b/.github/workflows/upstream-dev-ci.yaml
index 58c5aab8bd3..9b1664a0292 100644
--- a/.github/workflows/upstream-dev-ci.yaml
+++ b/.github/workflows/upstream-dev-ci.yaml
@@ -2,10 +2,10 @@ name: CI Upstream
on:
push:
branches:
- - master
+ - main
pull_request:
branches:
- - master
+ - main
schedule:
- cron: "0 0 * * *" # Daily “At 00:00” UTC
workflow_dispatch: # allows you to trigger the workflow run manually
diff --git a/HOW_TO_RELEASE.md b/HOW_TO_RELEASE.md
index 8cac583eaae..16dc3b94196 100644
--- a/HOW_TO_RELEASE.md
+++ b/HOW_TO_RELEASE.md
@@ -13,10 +13,10 @@ upstream https://github.com/pydata/xarray (push)
- 1. Ensure your master branch is synced to upstream:
+ 1. Ensure your main branch is synced to upstream:
```sh
- git switch master
- git pull upstream master
+ git switch main
+ git pull upstream main
```
2. Confirm there are no commits on stable that are not yet merged
([ref](https://github.com/pydata/xarray/pull/4440)):
@@ -44,9 +44,9 @@ upstream https://github.com/pydata/xarray (push)
release.
6. Open a PR with the release summary and whatsnew changes; in particular the
release headline should get feedback from the team on what's important to include.
- 7. After merging, again ensure your master branch is synced to upstream:
+ 7. After merging, again ensure your main branch is synced to upstream:
```sh
- git pull upstream master
+ git pull upstream main
```
8. If you have any doubts, run the full test suite one final time!
```sh
@@ -59,12 +59,12 @@ upstream https://github.com/pydata/xarray (push)
11. This should automatically trigger an upload of the new build to PyPI via GitHub Actions.
Check this has run [here](https://github.com/pydata/xarray/actions/workflows/pypi-release.yaml),
and that the version number you expect is displayed [on PyPI](https://pypi.org/project/xarray/)
-12. Update the stable branch (used by ReadTheDocs) and switch back to master:
+12. Update the stable branch (used by ReadTheDocs) and switch back to main:
```sh
git switch stable
- git rebase master
+ git rebase main
git push --force upstream stable
- git switch master
+ git switch main
```
You may need to first fetch it with `git fetch upstream`,
and check out a local version with `git checkout -b stable upstream/stable`.
@@ -103,12 +103,12 @@ upstream https://github.com/pydata/xarray (push)
~~~~~~~~~~~~~~~~
```
-14. Commit your changes and push to master again:
+14. Commit your changes and push to main again:
```sh
git commit -am 'New whatsnew section'
- git push upstream master
+ git push upstream main
```
- You're done pushing to master!
+ You're done pushing to main!
15. Update the docs. Login to
and switch your new release tag (at the bottom) from "Inactive" to "Active".
diff --git a/README.rst b/README.rst
index e258a8ccd23..e246d5474c9 100644
--- a/README.rst
+++ b/README.rst
@@ -1,9 +1,9 @@
xarray: N-D labeled arrays and datasets
=======================================
-.. image:: https://github.com/pydata/xarray/workflows/CI/badge.svg?branch=master
+.. image:: https://github.com/pydata/xarray/workflows/CI/badge.svg?branch=main
:target: https://github.com/pydata/xarray/actions?query=workflow%3ACI
-.. image:: https://codecov.io/gh/pydata/xarray/branch/master/graph/badge.svg
+.. image:: https://codecov.io/gh/pydata/xarray/branch/main/graph/badge.svg
:target: https://codecov.io/gh/pydata/xarray
.. image:: https://readthedocs.org/projects/xray/badge/?version=latest
:target: https://xarray.pydata.org/
diff --git a/asv_bench/asv.conf.json b/asv_bench/asv.conf.json
index d35a2a223a2..83a2aa9f010 100644
--- a/asv_bench/asv.conf.json
+++ b/asv_bench/asv.conf.json
@@ -15,7 +15,7 @@
// List of branches to benchmark. If not provided, defaults to "master"
// (for git) or "default" (for mercurial).
- "branches": ["master"], // for git
+ "branches": ["main"], // for git
// "branches": ["default"], // for mercurial
// The DVCS being used. If not set, it will be automatically
diff --git a/doc/conf.py b/doc/conf.py
index 7e7c63ca165..f6f7abd61b2 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -102,10 +102,10 @@
nbsphinx_prolog = """
{% set docname = env.doc2path(env.docname, base=None) %}
-You can run this notebook in a `live session `_ |Binder| or view it `on Github `_.
+You can run this notebook in a `live session `_ |Binder| or view it `on Github `_.
.. |Binder| image:: https://mybinder.org/badge.svg
- :target: https://mybinder.org/v2/gh/pydata/xarray/master?urlpath=lab/tree/doc/{{ docname }}
+ :target: https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/{{ docname }}
"""
autosummary_generate = True
@@ -213,7 +213,7 @@
html_context = {
"github_user": "pydata",
"github_repo": "xarray",
- "github_version": "master",
+ "github_version": "main",
"doc_path": "doc",
}
@@ -224,7 +224,7 @@
# analytics_id='' this is configured in rtfd.io
# canonical_url="",
repository_url="https://github.com/pydata/xarray",
- repository_branch="master",
+ repository_branch="main",
path_to_docs="doc",
use_edit_page_button=True,
use_repository_button=True,
@@ -365,7 +365,7 @@ def linkcode_resolve(domain, info):
fn = os.path.relpath(fn, start=os.path.dirname(xarray.__file__))
if "+" in xarray.__version__:
- return f"https://github.com/pydata/xarray/blob/master/xarray/{fn}{linespec}"
+ return f"https://github.com/pydata/xarray/blob/main/xarray/{fn}{linespec}"
else:
return (
f"https://github.com/pydata/xarray/blob/"
diff --git a/doc/contributing.rst b/doc/contributing.rst
index 7086810fa9b..d73d18d5df7 100644
--- a/doc/contributing.rst
+++ b/doc/contributing.rst
@@ -38,7 +38,7 @@ report will allow others to reproduce the bug and provide insight into fixing. S
`this stackoverflow article `_ for tips on
writing a good bug report.
-Trying out the bug-producing code on the *master* branch is often a worthwhile exercise
+Trying out the bug-producing code on the *main* branch is often a worthwhile exercise
to confirm that the bug still exists. It is also worth searching existing bug reports and
pull requests to see if the issue has already been reported and/or fixed.
@@ -196,7 +196,7 @@ See the full conda docs `here `__.
Creating a branch
-----------------
-You want your master branch to reflect only production-ready code, so create a
+You want your ``main`` branch to reflect only production-ready code, so create a
feature branch before making your changes. For example::
git branch shiny-new-feature
@@ -211,12 +211,12 @@ changes in this branch specific to one bug or feature so it is clear
what the branch brings to *xarray*. You can have many "shiny-new-features"
and switch in between them using the ``git checkout`` command.
-To update this branch, you need to retrieve the changes from the master branch::
+To update this branch, you need to retrieve the changes from the ``main`` branch::
git fetch upstream
- git merge upstream/master
+ git merge upstream/main
-This will combine your commits with the latest *xarray* git master. If this
+This will combine your commits with the latest *xarray* git ``main``. If this
leads to merge conflicts, you must resolve these before submitting your pull
request. If you have uncommitted changes, you will need to ``git stash`` them
prior to updating. This will effectively store your changes, which can be
@@ -663,14 +663,14 @@ To install asv::
If you need to run a benchmark, change your directory to ``asv_bench/`` and run::
- asv continuous -f 1.1 upstream/master HEAD
+ asv continuous -f 1.1 upstream/main HEAD
You can replace ``HEAD`` with the name of the branch you are working on,
and report benchmarks that changed by more than 10%.
The command uses ``conda`` by default for creating the benchmark
environments. If you want to use virtualenv instead, write::
- asv continuous -f 1.1 -E virtualenv upstream/master HEAD
+ asv continuous -f 1.1 -E virtualenv upstream/main HEAD
The ``-E virtualenv`` option should be added to all ``asv`` commands
that run benchmarks. The default value is defined in ``asv.conf.json``.
@@ -682,12 +682,12 @@ regressions. You can run specific benchmarks using the ``-b`` flag, which
takes a regular expression. For example, this will only run tests from a
``xarray/asv_bench/benchmarks/groupby.py`` file::
- asv continuous -f 1.1 upstream/master HEAD -b ^groupby
+ asv continuous -f 1.1 upstream/main HEAD -b ^groupby
If you want to only run a specific group of tests from a file, you can do it
using ``.`` as a separator. For example::
- asv continuous -f 1.1 upstream/master HEAD -b groupby.GroupByMethods
+ asv continuous -f 1.1 upstream/main HEAD -b groupby.GroupByMethods
will only run the ``GroupByMethods`` benchmark defined in ``groupby.py``.
@@ -803,7 +803,7 @@ double check your branch changes against the branch it was based on:
#. Navigate to your repository on GitHub -- https://github.com/your-user-name/xarray
#. Click on ``Branches``
#. Click on the ``Compare`` button for your feature branch
-#. Select the ``base`` and ``compare`` branches, if necessary. This will be ``master`` and
+#. Select the ``base`` and ``compare`` branches, if necessary. This will be ``main`` and
``shiny-new-feature``, respectively.
Finally, make the pull request
@@ -811,8 +811,8 @@ Finally, make the pull request
If everything looks good, you are ready to make a pull request. A pull request is how
code from a local repository becomes available to the GitHub community and can be looked
-at and eventually merged into the master version. This pull request and its associated
-changes will eventually be committed to the master branch and available in the next
+at and eventually merged into the ``main`` version. This pull request and its associated
+changes will eventually be committed to the ``main`` branch and available in the next
release. To submit a pull request:
#. Navigate to your repository on GitHub
@@ -837,11 +837,11 @@ Delete your merged branch (optional)
------------------------------------
Once your feature branch is accepted into upstream, you'll probably want to get rid of
-the branch. First, update your ``master`` branch to check that the merge was successful::
+the branch. First, update your ``main`` branch to check that the merge was successful::
git fetch upstream
- git checkout master
- git merge upstream/master
+ git checkout main
+ git merge upstream/main
Then you can do::
diff --git a/doc/getting-started-guide/installing.rst b/doc/getting-started-guide/installing.rst
index b80d7b6be91..41ea1fa5952 100644
--- a/doc/getting-started-guide/installing.rst
+++ b/doc/getting-started-guide/installing.rst
@@ -111,9 +111,9 @@ release is guaranteed to work.
You can see the actual minimum tested versions:
- `For NEP-18 libraries
- `_
+ `_
- `For everything else
- `_
+ `_
.. _installation-instructions:
diff --git a/doc/whats-new.rst b/doc/whats-new.rst
index 4e9429e4a07..f089f85ce27 100644
--- a/doc/whats-new.rst
+++ b/doc/whats-new.rst
@@ -1282,7 +1282,7 @@ Internal Changes
v0.15.0 (30 Jan 2020)
---------------------
-This release brings many improvements to xarray's documentation: our examples are now binderized notebooks (`click here `_)
+This release brings many improvements to xarray's documentation: our examples are now binderized notebooks (`click here `_)
and we have new example notebooks from our SciPy 2019 sprint (many thanks to our contributors!).
This release also features many API improvements such as a new