summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/conf.py3
-rw-r--r--doc/source/dev/development_workflow.rst50
-rw-r--r--doc/source/dev/gitwash/development_setup.rst20
-rw-r--r--doc/source/dev/gitwash/dot2_dot3.rst10
-rw-r--r--doc/source/dev/gitwash/git_links.inc2
-rw-r--r--doc/source/dev/governance/governance.rst2
-rw-r--r--doc/source/dev/index.rst10
-rw-r--r--doc/source/dev/reviewer_guidelines.rst4
-rw-r--r--doc/source/docs/howto_build_docs.rst2
-rw-r--r--doc/source/user/how-to-how-to.rst2
10 files changed, 53 insertions, 52 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 7eb96eb22..dcf60ada9 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -94,6 +94,7 @@ templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
+# Will change to `root_doc` in Sphinx 4
master_doc = 'index'
# General substitutions.
@@ -442,7 +443,7 @@ def linkcode_resolve(domain, info):
linespec = ""
if 'dev' in numpy.__version__:
- return "https://github.com/numpy/numpy/blob/master/numpy/%s%s" % (
+ return "https://github.com/numpy/numpy/blob/main/numpy/%s%s" % (
fn, linespec)
else:
return "https://github.com/numpy/numpy/blob/v%s/numpy/%s%s" % (
diff --git a/doc/source/dev/development_workflow.rst b/doc/source/dev/development_workflow.rst
index 34535b2f5..8c56f6fb2 100644
--- a/doc/source/dev/development_workflow.rst
+++ b/doc/source/dev/development_workflow.rst
@@ -49,10 +49,10 @@ First, fetch new commits from the ``upstream`` repository:
git fetch upstream
-Then, create a new branch based on the master branch of the upstream
+Then, create a new branch based on the main branch of the upstream
repository::
- git checkout -b my-new-feature upstream/master
+ git checkout -b my-new-feature upstream/main
.. _editing-workflow:
@@ -147,7 +147,7 @@ In more detail
It may be the case that while you were working on your edits, new commits have
been added to ``upstream`` that affect your work. In this case, follow the
-:ref:`rebasing-on-master` section of this document to apply those changes to
+:ref:`rebasing-on-main` section of this document to apply those changes to
your branch.
.. _writing-the-commit-message:
@@ -226,10 +226,10 @@ mailing list may also be useful.
-.. _rebasing-on-master:
+.. _rebasing-on-main:
-Rebasing on master
-==================
+Rebasing on main
+================
This updates your feature branch with changes from the upstream `NumPy
github`_ repo. If you do not absolutely need to do this, try to avoid doing
@@ -244,8 +244,8 @@ Next, you need to update the feature branch::
git checkout my-new-feature
# make a backup in case you mess up
git branch tmp my-new-feature
- # rebase on upstream master branch
- git rebase upstream/master
+ # rebase on upstream main branch
+ git rebase upstream/main
If you have made changes to files that have changed also upstream,
this may generate merge conflicts that you need to resolve. See
@@ -258,7 +258,7 @@ Finally, remove the backup branch upon a successful rebase::
.. note::
- Rebasing on master is preferred over merging upstream back to your
+ Rebasing on main is preferred over merging upstream back to your
branch. Using ``git merge`` and ``git pull`` is discouraged when
working on feature branches.
@@ -325,7 +325,7 @@ Suppose that the commit history looks like this::
29001ed Add pre-nep for a couple of structured_array_extensions.
...
-and ``6ad92e5`` is the last commit in the ``master`` branch. Suppose we
+and ``6ad92e5`` is the last commit in the ``main`` branch. Suppose we
want to make the following changes:
* Rewrite the commit message for ``13d7934`` to something more sensible.
@@ -392,7 +392,7 @@ Deleting a branch on github_
::
- git checkout master
+ git checkout main
# delete branch locally
git branch -D my-unwanted-branch
# delete branch on github
@@ -451,25 +451,25 @@ Backporting
===========
Backporting is the process of copying new feature/fixes committed in
-`numpy/master`_ back to stable release branches. To do this you make a branch
+`numpy/main`_ back to stable release branches. To do this you make a branch
off the branch you are backporting to, cherry pick the commits you want from
-``numpy/master``, and then submit a pull request for the branch containing the
+``numpy/main``, and then submit a pull request for the branch containing the
backport.
1. First, you need to make the branch you will work on. This needs to be
- based on the older version of NumPy (not master)::
+ based on the older version of NumPy (not main)::
# Make a new branch based on numpy/maintenance/1.8.x,
# backport-3324 is our new name for the branch.
git checkout -b backport-3324 upstream/maintenance/1.8.x
-2. Now you need to apply the changes from master to this branch using
+2. Now you need to apply the changes from main to this branch using
`git cherry-pick`_::
# Update remote
git fetch upstream
# Check the commit log for commits to cherry pick
- git log upstream/master
+ git log upstream/main
# This pull request included commits aa7a047 to c098283 (inclusive)
# so you use the .. syntax (for a range of commits), the ^ makes the
# range inclusive.
@@ -480,7 +480,7 @@ backport.
3. You might run into some conflicts cherry picking here. These are
resolved the same way as merge/rebase conflicts. Except here you can
- use `git blame`_ to see the difference between master and the
+ use `git blame`_ to see the difference between main and the
backported branch to make sure nothing gets screwed up.
4. Push the new branch to your Github repository::
@@ -488,8 +488,8 @@ backport.
git push -u origin backport-3324
5. Finally make a pull request using Github. Make sure it is against the
- maintenance branch and not master, Github will usually suggest you
- make the pull request against master.
+ maintenance branch and not main, Github will usually suggest you
+ make the pull request against main.
.. _pushing-to-main:
@@ -499,7 +499,7 @@ Pushing changes to the main repo
*Requires commit rights to the main NumPy repo.*
When you have a set of "ready" changes in a feature branch ready for
-NumPy's ``master`` or ``maintenance`` branches, you can push
+NumPy's ``main`` or ``maintenance`` branches, you can push
them to ``upstream`` as follows:
1. First, merge or rebase on the target branch.
@@ -507,23 +507,23 @@ them to ``upstream`` as follows:
a) Only a few, unrelated commits then prefer rebasing::
git fetch upstream
- git rebase upstream/master
+ git rebase upstream/main
- See :ref:`rebasing-on-master`.
+ See :ref:`rebasing-on-main`.
b) If all of the commits are related, create a merge commit::
git fetch upstream
- git merge --no-ff upstream/master
+ git merge --no-ff upstream/main
2. Check that what you are going to push looks sensible::
- git log -p upstream/master..
+ git log -p upstream/main..
git log --oneline --graph
3. Push to upstream::
- git push upstream my-feature-branch:master
+ git push upstream my-feature-branch:main
.. note::
diff --git a/doc/source/dev/gitwash/development_setup.rst b/doc/source/dev/gitwash/development_setup.rst
index a7e9c28b9..badb73ca0 100644
--- a/doc/source/dev/gitwash/development_setup.rst
+++ b/doc/source/dev/gitwash/development_setup.rst
@@ -100,8 +100,8 @@ Make the local copy
#. Set up your repository so ``git pull`` pulls from ``upstream`` by
default: ::
- git config branch.master.remote upstream
- git config branch.master.merge refs/heads/master
+ git config branch.main.remote upstream
+ git config branch.main.merge refs/heads/main
******************************************************************************
Look it over
@@ -109,17 +109,17 @@ Look it over
#. The branches shown by ``git branch -a`` will include
- - the ``master`` branch you just cloned on your own machine
- - the ``master`` branch from your fork on GitHub, which git named
+ - the ``main`` branch you just cloned on your own machine
+ - the ``main`` branch from your fork on GitHub, which git named
``origin`` by default
- - the ``master`` branch on the the main NumPy repo, which you named
+ - the ``main`` branch on the the main NumPy repo, which you named
``upstream``.
::
- master
- remotes/origin/master
- remotes/upstream/master
+ main
+ remotes/origin/main
+ remotes/upstream/main
If ``upstream`` isn't there, it will be added after you access the
NumPy repo with a command like ``git fetch`` or ``git pull``.
@@ -139,8 +139,8 @@ Look it over
user.name=Your Name
remote.origin.url=git@github.com:your-github-id/numpy.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
- branch.master.remote=upstream
- branch.master.merge=refs/heads/master
+ branch.main.remote=upstream
+ branch.main.merge=refs/heads/main
remote.upstream.url=https://github.com/numpy/numpy.git
remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/*
diff --git a/doc/source/dev/gitwash/dot2_dot3.rst b/doc/source/dev/gitwash/dot2_dot3.rst
index 7759e2e60..30852b5ad 100644
--- a/doc/source/dev/gitwash/dot2_dot3.rst
+++ b/doc/source/dev/gitwash/dot2_dot3.rst
@@ -7,22 +7,22 @@
Thanks to Yarik Halchenko for this explanation.
Imagine a series of commits A, B, C, D... Imagine that there are two
-branches, *topic* and *master*. You branched *topic* off *master* when
-*master* was at commit 'E'. The graph of the commits looks like this::
+branches, *topic* and *main*. You branched *topic* off *main* when
+*main* was at commit 'E'. The graph of the commits looks like this::
A---B---C topic
/
- D---E---F---G master
+ D---E---F---G main
Then::
- git diff master..topic
+ git diff main..topic
will output the difference from G to C (i.e. with effects of F and G),
while::
- git diff master...topic
+ git diff main...topic
would output just differences in the topic branch (i.e. only A, B, and
C).
diff --git a/doc/source/dev/gitwash/git_links.inc b/doc/source/dev/gitwash/git_links.inc
index 8032dca41..8126cf9ac 100644
--- a/doc/source/dev/gitwash/git_links.inc
+++ b/doc/source/dev/gitwash/git_links.inc
@@ -47,7 +47,7 @@
.. _ipython git workflow: https://mail.python.org/pipermail/ipython-dev/2010-October/005632.html
.. _git parable: http://tom.preston-werner.com/2009/05/19/the-git-parable.html
.. _git foundation: http://matthew-brett.github.com/pydagogue/foundation.html
-.. _numpy/master: https://github.com/numpy/numpy
+.. _numpy/main: https://github.com/numpy/numpy
.. _git cherry-pick: https://www.kernel.org/pub/software/scm/git/docs/git-cherry-pick.html
.. _git blame: https://www.kernel.org/pub/software/scm/git/docs/git-blame.html
.. _this blog post: https://github.com/blog/612-introducing-github-compare-view
diff --git a/doc/source/dev/governance/governance.rst b/doc/source/dev/governance/governance.rst
index 9209f26b7..8c9cc0825 100644
--- a/doc/source/dev/governance/governance.rst
+++ b/doc/source/dev/governance/governance.rst
@@ -381,7 +381,7 @@ A list of current Institutional Partners is maintained at the page
Document history
================
-https://github.com/numpy/numpy/commits/master/doc/source/dev/governance/governance.rst
+https://github.com/numpy/numpy/commits/main/doc/source/dev/governance/governance.rst
Acknowledgements
================
diff --git a/doc/source/dev/index.rst b/doc/source/dev/index.rst
index bcd144d71..30d9742a0 100644
--- a/doc/source/dev/index.rst
+++ b/doc/source/dev/index.rst
@@ -78,8 +78,8 @@ Here's the short summary, complete TOC links are below:
* Pull the latest changes from upstream::
- git checkout master
- git pull upstream master
+ git checkout main
+ git pull upstream main
* Create a branch for the feature you want to work on. Since the
branch name will appear in the merge message, use a sensible name
@@ -173,13 +173,13 @@ Here's the short summary, complete TOC links are below:
For a more detailed discussion, read on and follow the links at the bottom of
this page.
-Divergence between ``upstream/master`` and your feature branch
---------------------------------------------------------------
+Divergence between ``upstream/main`` and your feature branch
+------------------------------------------------------------
If GitHub indicates that the branch of your Pull Request can no longer
be merged automatically, you have to incorporate changes that have been made
since you started into your branch. Our recommended way to do this is to
-:ref:`rebase on master<rebasing-on-master>`.
+:ref:`rebase on main <rebasing-on-main>`.
.. _guidelines:
diff --git a/doc/source/dev/reviewer_guidelines.rst b/doc/source/dev/reviewer_guidelines.rst
index 0b225b9b6..1d93bc136 100644
--- a/doc/source/dev/reviewer_guidelines.rst
+++ b/doc/source/dev/reviewer_guidelines.rst
@@ -74,8 +74,8 @@ For maintainers
- Make sure all automated CI tests pass before merging a PR, and that the
:ref:`documentation builds <building-docs>` without any errors.
-- In case of merge conflicts, ask the PR submitter to :ref:`rebase on master
- <rebasing-on-master>`.
+- In case of merge conflicts, ask the PR submitter to :ref:`rebase on main
+ <rebasing-on-main>`.
- For PRs that add new features or are in some way complex, wait at least a day
or two before merging it. That way, others get a chance to comment before the
code goes in. Consider adding it to the release notes.
diff --git a/doc/source/docs/howto_build_docs.rst b/doc/source/docs/howto_build_docs.rst
index 29912a5af..5db67b9b8 100644
--- a/doc/source/docs/howto_build_docs.rst
+++ b/doc/source/docs/howto_build_docs.rst
@@ -81,7 +81,7 @@ pdf format is also built with ``make dist``. See `HOWTO RELEASE`_ for details
on how to update https://numpy.org/doc.
.. _Matplotlib: https://matplotlib.org/
-.. _HOWTO RELEASE: https://github.com/numpy/numpy/blob/master/doc/HOWTO_RELEASE.rst.txt
+.. _HOWTO RELEASE: https://github.com/numpy/numpy/blob/main/doc/HOWTO_RELEASE.rst.txt
Sphinx extensions
-----------------
diff --git a/doc/source/user/how-to-how-to.rst b/doc/source/user/how-to-how-to.rst
index de8afc28a..a3be0729b 100644
--- a/doc/source/user/how-to-how-to.rst
+++ b/doc/source/user/how-to-how-to.rst
@@ -115,4 +115,4 @@ Is this page an example of a how-to?
******************************************************************************
Yes -- until the sections with question-mark headings; they explain rather
-than giving directions. In a how-to, those would be links. \ No newline at end of file
+than giving directions. In a how-to, those would be links.