Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to master branch from documentation #610

Merged
merged 3 commits into from
Oct 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ How to make a release
Before making a release, go through the following checklist:

- All pull requests for the release have been merged.
- The master branch passes all checks.
- The default branch passes all checks.

Releases are made by publishing a GitHub Release.
A draft release is being maintained based on merged pull requests.
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ Read the Docs
Releasing
---------

Releases are triggered by a version bump on the master branch.
Releases are triggered by a version bump on the default branch.
It is recommended to do this in a separate pull request:

1. Switch to a branch.
Expand Down
45 changes: 27 additions & 18 deletions docs/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,24 @@ your next steps are to create a Git repository and upload it to GitHub.

Change to the root directory of your new project,
initialize a Git repository, and
create a commit for the initial project structure:
create a commit for the initial project structure.
In the commands below,
replace ``<project>`` by the name of your project.

.. code:: console

$ cd <project>
$ git init
$ git add .
$ git commit

Use the following command to ensure your default branch is called ``main``,
the `new default for GitHub repositories`__:

$ git branch -M main

__ https://github.com/github/renaming

Create an empty repository on GitHub_,
using the project name you chose when you generated the project.

Expand All @@ -301,7 +311,7 @@ and ``<repository>`` by the name of your GitHub repository.
.. code:: console

$ git remote add origin git@github.com:<username>/<repository>.git
$ git push --set-upstream origin master
$ git push --set-upstream origin main

Now may be a good time to set up Continuous Integration for your repository.
Refer to the section :ref:`External services`
Expand Down Expand Up @@ -377,7 +387,7 @@ hosted on :ref:`Read the Docs <Read the Docs integration>`:
:widths: auto

====================== =======================================================
``index.rst`` Master document
``index.rst`` Main document
``contributing.rst`` Contributor Guide (via include)
``codeofconduct.rst`` Code of Conduct (via include)
``license.rst`` License (via include)
Expand Down Expand Up @@ -558,8 +568,7 @@ The top-level directory contains several stand-alone documentation files:
The documentation files in the ``docs`` directory are built using Sphinx_:

``index.rst``
This is the master document,
and serves as the main documentation page.
This is the main documentation page.
This file also defines the navigation menu,
with links to other documentation pages.
The *Changelog* menu entry
Expand Down Expand Up @@ -2064,7 +2073,7 @@ Follow these steps to set up Read the Docs for your repository:
__ https://docs.readthedocs.io/en/stable/webhooks.html

Read the Docs automatically starts building your documentation,
and will continue to do so when you push to master or make a release.
and will continue to do so when you push to the default branch or make a release.
Your documentation now has a public URL like this:

*https://<project>.readthedocs.io/*
Expand Down Expand Up @@ -2131,12 +2140,12 @@ The |HPC| defines the following workflows:
:class: hypermodern-table
:widths: auto

===================================================== ======================== ==================================== ===============
===================================================== ======================== ==================================== =====================
Workflow File Description Trigger
===================================================== ======================== ==================================== ===============
===================================================== ======================== ==================================== =====================
:ref:`Tests <The Tests workflow>` ``tests.yml`` Run the test suite with Nox_ Push, PR
:ref:`Release <The Release workflow>` ``release.yml`` Upload the package to PyPI_ Push (master)
===================================================== ======================== ==================================== ===============
:ref:`Release <The Release workflow>` ``release.yml`` Upload the package to PyPI_ Push (default branch)
===================================================== ======================== ==================================== =====================


Overview of GitHub Actions
Expand Down Expand Up @@ -2272,7 +2281,7 @@ The Release workflow
The Release workflow publishes your package on PyPI_, the Python Package Index.
The workflow also creates a version tag in the GitHub repository,
and publishes a GitHub Release using `Release Drafter`_.
The workflow is triggered on every push to the master branch.
The workflow is triggered on every push to the default branch.

Release steps only run if the package version was bumped.
If the package version did not change,
Expand Down Expand Up @@ -2373,7 +2382,7 @@ Create a branch for your changes:

.. code:: console

$ git switch --create my-topic-branch master
$ git switch --create my-topic-branch main

Create a series of small, single-purpose commits:

Expand Down Expand Up @@ -2421,18 +2430,18 @@ merge the pull request using the squash-merge strategy (recommended):

This triggers the following automated steps:

- :ref:`The test suite runs against the master branch <The Tests workflow>`.
- :ref:`The test suite runs against the main branch <The Tests workflow>`.
- :ref:`The draft GitHub Release is updated <The Release workflow>`.
- :ref:`A pre-release of the package is uploaded to TestPyPI <The Release workflow>`.
- `Read the Docs`_ rebuilds the *latest* version of the documentation.

In your local repository,
update the master branch:
update the main branch:

.. code:: console

$ git switch master
$ git pull origin master
$ git switch main
$ git pull origin main

Optionally, remove the merged topic branch
from the local repository as well:
Expand All @@ -2449,7 +2458,7 @@ The original commits remain accessible from the pull request
How to make a release
---------------------

Releases are triggered by a version bump on the master branch.
Releases are triggered by a version bump on the default branch.
It is recommended to do this in a separate pull request:

1. Switch to a branch.
Expand All @@ -2464,7 +2473,7 @@ The individual steps for bumping the version are:

.. code:: console

$ git switch --create release master
$ git switch --create release main
$ poetry version <version>
$ git commit --message="<project> <version>" pyproject.toml
$ git push origin release
Expand Down