From bf8c439914af7169b0886f71a4e336ffed78174f Mon Sep 17 00:00:00 2001
From: Geoffrey Mo <geoffrey.mo@ligo.org>
Date: Tue, 12 Oct 2021 07:53:09 -0700
Subject: [PATCH] Rename references to master to main instead

---
 .gitlab-ci.yml                       |  4 ++--
 LICENSE.rst                          |  4 ++--
 README.rst                           |  4 ++--
 doc/conf.py                          | 12 ++++++------
 doc/contributing.rst                 |  6 +++---
 doc/deployment.rst                   | 16 ++++++++--------
 doc/htcondor.rst                     |  2 +-
 gwcelery/_version.py                 |  2 +-
 gwcelery/tasks/detchar.py            |  2 +-
 gwcelery/tests/test_tasks_detchar.py |  2 +-
 10 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8f58ecd62..198838ed4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -91,7 +91,7 @@ associate commits in Sentry:
   needs:
     - build
   only:
-    - master@emfollow/gwcelery
+    - main@emfollow/gwcelery
     - tags@emfollow/gwcelery
   image:
     name: getsentry/sentry-cli
@@ -136,7 +136,7 @@ pages:
       - public
     expire_in: 30 days
   only:
-    - master
+    - main
   needs:
     - test/poetry/python3.7
 
diff --git a/LICENSE.rst b/LICENSE.rst
index 407db3bf6..6b6e9e861 100644
--- a/LICENSE.rst
+++ b/LICENSE.rst
@@ -5,7 +5,7 @@ License
 The `GWCelery Logo`_ is a composite of `Celery2`_ by Tiia Monto and `Lorentzian
 Wormhole`_ by Kes47 from Wikimedia Commons (`CC BY-SA 3.0`_).
 
-.. _`GWCelery Logo`: https://git.ligo.org/emfollow/gwcelery/blob/master/doc/_static/logo.png
+.. _`GWCelery Logo`: https://git.ligo.org/emfollow/gwcelery/blob/main/doc/_static/logo.png
 .. _`Celery2`: https://commons.wikimedia.org/wiki/File:Celery2.png
 .. _`Lorentzian Wormhole`: https://commons.wikimedia.org/wiki/File:Lorentzian_Wormhole.svg
 .. _`CC BY-SA 3.0`: https://creativecommons.org/licenses/by-sa/3.0/legalcode
@@ -351,4 +351,4 @@ Wormhole`_ by Kes47 from Wikimedia Commons (`CC BY-SA 3.0`_).
     proprietary programs.  If your program is a subroutine library, you may
     consider it more useful to permit linking proprietary applications with the
     library.  If this is what you want to do, use the GNU Lesser General
-    Public License instead of this License.
\ No newline at end of file
+    Public License instead of this License.
diff --git a/README.rst b/README.rst
index 771ce7ece..57d9506d6 100644
--- a/README.rst
+++ b/README.rst
@@ -17,8 +17,8 @@ Features
 - `Easy installation with pip <https://gwcelery.readthedocs.io/en/latest/quickstart.html>`_
 - Lightning fast distributed task queue powered by
   `Celery <http://celeryproject.org>`_ and `Redis <https://redis.io>`_
-- Tasks are defined by `small, self-contained Python functions <https://git.ligo.org/emfollow/gwcelery/tree/master/gwcelery/tasks>`_
-- `Lightweight test suite <https://git.ligo.org/emfollow/gwcelery/tree/master/gwcelery/tests>`_ using mocks of external services
+- Tasks are defined by `small, self-contained Python functions <https://git.ligo.org/emfollow/gwcelery/tree/main/gwcelery/tasks>`_
+- `Lightweight test suite <https://git.ligo.org/emfollow/gwcelery/tree/main/gwcelery/tests>`_ using mocks of external services
 - `Continuous integration <https://git.ligo.org/emfollow/gwcelery/pipelines>`_
 - `One environment variable to switch from playground to production GraceDB server <https://gwcelery.readthedocs.io/en/latest/configuration.html>`_
 - `Browser-based monitoring console <https://gwcelery.readthedocs.io/en/latest/monitoring.html>`_
diff --git a/doc/conf.py b/doc/conf.py
index 7649f720a..2449a5fdb 100755
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -62,8 +62,8 @@ templates_path = ['_templates']
 source_suffix = ['.rst']
 source_parsers = {}
 
-# The master toctree document.
-master_doc = 'index'
+# The main toctree document.
+main_doc = 'index'
 
 # General information about the project.
 metadata = pep517.meta.load(parent_path).metadata
