Skip to content

Commit

Permalink
update references to master (pydata#5520)
Browse files Browse the repository at this point in the history
* 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]
  • Loading branch information
keewis authored Jun 24, 2021
1 parent 2756008 commit eb906a4
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/upstream-dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions HOW_TO_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ upstream https://github.com/pydata/xarray (push)

<!-- markdownlint-disable MD031 -->

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)):
Expand Down Expand Up @@ -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
Expand All @@ -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`.
Expand Down Expand Up @@ -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 <https://readthedocs.org/projects/xray/versions/>
and switch your new release tag (at the bottom) from "Inactive" to "Active".
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
2 changes: 1 addition & 1 deletion asv_bench/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@
nbsphinx_prolog = """
{% set docname = env.doc2path(env.docname, base=None) %}
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 }}>`_.
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 }}>`_.
.. |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
Expand Down Expand Up @@ -213,7 +213,7 @@
html_context = {
"github_user": "pydata",
"github_repo": "xarray",
"github_version": "master",
"github_version": "main",
"doc_path": "doc",
}

Expand All @@ -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,
Expand Down Expand Up @@ -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/"
Expand Down
30 changes: 15 additions & 15 deletions doc/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ report will allow others to reproduce the bug and provide insight into fixing. S
`this stackoverflow article <https://stackoverflow.com/help/mcve>`_ 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.

Expand Down Expand Up @@ -196,7 +196,7 @@ See the full conda docs `here <http://conda.pydata.org/docs>`__.
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
Expand All @@ -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
Expand Down Expand Up @@ -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``.
Expand All @@ -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``.
Expand Down Expand Up @@ -803,16 +803,16 @@ 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
------------------------------
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
Expand All @@ -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::
Expand Down
4 changes: 2 additions & 2 deletions doc/getting-started-guide/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ release is guaranteed to work.
You can see the actual minimum tested versions:

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

.. _installation-instructions:

Expand Down
2 changes: 1 addition & 1 deletion doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://mybinder.org/v2/gh/pydata/xarray/master?urlpath=lab/tree/doc/examples/weather-data.ipynb>`_)
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>`_)
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
Expand Down

0 comments on commit eb906a4

Please sign in to comment.