Skip to content

Commit

Permalink
CI/DOC: replace master -> main branch (#45336)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored Jan 13, 2022
1 parent ad19057 commit 50ac498
Show file tree
Hide file tree
Showing 44 changed files with 99 additions and 99 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body:
[latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
required: true
- label: >
I have confirmed this bug exists on the master branch of pandas.
I have confirmed this bug exists on the main branch of pandas.
- type: textarea
id: example
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation_improvement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body:
options:
- label: >
I have checked that the issue still exists on the latest versions of the docs
on `master` [here](https://pandas.pydata.org/docs/dev/)
on `main` [here](https://pandas.pydata.org/docs/dev/)
required: true
- type: textarea
id: location
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/performance_issue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body:
[latest version](https://pandas.pydata.org/docs/whatsnew/index.html) of pandas.
required: true
- label: >
I have confirmed this issue exists on the master branch of pandas.
I have confirmed this issue exists on the main branch of pandas.
- type: textarea
id: example
attributes:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/asv-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ jobs:
git remote add upstream https://github.com/pandas-dev/pandas.git
git fetch upstream
asv machine --yes
asv continuous -f 1.1 -b $REGEX upstream/master HEAD
asv continuous -f 1.1 -b $REGEX upstream/main HEAD
echo 'BENCH_OUTPUT<<EOF' >> $GITHUB_ENV
asv compare -f 1.1 upstream/master HEAD >> $GITHUB_ENV
asv compare -f 1.1 upstream/main HEAD >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
echo "REGEX=$REGEX" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Code Checks
on:
push:
branches:
- master
- main
- 1.4.x
pull_request:
branches:
- master
- main
- 1.4.x

env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install-pre-commit
run: python -m pip install --upgrade pre-commit
- name: Run pre-commit
run: pre-commit run --from-ref=origin/master --to-ref=HEAD --all-files || (exit 0)
run: pre-commit run --from-ref=origin/main --to-ref=HEAD --all-files || (exit 0)
- name: Commit results
run: |
git config user.name "$(git log -1 --pretty=format:%an)"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/datamanger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Data Manager
on:
push:
branches:
- master
- main
- 1.4.x
pull_request:
branches:
- master
- main
- 1.4.x

env:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docbuild-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Doc Build and Upload
on:
push:
branches:
- master
- main
- 1.4.x
pull_request:
branches:
- master
- main
- 1.4.x

env:
Expand Down Expand Up @@ -53,18 +53,18 @@ jobs:
echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master'}}
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}}

- name: Copy cheatsheets into site directory
run: cp doc/cheatsheet/Pandas_Cheat_Sheet* web/build/

- name: Upload web
run: rsync -az --delete --exclude='pandas-docs' --exclude='docs' web/build/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master'}}
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}}

- name: Upload dev docs
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/master'}}
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}}

- name: Move docs into site directory
run: mv doc/build/html web/build/docs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Posix
on:
push:
branches:
- master
- main
- 1.4.x
pull_request:
branches:
- master
- main
- 1.4.x
paths-ignore:
- "doc/**"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Python Dev
on:
push:
branches:
- master
- main
- 1.4.x
pull_request:
branches:
- master
- main
- 1.4.x
paths-ignore:
- "doc/**"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: sdist
on:
push:
branches:
- master
- main
- 1.4.x
pull_request:
branches:
- master
- main
- 1.4.x
paths-ignore:
- "doc/**"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN mkdir "$pandas_home" \
&& git clone "https://github.com/$gh_username/pandas.git" "$pandas_home" \
&& cd "$pandas_home" \
&& git remote add upstream "https://github.com/pandas-dev/pandas.git" \
&& git pull upstream master
&& git pull upstream main

# Because it is surprisingly difficult to activate a conda environment inside a DockerFile
# (from personal experience and per https://github.com/ContinuumIO/docker-images/issues/89),
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build: clean_pyc
python setup.py build_ext

lint-diff:
git diff upstream/master --name-only -- "*.py" | xargs flake8
git diff upstream/main --name-only -- "*.py" | xargs flake8