@@ -175,7 +175,7 @@ latex_elements = {
 # (source start file, target name, title,
 #  author, documentclass [howto, manual, or own class]).
 latex_documents = [
-    (master_doc, project + '.tex', 'GWCelery Documentation',
+    (main_doc, project + '.tex', 'GWCelery Documentation',
      author, 'manual'),
 ]
 
@@ -185,7 +185,7 @@ latex_documents = [
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
 man_pages = [
-    (master_doc, project.lower(), project + ' Documentation',
+    (main_doc, project.lower(), project + ' Documentation',
      [author], 1)
 ]
 
@@ -196,7 +196,7 @@ man_pages = [
 # (source start file, target name, title, author,
 #  dir menu entry, description, category)
 texinfo_documents = [
-    (master_doc, project, project + ' Documentation',
+    (main_doc, project, project + ' Documentation',
      author, project, 'One line description of project.',
      'Miscellaneous'),
 ]
@@ -215,7 +215,7 @@ intersphinx_mapping = {
     'htcondor': ('https://htcondor.readthedocs.io/en/latest/', None),
     'gwpy': ('https://gwpy.github.io/docs/stable/', None),
     'ligo.skymap': ('https://lscsoft.docs.ligo.org/ligo.skymap/', None),
-    'requests': ('https://requests.readthedocs.io/en/master/', None),
+    'requests': ('https://requests.readthedocs.io/en/main/', None),
     'twisted': ('https://twistedmatrix.com/documents/current/api/', None),
     'userguide': ('https://emfollow.docs.ligo.org/userguide/', None)
 }
diff --git a/doc/contributing.rst b/doc/contributing.rst
index 16cb87b46..a0b5f946c 100644
--- a/doc/contributing.rst
+++ b/doc/contributing.rst
@@ -74,9 +74,9 @@ Guidelines for tasks
        in our deployment. If you make changes to requirements.txt, then run
        ``poetry update`` and commit the changes to `poetry.lock`_.
 
-.. _`requirements.txt`: https://git.ligo.org/emfollow/gwcelery/blob/master/requirements.txt
-.. _`doc/conf.py`: https://git.ligo.org/emfollow/gwcelery/blob/master/doc/conf.py
-.. _`poetry.lock`: https://git.ligo.org/emfollow/gwcelery/blob/master/poetry.lock
+.. _`requirements.txt`: https://git.ligo.org/emfollow/gwcelery/blob/main/requirements.txt
+.. _`doc/conf.py`: https://git.ligo.org/emfollow/gwcelery/blob/main/doc/conf.py
+.. _`poetry.lock`: https://git.ligo.org/emfollow/gwcelery/blob/main/poetry.lock
 .. _`pip`: https://pip.pypa.io/
 .. _`poetry`: https://python-poetry.org/
 
diff --git a/doc/deployment.rst b/doc/deployment.rst
index e78476965..583775397 100644
--- a/doc/deployment.rst
+++ b/doc/deployment.rst
@@ -15,7 +15,7 @@ There are two instances of GWCelery that are running on the LIGO-Caltech
 computing cluster and that are managed in this manner:
 
 *   **Playground**: The playground instance is re-deployed *on every push to
-    master that passes the unit tests*. It uses the
+    main that passes the unit tests*. It uses the
     :mod:`gwcelery.conf.playground` configuration preset.
 
 *   **Production**: The production instance is re-deployed *only when manually
@@ -41,7 +41,7 @@ release is described below.
 Making a new release
 --------------------
 
-We always prepare releases from the tip of the ``master`` branch. GitLab is
+We always prepare releases from the tip of the ``main`` branch. GitLab is
 configured through the project's `.gitlab-ci.yml`_ file to automatically build
 and push any tagged release to the `Python Package Index`_ (PyPI). Follow these
 steps when issuing a release in order to maintain a consistent and orderly
@@ -50,10 +50,10 @@ change log.
 1.  **Check the pipeline status.** Before you begin, first make sure that the
     unit tests, documentation, and packaging jobs are passing. Consult the
     project's `GitLab pipeline status`_ to make sure that all of the continuous
-    integration jobs are passing on ``master``.
+    integration jobs are passing on ``main``.
 
     If necessary, fix any bugs that are preventing the pipeline from passing,
-    push the changes to master, and repeat until all jobs pass.
+    push the changes to main, and repeat until all jobs pass.
 
 2.  **Update the change log.** The first subsection of the change log file,
     `CHANGES.rst`_, should have the title :samp:`{MAJOR.MINOR.PATCH}
@@ -70,7 +70,7 @@ change log.
     least the minor version number at the start of a new LSC/Virgo engineering
     or observing run.
 
-    Commit and push any corrections to CHANGES.rst to ``master``.
+    Commit and push any corrections to CHANGES.rst to ``main``.
 
 3.  **Complete the acceptance tests.** Our acceptance tests
     consist of a manual checklist for verifying that the pipeline satisfies
@@ -129,12 +129,12 @@ change log.
        :alt: Screen shot of deployment options
 
 .. _`Environments`: https://git.ligo.org/emfollow/gwcelery/environments
-.. _`.gitlab-ci.yml`: https://git.ligo.org/emfollow/gwcelery/blob/master/.gitlab-ci.yml
+.. _`.gitlab-ci.yml`: https://git.ligo.org/emfollow/gwcelery/blob/main/.gitlab-ci.yml
 .. _`poetry`: https://python-poetry.org/
 .. _`Python Package Index`: https://pypi.org
 .. _`GitLab pipeline status`: https://git.ligo.org/emfollow/gwcelery/pipelines
-.. _`CHANGES.rst`: https://git.ligo.org/emfollow/gwcelery/blob/master/CHANGES.rst
+.. _`CHANGES.rst`: https://git.ligo.org/emfollow/gwcelery/blob/main/CHANGES.rst
 .. _`SemVer`: https://semver.org
 .. _`issue template`: https://docs.gitlab.com/ee/user/project/description_templates.html
-.. _`.gitlab/issue_templates`: https://git.ligo.org/emfollow/gwcelery/tree/master/.gitlab/issue_templates
+.. _`.gitlab/issue_templates`: https://git.ligo.org/emfollow/gwcelery/tree/main/.gitlab/issue_templates
 .. _`new issue`: https://git.ligo.org/emfollow/gwcelery/issues/new
diff --git a/doc/htcondor.rst b/doc/htcondor.rst
index 09b070e98..b1c09ac65 100644
--- a/doc/htcondor.rst
+++ b/doc/htcondor.rst
@@ -34,7 +34,7 @@ rebooted, because the jobs will persist in the HTCondor queue.
 
 
 .. _HTCondor: https://research.cs.wisc.edu/htcondor/
-.. _gwcelery.sub: https://git.ligo.org/emfollow/gwcelery/blob/master/gwcelery/data/gwcelery.sub
+.. _gwcelery.sub: https://git.ligo.org/emfollow/gwcelery/blob/main/gwcelery/data/gwcelery.sub
 
 Shortcuts
 ---------
diff --git a/gwcelery/_version.py b/gwcelery/_version.py
index 60c2f0fd4..5e9ee646c 100644
--- a/gwcelery/_version.py
+++ b/gwcelery/_version.py
@@ -189,7 +189,7 @@ def git_versions_from_keywords(keywords, tag_prefix, verbose):
         # refs/heads/ and refs/tags/ prefixes that would let us distinguish
         # between branches and tags. By ignoring refnames without digits, we
         # filter out many common branch names like "release" and
-        # "stabilization", as well as "HEAD" and "master".
+        # "stabilization", as well as "HEAD" and "main".
         tags = set([r for r in refs if re.search(r'\d', r)])
         if verbose:
             print("discarding '%s', no digits" % ",".join(refs - tags))
diff --git a/gwcelery/tasks/detchar.py b/gwcelery/tasks/detchar.py
index f39d3017b..adc5caf66 100644
--- a/gwcelery/tasks/detchar.py
+++ b/gwcelery/tasks/detchar.py
@@ -238,7 +238,7 @@ def dqr_json(state, summary):
         },
         {
             "href":
-            "https://git.ligo.org/emfollow/gwcelery/blob/master/gwcelery/tasks/detchar.py",  # noqa
+            "https://git.ligo.org/emfollow/gwcelery/blob/main/gwcelery/tasks/detchar.py",  # noqa
             "innerHTML": "a link to the source code in the gwcelery repo"
         }
     ]
diff --git a/gwcelery/tests/test_tasks_detchar.py b/gwcelery/tests/test_tasks_detchar.py
index 54337bed2..cf91743a5 100644
--- a/gwcelery/tests/test_tasks_detchar.py
+++ b/gwcelery/tests/test_tasks_detchar.py
@@ -149,7 +149,7 @@ def test_dqr_json(mock_time, mock_host, mock_user):
             },
             {
                 "href":
-                "https://git.ligo.org/emfollow/gwcelery/blob/master/gwcelery/tasks/detchar.py",  # noqa
+                "https://git.ligo.org/emfollow/gwcelery/blob/main/gwcelery/tasks/detchar.py",  # noqa
                 "innerHTML": "a link to the source code in the gwcelery repo"
             }
         ]),
-- 
GitLab