Skip to content

Commit eb906a4

Browse files
authored
update references to master (#5520)
* rename master to main in the upstream-dev CI * update the badges * more updates * update the release guide * update the asv configuration * update the contributing guide [skip-ci]
1 parent 2756008 commit eb906a4

File tree

8 files changed

+39
-39
lines changed

8 files changed

+39
-39
lines changed

.github/workflows/upstream-dev-ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: CI Upstream
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
pull_request:
77
branches:
8-
- master
8+
- main
99
schedule:
1010
- cron: "0 0 * * *" # Daily “At 00:00” UTC
1111
workflow_dispatch: # allows you to trigger the workflow run manually

HOW_TO_RELEASE.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ upstream https://github.com/pydata/xarray (push)
1313

1414
<!-- markdownlint-disable MD031 -->
1515

16-
1. Ensure your master branch is synced to upstream:
16+
1. Ensure your main branch is synced to upstream:
1717
```sh
18-
git switch master
19-
git pull upstream master
18+
git switch main
19+
git pull upstream main
2020
```
2121
2. Confirm there are no commits on stable that are not yet merged
2222
([ref](https://github.com/pydata/xarray/pull/4440)):
@@ -44,9 +44,9 @@ upstream https://github.com/pydata/xarray (push)
4444
release.
4545
6. Open a PR with the release summary and whatsnew changes; in particular the
4646
release headline should get feedback from the team on what's important to include.
47-
7. After merging, again ensure your master branch is synced to upstream:
47+
7. After merging, again ensure your main branch is synced to upstream:
4848
```sh
49-
git pull upstream master
49+
git pull upstream main
5050
```
5151
8. If you have any doubts, run the full test suite one final time!
5252
```sh
@@ -59,12 +59,12 @@ upstream https://github.com/pydata/xarray (push)
5959
11. This should automatically trigger an upload of the new build to PyPI via GitHub Actions.
6060
Check this has run [here](https://github.com/pydata/xarray/actions/workflows/pypi-release.yaml),
6161
and that the version number you expect is displayed [on PyPI](https://pypi.org/project/xarray/)
62-
12. Update the stable branch (used by ReadTheDocs) and switch back to master:
62+
12. Update the stable branch (used by ReadTheDocs) and switch back to main:
6363
```sh
6464
git switch stable
65-
git rebase master
65+
git rebase main
6666
git push --force upstream stable
67-
git switch master
67+
git switch main
6868
```
6969
You may need to first fetch it with `git fetch upstream`,
7070
and check out a local version with `git checkout -b stable upstream/stable`.
@@ -103,12 +103,12 @@ upstream https://github.com/pydata/xarray (push)
103103
~~~~~~~~~~~~~~~~
104104
105105
```
106-
14. Commit your changes and push to master again:
106+
14. Commit your changes and push to main again:
107107
```sh
108108
git commit -am 'New whatsnew section'
109-
git push upstream master
109+
git push upstream main
110110
```
111-
You're done pushing to master!
111+
You're done pushing to main!
112112
113113
15. Update the docs. Login to <https://readthedocs.org/projects/xray/versions/>
114114
and switch your new release tag (at the bottom) from "Inactive" to "Active".

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
xarray: N-D labeled arrays and datasets
22
=======================================
33

4-
.. image:: https://github.com/pydata/xarray/workflows/CI/badge.svg?branch=master
4+
.. image:: https://github.com/pydata/xarray/workflows/CI/badge.svg?branch=main
55
:target: https://github.com/pydata/xarray/actions?query=workflow%3ACI
6-
.. image:: https://codecov.io/gh/pydata/xarray/branch/master/graph/badge.svg
6+
.. image:: https://codecov.io/gh/pydata/xarray/branch/main/graph/badge.svg
77
:target: https://codecov.io/gh/pydata/xarray
88
.. image:: https://readthedocs.org/projects/xray/badge/?version=latest
99
:target: https://xarray.pydata.org/

asv_bench/asv.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
// List of branches to benchmark. If not provided, defaults to "master"
1717
// (for git) or "default" (for mercurial).
18-
"branches": ["master"], // for git
18+
"branches": ["main"], // for git
1919
// "branches": ["default"], // for mercurial
2020

2121
// The DVCS being used. If not set, it will be automatically

doc/conf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@
102102
nbsphinx_prolog = """
103103
{% set docname = env.doc2path(env.docname, base=None) %}
104104
105-
You can run this notebook in a `live session <https://mybinder.org/v2/gh/pydata/xarray/doc/examples/master?urlpath=lab/tree/doc/{{ docname }}>`_ |Binder| or view it `on Github <https://github.com/pydata/xarray/blob/master/doc/{{ docname }}>`_.
105+
You can run this notebook in a `live session <https://mybinder.org/v2/gh/pydata/xarray/doc/examples/main?urlpath=lab/tree/doc/{{ docname }}>`_ |Binder| or view it `on Github <https://github.com/pydata/xarray/blob/main/doc/{{ docname }}>`_.
106106
107107
.. |Binder| image:: https://mybinder.org/badge.svg
108-
:target: https://mybinder.org/v2/gh/pydata/xarray/master?urlpath=lab/tree/doc/{{ docname }}
108+
:target: https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/{{ docname }}
109109
"""
110110

111111
autosummary_generate = True
@@ -213,7 +213,7 @@
213213
html_context = {
214214
"github_user": "pydata",
215215
"github_repo": "xarray",
216-
"github_version": "master",
216+
"github_version": "main",
217217
"doc_path": "doc",
218218
}
219219

@@ -224,7 +224,7 @@
224224
# analytics_id='' this is configured in rtfd.io
225225
# canonical_url="",
226226
repository_url="https://github.com/pydata/xarray",
227-
repository_branch="master",
227+
repository_branch="main",
228228
path_to_docs="doc",
229229
use_edit_page_button=True,
230230
use_repository_button=True,
@@ -365,7 +365,7 @@ def linkcode_resolve(domain, info):
365365
fn = os.path.relpath(fn, start=os.path.dirname(xarray.__file__))
366366

367367
if "+" in xarray.__version__:
368-
return f"https://github.com/pydata/xarray/blob/master/xarray/{fn}{linespec}"
368+
return f"https://github.com/pydata/xarray/blob/main/xarray/{fn}{linespec}"
369369
else:
370370
return (
371371
f"https://github.com/pydata/xarray/blob/"

doc/contributing.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ report will allow others to reproduce the bug and provide insight into fixing. S
3838
`this stackoverflow article <https://stackoverflow.com/help/mcve>`_ for tips on
3939
writing a good bug report.
4040

41-
Trying out the bug-producing code on the *master* branch is often a worthwhile exercise
41+
Trying out the bug-producing code on the *main* branch is often a worthwhile exercise
4242
to confirm that the bug still exists. It is also worth searching existing bug reports and
4343
pull requests to see if the issue has already been reported and/or fixed.
4444

@@ -196,7 +196,7 @@ See the full conda docs `here <http://conda.pydata.org/docs>`__.
196196
Creating a branch
197197
-----------------
198198

199-
You want your master branch to reflect only production-ready code, so create a
199+
You want your ``main`` branch to reflect only production-ready code, so create a
200200
feature branch before making your changes. For example::
201201

202202
git branch shiny-new-feature
@@ -211,12 +211,12 @@ changes in this branch specific to one bug or feature so it is clear
211211
what the branch brings to *xarray*. You can have many "shiny-new-features"
212212
and switch in between them using the ``git checkout`` command.
213213

214-
To update this branch, you need to retrieve the changes from the master branch::
214+
To update this branch, you need to retrieve the changes from the ``main`` branch::
215215

216216
git fetch upstream
217-
git merge upstream/master
217+
git merge upstream/main
218218

219-
This will combine your commits with the latest *xarray* git master. If this
219+
This will combine your commits with the latest *xarray* git ``main``. If this
220220
leads to merge conflicts, you must resolve these before submitting your pull
221221
request. If you have uncommitted changes, you will need to ``git stash`` them
222222
prior to updating. This will effectively store your changes, which can be
@@ -663,14 +663,14 @@ To install asv::
663663
664664
If you need to run a benchmark, change your directory to ``asv_bench/`` and run::
665665
666-
asv continuous -f 1.1 upstream/master HEAD
666+
asv continuous -f 1.1 upstream/main HEAD
667667
668668
You can replace ``HEAD`` with the name of the branch you are working on,
669669
and report benchmarks that changed by more than 10%.
670670
The command uses ``conda`` by default for creating the benchmark
671671
environments. If you want to use virtualenv instead, write::
672672
673-
asv continuous -f 1.1 -E virtualenv upstream/master HEAD
673+
asv continuous -f 1.1 -E virtualenv upstream/main HEAD
674674
675675
The ``-E virtualenv`` option should be added to all ``asv`` commands
676676
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
682682
takes a regular expression. For example, this will only run tests from a
683683
``xarray/asv_bench/benchmarks/groupby.py`` file::
684684
685-
asv continuous -f 1.1 upstream/master HEAD -b ^groupby
685+
asv continuous -f 1.1 upstream/main HEAD -b ^groupby
686686
687687
If you want to only run a specific group of tests from a file, you can do it
688688
using ``.`` as a separator. For example::
689689
690-
asv continuous -f 1.1 upstream/master HEAD -b groupby.GroupByMethods
690+
asv continuous -f 1.1 upstream/main HEAD -b groupby.GroupByMethods
691691
692692
will only run the ``GroupByMethods`` benchmark defined in ``groupby.py``.
693693
@@ -803,16 +803,16 @@ double check your branch changes against the branch it was based on:
803803
#. Navigate to your repository on GitHub -- https://github.com/your-user-name/xarray
804804
#. Click on ``Branches``
805805
#. Click on the ``Compare`` button for your feature branch
806-
#. Select the ``base`` and ``compare`` branches, if necessary. This will be ``master`` and
806+
#. Select the ``base`` and ``compare`` branches, if necessary. This will be ``main`` and
807807
``shiny-new-feature``, respectively.
808808
809809
Finally, make the pull request
810810
------------------------------
811811
812812
If everything looks good, you are ready to make a pull request. A pull request is how
813813
code from a local repository becomes available to the GitHub community and can be looked
814-
at and eventually merged into the master version. This pull request and its associated
815-
changes will eventually be committed to the master branch and available in the next
814+
at and eventually merged into the ``main`` version. This pull request and its associated
815+
changes will eventually be committed to the ``main`` branch and available in the next
816816
release. To submit a pull request:
817817
818818
#. Navigate to your repository on GitHub
@@ -837,11 +837,11 @@ Delete your merged branch (optional)
837837
------------------------------------
838838
839839
Once your feature branch is accepted into upstream, you'll probably want to get rid of
840-
the branch. First, update your ``master`` branch to check that the merge was successful::
840+
the branch. First, update your ``main`` branch to check that the merge was successful::
841841
842842
git fetch upstream
843-
git checkout master
844-
git merge upstream/master
843+
git checkout main
844+
git merge upstream/main
845845
846846
Then you can do::
847847

doc/getting-started-guide/installing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ release is guaranteed to work.
111111
You can see the actual minimum tested versions:
112112

113113
- `For NEP-18 libraries
114-
<https://github.com/pydata/xarray/blob/master/ci/requirements/py37-min-nep18.yml>`_
114+
<https://github.com/pydata/xarray/blob/main/ci/requirements/py37-min-nep18.yml>`_
115115
- `For everything else
116-
<https://github.com/pydata/xarray/blob/master/ci/requirements/py37-min-all-deps.yml>`_
116+
<https://github.com/pydata/xarray/blob/main/ci/requirements/py37-min-all-deps.yml>`_
117117

118118
.. _installation-instructions:
119119

doc/whats-new.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,7 @@ Internal Changes
12821282
v0.15.0 (30 Jan 2020)
12831283
---------------------
12841284

1285-
This release brings many improvements to xarray's documentation: our examples are now binderized notebooks (`click here <https://mybinder.org/v2/gh/pydata/xarray/master?urlpath=lab/tree/doc/examples/weather-data.ipynb>`_)
1285+
This release brings many improvements to xarray's documentation: our examples are now binderized notebooks (`click here <https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/weather-data.ipynb>`_)
12861286
and we have new example notebooks from our SciPy 2019 sprint (many thanks to our contributors!).
12871287

12881288
This release also features many API improvements such as a new

0 commit comments

Comments
 (0)