black:
black .
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
[![Conda Latest Release](https://anaconda.org/conda-forge/pandas/badges/version.svg)](https://anaconda.org/anaconda/pandas/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3509134.svg)](https://doi.org/10.5281/zenodo.3509134)
[![Package Status](https://img.shields.io/pypi/status/pandas.svg)](https://pypi.org/project/pandas/)
[![License](https://img.shields.io/pypi/l/pandas.svg)](https://github.com/pandas-dev/pandas/blob/master/LICENSE)
[![Azure Build Status](https://dev.azure.com/pandas-dev/pandas/_apis/build/status/pandas-dev.pandas?branch=master)](https://dev.azure.com/pandas-dev/pandas/_build/latest?definitionId=1&branch=master)
[![Coverage](https://codecov.io/github/pandas-dev/pandas/coverage.svg?branch=master)](https://codecov.io/gh/pandas-dev/pandas)
[![License](https://img.shields.io/pypi/l/pandas.svg)](https://github.com/pandas-dev/pandas/blob/main/LICENSE)
[![Azure Build Status](https://dev.azure.com/pandas-dev/pandas/_apis/build/status/pandas-dev.pandas?branch=main)](https://dev.azure.com/pandas-dev/pandas/_build/latest?definitionId=1&branch=main)
[![Coverage](https://codecov.io/github/pandas-dev/pandas/coverage.svg?branch=main)](https://codecov.io/gh/pandas-dev/pandas)
[![Downloads](https://static.pepy.tech/personalized-badge/pandas?period=month&units=international_system&left_color=black&right_color=orange&left_text=PyPI%20downloads%20per%20month)](https://pepy.tech/project/pandas)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pydata/pandas)
[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](https://numfocus.org)
Expand Down Expand Up @@ -170,4 +170,4 @@ Or maybe through using pandas you have an idea of your own or are looking for so

Feel free to ask questions on the [mailing list](https://groups.google.com/forum/?fromgroups#!forum/pydata) or on [Gitter](https://gitter.im/pydata/pandas).

As contributors and maintainers to this project, you are expected to abide by pandas' code of conduct. More information can be found at: [Contributor Code of Conduct](https://github.com/pandas-dev/pandas/blob/master/.github/CODE_OF_CONDUCT.md)
As contributors and maintainers to this project, you are expected to abide by pandas' code of conduct. More information can be found at: [Contributor Code of Conduct](https://github.com/pandas-dev/pandas/blob/main/.github/CODE_OF_CONDUCT.md)
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
trigger:
branches:
include:
- master
- main
- 1.4.x
paths:
exclude:
Expand All @@ -12,7 +12,7 @@ pr:
autoCancel: true
branches:
include:
- master
- main
- 1.4.x

variables:
Expand Down
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
codecov:
branch: master
branch: main
notify:
after_n_builds: 10
comment: false
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ def linkcode_resolve(domain, info):
fn = os.path.relpath(fn, start=os.path.dirname(pandas.__file__))

if "+" in pandas.__version__:
return f"https://github.com/pandas-dev/pandas/blob/master/pandas/{fn}{linespec}"
return f"https://github.com/pandas-dev/pandas/blob/main/pandas/{fn}{linespec}"
else:
return (
f"https://github.com/pandas-dev/pandas/blob/"
Expand Down
34 changes: 17 additions & 17 deletions doc/source/development/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ will allow others to reproduce the bug and provide insight into fixing. See
`this blogpost <https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports>`_
for tips on writing a good bug report.

Trying the bug-producing code out on the *master* branch is often a worthwhile exercise
Trying the bug-producing code out on the *main* branch is often a worthwhile exercise
to confirm 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 @@ -143,7 +143,7 @@ as the version number cannot be computed anymore.
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 for making your changes. For example::

git branch shiny-new-feature
Expand All @@ -158,14 +158,14 @@ changes in this branch specific to one bug or feature so it is clear
what the branch brings to pandas. You can have many shiny-new-features
and switch in between them using the git checkout command.

When creating this branch, make sure your master branch is up to date with
the latest upstream master version. To update your local master branch, you
When creating this branch, make sure your main branch is up to date with
the latest upstream main version. To update your local main branch, you
can do::

git checkout master
git pull upstream master --ff-only
git checkout main
git pull upstream main --ff-only

When you want to update the feature branch with changes in master after
When you want to update the feature branch with changes in main after
you created the branch, check the section on
:ref:`updating a PR <contributing.update-pr>`.

Expand Down Expand Up @@ -256,16 +256,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/pandas
#. 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 Down Expand Up @@ -294,14 +294,14 @@ This will automatically update your pull request with the latest code and restar
:any:`Continuous Integration <contributing.ci>` tests.

Another reason you might need to update your pull request is to solve conflicts
with changes that have been merged into the master branch since you opened your
with changes that have been merged into the main branch since you opened your
pull request.

To do this, you need to "merge upstream master" in your branch::
To do this, you need to "merge upstream main" in your branch::

git checkout shiny-new-feature
git fetch upstream
git merge upstream/master
git merge upstream/main

If there are no conflicts (or they could be fixed automatically), a file with a
default commit message will open, and you can simply save and quit this file.
Expand All @@ -313,7 +313,7 @@ Once the conflicts are merged and the files where the conflicts were solved are
added, you can run ``git commit`` to save those fixes.

If you have uncommitted changes at the moment you want to update the branch with
master, you will need to ``stash`` them prior to updating (see the
main, you will need to ``stash`` them prior to updating (see the
`stash docs <https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning>`__).
This will effectively store your changes and they can be reapplied after updating.

Expand Down Expand Up @@ -342,12 +342,12 @@ Delete your merged branch (optional)
------------------------------------

Once your feature branch is accepted into upstream, you'll probably want to get rid of
the branch. First, merge upstream master into your branch so git knows it is safe to
the branch. First, merge upstream main into your branch so git knows it is safe to
delete your branch::

git fetch upstream
git checkout master
git merge upstream/master
git checkout main
git merge upstream/main

Then you can do::

Expand Down
Loading

0 comments on commit 50ac498

Please sign in to comment.