From 84512bd4f88342e3b4ea4dc284eb476a2f9fda21 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 15 Oct 2021 18:10:02 -0400 Subject: [PATCH 1/3] MNT: rename master -> main in docs and CI --- .circleci/config.yml | 4 +-- .circleci/deploy-docs.sh | 4 +-- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/cibuildwheel.yml | 2 +- .github/workflows/pr_welcome.yml | 2 +- README.rst | 10 ++++---- doc/conf.py | 2 +- doc/devel/MEP/MEP19.rst | 2 +- doc/devel/MEP/template.rst | 2 +- doc/devel/coding_guide.rst | 14 +++++----- doc/devel/contributing.rst | 6 ++--- doc/devel/gitwash/development_workflow.rst | 30 +++++++++++----------- doc/devel/gitwash/dot2_dot3.rst | 10 ++++---- doc/devel/gitwash/git_links.inc | 2 +- doc/devel/gitwash/maintainer_workflow.rst | 14 +++++----- doc/devel/gitwash/patching.rst | 16 ++++++------ doc/devel/gitwash/set_up_fork.rst | 8 +++--- doc/devel/release_guide.rst | 8 +++--- doc/users/installing_source.rst | 2 +- lib/matplotlib/__init__.py | 2 +- tools/github_stats.py | 4 +-- tutorials/introductory/images.py | 2 +- 22 files changed, 74 insertions(+), 74 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 93335b41bbac..0ad1a9439f0f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ commands: git remote add upstream git://github.com/matplotlib/matplotlib.git fi git fetch upstream - if [[ "$CIRCLE_BRANCH" != "master" ]] && \ + if [[ "$CIRCLE_BRANCH" != "main" ]] && \ [[ "$CIRCLE_PR_NUMBER" != "" ]]; then echo "Merging ${CIRCLE_PR_NUMBER}" git pull --ff-only upstream "refs/pull/${CIRCLE_PR_NUMBER}/merge" @@ -126,7 +126,7 @@ commands: export SOURCE_DATE_EPOCH="$(git log -1 --format=%at $(git describe --abbrev=0))" # Set release mode only when deploying to devdocs. if [ "$CIRCLE_PROJECT_USERNAME" = "matplotlib" ] && \ - [ "$CIRCLE_BRANCH" = "master" ] && \ + [ "$CIRCLE_BRANCH" = "main" ] && \ [ "$CIRCLE_PR_NUMBER" = "" ]; then export RELEASE_TAG='-t release' fi diff --git a/.circleci/deploy-docs.sh b/.circleci/deploy-docs.sh index 83037d2561a4..8801d5fd073e 100755 --- a/.circleci/deploy-docs.sh +++ b/.circleci/deploy-docs.sh @@ -3,10 +3,10 @@ set -e if [ "$CIRCLE_PROJECT_USERNAME" != "matplotlib" ] || \ - [ "$CIRCLE_BRANCH" != "master" ] || \ + [ "$CIRCLE_BRANCH" != "main" ] || \ [[ "$CIRCLE_PULL_REQUEST" == https://github.com/matplotlib/matplotlib/pull/* ]]; then echo "Not uploading docs for ${CIRCLE_SHA1}"\ - "from non-master branch (${CIRCLE_BRANCH})"\ + "from non-main branch (${CIRCLE_BRANCH})"\ "or pull request (${CIRCLE_PULL_REQUEST})"\ "or non-Matplotlib org (${CIRCLE_PROJECT_USERNAME})." exit diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6c3479d74741..12c54977a428 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -21,7 +21,7 @@ consider the following points: - Help with git and github is available at https://matplotlib.org/devel/gitwash/development_workflow.html. -- Do not create the PR out of master, but out of a separate branch. +- Do not create the PR out of main, but out of a separate branch. - The PR title should summarize the changes, for example "Raise ValueError on non-numeric input to set_xlim". Avoid non-descriptive titles such as diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 6d64422adb66..eddf9dff97d8 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -3,7 +3,7 @@ name: Build CI wheels on: push: branches: - - master + - main - v[0-9]+.[0-9]+.x tags: - v* diff --git a/.github/workflows/pr_welcome.yml b/.github/workflows/pr_welcome.yml index 95a3976cd443..0d0187e713b3 100644 --- a/.github/workflows/pr_welcome.yml +++ b/.github/workflows/pr_welcome.yml @@ -32,4 +32,4 @@ jobs: We strive to be a welcoming and open project. Please follow our [Code of - Conduct](https://github.com/matplotlib/matplotlib/blob/master/CODE_OF_CONDUCT.md). + Conduct](https://github.com/matplotlib/matplotlib/blob/main/CODE_OF_CONDUCT.md). diff --git a/README.rst b/README.rst index a705ba3ab477..744ad078a046 100644 --- a/README.rst +++ b/README.rst @@ -7,14 +7,14 @@ .. |GitHubActions| image:: https://github.com/matplotlib/matplotlib/workflows/Tests/badge.svg .. _GitHubActions: https://github.com/matplotlib/matplotlib/actions?query=workflow%3ATests -.. |AzurePipelines| image:: https://dev.azure.com/matplotlib/matplotlib/_apis/build/status/matplotlib.matplotlib?branchName=master -.. _AzurePipelines: https://dev.azure.com/matplotlib/matplotlib/_build/latest?definitionId=1&branchName=master +.. |AzurePipelines| image:: https://dev.azure.com/matplotlib/matplotlib/_apis/build/status/matplotlib.matplotlib?branchName=main +.. _AzurePipelines: https://dev.azure.com/matplotlib/matplotlib/_build/latest?definitionId=1&branchName=main -.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/github/matplotlib/matplotlib?branch=master&svg=true +.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/github/matplotlib/matplotlib?branch=main&svg=true .. _AppVeyor: https://ci.appveyor.com/project/matplotlib/matplotlib -.. |Codecov| image:: https://codecov.io/github/matplotlib/matplotlib/badge.svg?branch=master&service=github -.. _Codecov: https://codecov.io/github/matplotlib/matplotlib?branch=master +.. |Codecov| image:: https://codecov.io/github/matplotlib/matplotlib/badge.svg?branch=main&service=github +.. _Codecov: https://codecov.io/github/matplotlib/matplotlib?branch=main .. |LGTM| image:: https://img.shields.io/lgtm/grade/python/github/matplotlib/matplotlib.svg?logo=lgtm&logoWidth=18 .. _LGTM: https://lgtm.com/projects/g/matplotlib/matplotlib diff --git a/doc/conf.py b/doc/conf.py index d8e554269e62..4c592bf8fe01 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -634,7 +634,7 @@ def linkcode_resolve(domain, info): return None version = parse(matplotlib.__version__) - tag = 'master' if version.is_devrelease else f'v{version.public}' + tag = 'main' if version.is_devrelease else f'v{version.public}' return ("https://github.com/matplotlib/matplotlib/blob" f"/{tag}/lib/{fn}{linespec}") else: diff --git a/doc/devel/MEP/MEP19.rst b/doc/devel/MEP/MEP19.rst index 05e34132249f..fd93ba619aed 100644 --- a/doc/devel/MEP/MEP19.rst +++ b/doc/devel/MEP/MEP19.rst @@ -67,7 +67,7 @@ great!]: **Documentation** -Documentation of master is now built by travis and uploaded to https://matplotlib.org/devdocs/index.html +Documentation of main is now built by travis and uploaded to https://matplotlib.org/devdocs/index.html @NelleV, I believe, generates the docs automatically and posts them on the web to chart MEP10 progress. diff --git a/doc/devel/MEP/template.rst b/doc/devel/MEP/template.rst index 81191fc44eeb..00bdbc87a95e 100644 --- a/doc/devel/MEP/template.rst +++ b/doc/devel/MEP/template.rst @@ -24,7 +24,7 @@ MEPs go through a number of phases in their lifetime: - **Progress**: Consensus was reached and implementation work has begun. -- **Completed**: The implementation has been merged into master. +- **Completed**: The implementation has been merged into main. - **Superseded**: This MEP has been abandoned in favor of another approach. diff --git a/doc/devel/coding_guide.rst b/doc/devel/coding_guide.rst index 68d8f9cf7d1f..b413457370ad 100644 --- a/doc/devel/coding_guide.rst +++ b/doc/devel/coding_guide.rst @@ -34,7 +34,7 @@ When making a PR, pay attention to: .. rst-class:: checklist -* :ref:`Target the master branch `. +* :ref:`Target the main branch `. * Adhere to the :ref:`coding_guidelines`. * Update the :ref:`documentation ` if necessary. * Aim at making the PR as "ready-to-go" as you can. This helps to speed up @@ -78,7 +78,7 @@ Organizational topics: .. rst-class:: checklist * Make sure all :ref:`automated tests ` pass. -* The PR should :ref:`target the master branch `. +* The PR should :ref:`target the main branch `. * Tag with descriptive :ref:`labels `. * Set the :ref:`milestone `. * Keep an eye on the :ref:`number of commits `. @@ -145,7 +145,7 @@ Milestones Setting a milestone does not imply or guarantee that a PR will be merged for that release, but if it were to be merged what release it would be in. - All of these PRs should target the master branch. The milestone tag triggers + All of these PRs should target the main branch. The milestone tag triggers an :ref:`automatic backport ` for milestones which have a corresponding branch. @@ -267,7 +267,7 @@ Current branches ---------------- The current active branches are -*master* +*main* The current development version. Future minor releases (*v3.N.0*) will be branched from this. Supports Python 3.7+. @@ -285,7 +285,7 @@ The current active branches are Branch selection for pull requests ---------------------------------- -Generally, all pull requests should target the master branch. +Generally, all pull requests should target the main branch. Other branches are fed through :ref:`automatic ` or :ref:`manual `. Directly @@ -344,7 +344,7 @@ When doing backports please copy the form used by meeseekdev, conflicts make note of them and how you resolved them in the commit message. -We do a backport from master to v2.2.x assuming: +We do a backport from main to v2.2.x assuming: * ``matplotlib`` is a read-only remote branch of the matplotlib/matplotlib repo @@ -376,4 +376,4 @@ and then continue the cherry pick: git cherry-pick --continue Use your discretion to push directly to upstream or to open a PR; be -sure to push or PR against the ``v2.2.x`` upstream branch, not ``master``! +sure to push or PR against the ``v2.2.x`` upstream branch, not ``main``! diff --git a/doc/devel/contributing.rst b/doc/devel/contributing.rst index 8e67e4393dba..c4f004dff07d 100644 --- a/doc/devel/contributing.rst +++ b/doc/devel/contributing.rst @@ -7,7 +7,7 @@ Contributing This project is a community effort, and everyone is welcome to contribute. Everyone within the community is expected to abide by our -`code of conduct `_. +`code of conduct `_. The project is hosted on https://github.com/matplotlib/matplotlib @@ -133,9 +133,9 @@ A brief overview is: 5. Create a branch to hold your changes:: - git checkout -b my-feature origin/master + git checkout -b my-feature origin/main - and start making changes. Never work in the ``master`` branch! + and start making changes. Never work in the ``main`` branch! 6. Work on this copy, on your computer, using Git to do the version control. When you're done editing e.g., ``lib/matplotlib/collections.py``, do:: diff --git a/doc/devel/gitwash/development_workflow.rst b/doc/devel/gitwash/development_workflow.rst index 7d6b6f0e70c3..7651bf040b79 100644 --- a/doc/devel/gitwash/development_workflow.rst +++ b/doc/devel/gitwash/development_workflow.rst @@ -13,10 +13,10 @@ git by following :ref:`configure-git`. Now you are ready for some real work. Workflow summary ================ -In what follows we'll refer to the upstream Matplotlib ``master`` branch, as +In what follows we'll refer to the upstream Matplotlib ``main`` branch, as "trunk". -* Don't use your ``master`` branch for anything. Consider deleting it. +* Don't use your ``main`` branch for anything. Consider deleting it. * When you are starting a new set of changes, fetch any changes from trunk, and start a new *feature branch* from that. * Make a new branch for each separable set of changes |emdash| "one task, one @@ -24,7 +24,7 @@ In what follows we'll refer to the upstream Matplotlib ``master`` branch, as * Name your branch for the purpose of the changes - e.g. ``bugfix-for-issue-14`` or ``refactor-database-code``. * If you can possibly avoid it, avoid merging trunk or any other branches into - your feature branch while you are working. + your feature branch while you are working. * If you do find yourself merging from trunk, consider :ref:`rebase-on-trunk` * Ask on the `Matplotlib mailing list`_ if you get stuck. * Ask for code review! @@ -35,11 +35,11 @@ what you've done, and why you did it. See `linux git workflow`_ and `ipython git workflow`_ for some explanation. -Consider deleting your master branch -==================================== +Consider deleting your main branch +================================== -It may sound strange, but deleting your own ``master`` branch can help reduce -confusion about which branch you are on. See `deleting master on github`_ for +It may sound strange, but deleting your own ``main`` branch can help reduce +confusion about which branch you are on. See `deleting main on github`_ for details. .. _update-mirror-trunk: @@ -55,8 +55,8 @@ From time to time you should fetch the upstream (trunk) changes from github:: This will pull down any commits you don't have, and set the remote branches to point to the right commit. For example, 'trunk' is the branch referred to by -(remote/branchname) ``upstream/master`` - and if there have been commits since -you last checked, ``upstream/master`` will change after you do the fetch. +(remote/branchname) ``upstream/main`` - and if there have been commits since +you last checked, ``upstream/main`` will change after you do the fetch. .. _make-feature-branch: @@ -79,7 +79,7 @@ what the changes in the branch are for. For example ``add-ability-to-fly``, or # Update the mirror of trunk git fetch upstream # Make new feature branch starting at current trunk - git branch my-new-feature upstream/master + git branch my-new-feature upstream/main git checkout my-new-feature Generally, you will want to keep your feature branches on your public github_ @@ -180,7 +180,7 @@ Delete a branch on github :: - git checkout master + git checkout main # delete branch locally git branch -D my-unwanted-branch # delete branch on github @@ -210,14 +210,14 @@ Now all those people can do:: git clone https://github.com/your-user-name/matplotlib.git -Remember that links starting with ``https`` or ``git@`` are read-write, and that +Remember that links starting with ``https`` or ``git@`` are read-write, and that ``git@`` uses the ssh protocol; links starting with ``git://`` are read-only. Your collaborators can then commit directly into that repo with the usual:: git commit -am 'ENH - much better code' - git push origin master # pushes directly into your repo + git push origin main # pushes directly into your repo Explore your repository ----------------------- @@ -284,12 +284,12 @@ To do a rebase on trunk:: # make a backup in case you mess up git branch tmp cool-feature # rebase cool-feature onto trunk - git rebase --onto upstream/master upstream/master cool-feature + git rebase --onto upstream/main upstream/main cool-feature In this situation, where you are already on branch ``cool-feature``, the last command can be written more succinctly as:: - git rebase upstream/master + git rebase upstream/main When all looks good you can delete your backup branch:: diff --git a/doc/devel/gitwash/dot2_dot3.rst b/doc/devel/gitwash/dot2_dot3.rst index 7759e2e60d68..30852b5ad387 100644 --- a/doc/devel/gitwash/dot2_dot3.rst +++ b/doc/devel/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/devel/gitwash/git_links.inc b/doc/devel/gitwash/git_links.inc index c26173367c9b..67ddc4dcb5a6 100644 --- a/doc/devel/gitwash/git_links.inc +++ b/doc/devel/gitwash/git_links.inc @@ -46,7 +46,7 @@ .. _linux git workflow: https://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html .. _git parable: http://tom.preston-werner.com/2009/05/19/the-git-parable.html .. _git foundation: https://matthew-brett.github.io/pydagogue/foundation.html -.. _deleting master on github: https://matthew-brett.github.io/pydagogue/gh_delete_master.html +.. _deleting main on github: https://matthew-brett.github.io/pydagogue/gh_delete_master.html .. _rebase without tears: https://matthew-brett.github.io/pydagogue/rebase_without_tears.html .. _resolving a merge: https://schacon.github.io/git/user-manual.html#resolving-a-merge .. _ipython git workflow: https://mail.python.org/pipermail/ipython-dev/2010-October/005632.html diff --git a/doc/devel/gitwash/maintainer_workflow.rst b/doc/devel/gitwash/maintainer_workflow.rst index 302f75241399..e618fbbc15b5 100644 --- a/doc/devel/gitwash/maintainer_workflow.rst +++ b/doc/devel/gitwash/maintainer_workflow.rst @@ -26,7 +26,7 @@ Integrating changes ******************* Let's say you have some changes that need to go into trunk -(``upstream-rw/master``). +(``upstream-rw/main``). The changes are in some branch that you are currently on. For example, you are looking at someone's changes like this:: @@ -47,7 +47,7 @@ If there are only a few commits, consider rebasing to upstream:: # Fetch upstream changes git fetch upstream-rw # rebase - git rebase upstream-rw/master + git rebase upstream-rw/main Remember that, if you do a rebase, and push that, you'll have to close any github pull requests manually, because github will not be able to detect the @@ -59,7 +59,7 @@ A long series of commits If there are a longer series of related commits, consider a merge instead:: git fetch upstream-rw - git merge --no-ff upstream-rw/master + git merge --no-ff upstream-rw/main The merge will be detected by github, and should close any related pull requests automatically. @@ -76,11 +76,11 @@ Now, in either case, you should check that the history is sensible and you have the right commits:: git log --oneline --graph - git log -p upstream-rw/master.. + git log -p upstream-rw/main.. The first line above just shows the history in a compact way, with a text representation of the history graph. The second line shows the log of commits -excluding those that can be reached from trunk (``upstream-rw/master``), and +excluding those that can be reached from trunk (``upstream-rw/main``), and including those that can be reached from current HEAD (implied with the ``..`` at the end). So, it shows the commits unique to this branch compared to trunk. The ``-p`` option shows the diff for these commits in patch form. @@ -90,9 +90,9 @@ Push to trunk :: - git push upstream-rw my-new-feature:master + git push upstream-rw my-new-feature:main -This pushes the ``my-new-feature`` branch in this repository to the ``master`` +This pushes the ``my-new-feature`` branch in this repository to the ``main`` branch in the ``upstream-rw`` repository. .. include:: links.inc diff --git a/doc/devel/gitwash/patching.rst b/doc/devel/gitwash/patching.rst index e7f852758477..881f73ed02dc 100644 --- a/doc/devel/gitwash/patching.rst +++ b/doc/devel/gitwash/patching.rst @@ -44,7 +44,7 @@ Overview # hack hack, hack git commit -am 'BF - added fix for Funny bug' # make the patch files - git format-patch -M -C master + git format-patch -M -C main Then, send the generated patch files to the `Matplotlib mailing list`_ |emdash| where we will thank you warmly. @@ -93,9 +93,9 @@ In detail git status #. Finally, make your commits into patches. You want all the - commits since you branched from the ``master`` branch:: + commits since you branched from the ``main`` branch:: - git format-patch -M -C master + git format-patch -M -C main You will now have several files named for the commits: @@ -107,9 +107,9 @@ In detail Send these files to the `Matplotlib mailing list`_. When you are done, to switch back to the main copy of the -code, just return to the ``master`` branch:: +code, just return to the ``main`` branch:: - git checkout master + git checkout main Moving from patching to development =================================== @@ -122,9 +122,9 @@ have. Fork the `Matplotlib`_ repository on github |emdash| :ref:`forking`. Then:: - # checkout and refresh master branch from main repo - git checkout master - git pull origin master + # checkout and refresh main branch from main repo + git checkout main + git pull origin main # rename pointer to main repository to 'upstream' git remote rename origin upstream # point your repo to default read / write to your fork on github diff --git a/doc/devel/gitwash/set_up_fork.rst b/doc/devel/gitwash/set_up_fork.rst index 6b7e0271c45b..41c0b1cb0667 100644 --- a/doc/devel/gitwash/set_up_fork.rst +++ b/doc/devel/gitwash/set_up_fork.rst @@ -31,11 +31,11 @@ Clone your fork .. code-block:: none - * master - remotes/origin/master + * main + remotes/origin/main - This tells you that you are currently on the ``master`` branch, and - that you also have a ``remote`` connection to ``origin/master``. + This tells you that you are currently on the ``main`` branch, and + that you also have a ``remote`` connection to ``origin/main``. What remote repository is ``remote/origin``? Try ``git remote -v`` to see the URLs for the remote. They will point to your github fork. diff --git a/doc/devel/release_guide.rst b/doc/devel/release_guide.rst index 423b2ba51b2c..9989f60e11f7 100644 --- a/doc/devel/release_guide.rst +++ b/doc/devel/release_guide.rst @@ -199,7 +199,7 @@ with the tag [#]_:: Finally, push the tag to GitHub:: - git push DANGER master v2.0.0 + git push DANGER main v2.0.0 Congratulations, the scariest part is done! @@ -352,12 +352,12 @@ which will build both the html and pdf version of the documentation. The built documentation exists in the `matplotlib.github.com `__ repository. -Pushing changes to master automatically updates the website. +Pushing changes to main automatically updates the website. The documentation is organized by version. At the root of the tree is always the documentation for the latest stable release. Under that, there are directories containing the documentation for older versions. The documentation -for current master is built on Circle CI and pushed to the `devdocs +for current main is built on Circle CI and pushed to the `devdocs `__ repository. These are available at `matplotlib.org/devdocs `__. @@ -382,7 +382,7 @@ the newly released version. Now commit and push everything to GitHub :: git add * git commit -a -m 'Updating docs for v2.0.0' - git push DANGER master + git push DANGER main Congratulations you have now done the third scariest part! diff --git a/doc/users/installing_source.rst b/doc/users/installing_source.rst index bf635a0fdffb..356558478a65 100644 --- a/doc/users/installing_source.rst +++ b/doc/users/installing_source.rst @@ -70,7 +70,7 @@ process. For example, which default backend to use, whether some of the optional libraries that Matplotlib ships with are installed, and so on. This file will be particularly useful to those packaging Matplotlib. -.. _mplsetup.cfg: https://raw.githubusercontent.com/matplotlib/matplotlib/master/mplsetup.cfg.template +.. _mplsetup.cfg: https://raw.githubusercontent.com/matplotlib/matplotlib/main/mplsetup.cfg.template If you are building your own Matplotlib wheels (or sdists) on Windows, note that any DLLs that you copy into the source tree will be packaged too. diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index 71afd3928d8c..6f146b719751 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -811,7 +811,7 @@ def _rc_params_in_file(fname, transform=lambda x: x, fail_on_error=False): else: # __version__ must be looked up as an attribute to trigger the # module-level __getattr__. - version = ('master' if '.post' in mpl.__version__ + version = ('main' if '.post' in mpl.__version__ else f'v{mpl.__version__}') _log.warning(""" Bad key %(key)s in file %(fname)s, line %(line_no)s (%(line)r) diff --git a/tools/github_stats.py b/tools/github_stats.py index 2d1fbc47e81a..f6e190324194 100755 --- a/tools/github_stats.py +++ b/tools/github_stats.py @@ -78,8 +78,8 @@ def issues_closed_since(period=timedelta(days=365), project="matplotlib/matplotl filtered = [ i for i in allclosed if _parse_datetime(i['closed_at']) > since ] if pulls: filtered = [ i for i in filtered if _parse_datetime(i['merged_at']) > since ] - # filter out PRs not against master (backports) - filtered = [ i for i in filtered if i['base']['ref'] == 'master' ] + # filter out PRs not against main (backports) + filtered = [ i for i in filtered if i['base']['ref'] == 'main' ] else: filtered = [ i for i in filtered if not is_pull_request(i) ] diff --git a/tutorials/introductory/images.py b/tutorials/introductory/images.py index 46a6de70ee69..02470a35bbe5 100644 --- a/tutorials/introductory/images.py +++ b/tutorials/introductory/images.py @@ -69,7 +69,7 @@ # on where you get your data, the other kinds of image that you'll most # likely encounter are RGBA images, which allow for transparency, or # single-channel grayscale (luminosity) images. Download `stinkbug.png -# `_ +# `_ # to your computer for the rest of this tutorial. # # And here we go... From c3a1713ad58ccba87bb395e96e211bbfe7b1e3c3 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Fri, 15 Oct 2021 18:11:21 -0400 Subject: [PATCH 2/3] MNT: remove a few un-needed usages of "master" --- lib/matplotlib/tests/test_axes.py | 8 ++++---- tutorials/toolkits/axes_grid.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 1b349b2a9c31..eaa699d6ee7b 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -416,8 +416,8 @@ def test_inverted_cla(): assert not ax.xaxis_inverted() assert ax.yaxis_inverted() - # 5. two shared axes. Inverting the master axis should invert the shared - # axes; clearing the master axis should bring axes in shared + # 5. two shared axes. Inverting the leader axis should invert the shared + # axes; clearing the leader axis should bring axes in shared # axes back to normal. ax0 = plt.subplot(211) ax1 = plt.subplot(212, sharey=ax0) @@ -427,7 +427,7 @@ def test_inverted_cla(): ax0.cla() assert not ax1.yaxis_inverted() ax1.cla() - # 6. clearing the nonmaster should not touch limits + # 6. clearing the nonleader should not touch limits ax0.imshow(img) ax1.plot(x, np.cos(x)) ax1.cla() @@ -507,7 +507,7 @@ def test_use_sticky_edges(): @check_figures_equal(extensions=["png"]) def test_sticky_shared_axes(fig_test, fig_ref): # Check that sticky edges work whether they are set in an axes that is a - # "master" in a share, or an axes that is a "follower". + # "leader" in a share, or an axes that is a "follower". Z = np.arange(15).reshape(3, 5) ax0 = fig_test.add_subplot(211) diff --git a/tutorials/toolkits/axes_grid.py b/tutorials/toolkits/axes_grid.py index c5417977b179..97c09c22a60c 100644 --- a/tutorials/toolkits/axes_grid.py +++ b/tutorials/toolkits/axes_grid.py @@ -76,8 +76,8 @@ `.AxesDivider.append_axes` can then be used to create a new axes on a given side ("left", "right", "top", "bottom") of the original axes. -colorbar whose height (or width) in sync with the master axes -------------------------------------------------------------- +colorbar whose height (or width) in sync with the main axes +----------------------------------------------------------- .. figure:: ../../gallery/axes_grid1/images/sphx_glr_simple_colorbar_001.png :target: ../../gallery/axes_grid1/simple_colorbar.html From 3fcb595c57fdef0bf46cc789f76e08db17705f12 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Tue, 19 Oct 2021 17:29:29 -0400 Subject: [PATCH 3/3] DOC: improve language Co-authored-by: Elliott Sales de Andrade --- lib/matplotlib/tests/test_axes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index eaa699d6ee7b..09d0dac49903 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -427,7 +427,7 @@ def test_inverted_cla(): ax0.cla() assert not ax1.yaxis_inverted() ax1.cla() - # 6. clearing the nonleader should not touch limits + # 6. clearing the follower should not touch limits ax0.imshow(img) ax1.plot(x, np.cos(x)) ax1.cla()