Skip to content

Commit

Permalink
Merge branch 'main' into fix-ci-dev-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
weiji14 committed Aug 5, 2021
2 parents e6f6ed2 + 774d56f commit 7f9c12b
Show file tree
Hide file tree
Showing 23 changed files with 296 additions and 72 deletions.
4 changes: 2 additions & 2 deletions .github/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
########################################################################################
# Comment to be posted to on first time issues
newIssueWelcomeComment: |
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our [contributing guidelines](https://github.com/GenericMappingTools/pygmt/blob/master/CONTRIBUTING.md) and [code of conduct](https://github.com/GenericMappingTools/pygmt/blob/master/CODE_OF_CONDUCT.md).
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our [contributing guidelines](https://github.com/GenericMappingTools/pygmt/blob/main/CONTRIBUTING.md) and [code of conduct](https://github.com/GenericMappingTools/pygmt/blob/main/CODE_OF_CONDUCT.md).
# Comment to be posted to on PRs from first time contributors in your repository
newPRWelcomeComment: |
💖 Thanks for opening this pull request! 💖
Please make sure you read our [contributing guidelines](https://github.com/GenericMappingTools/pygmt/blob/master/CONTRIBUTING.md) and abide by our [code of conduct](https://github.com/GenericMappingTools/pygmt/blob/master/CODE_OF_CONDUCT.md).
Please make sure you read our [contributing guidelines](https://github.com/GenericMappingTools/pygmt/blob/main/CONTRIBUTING.md) and abide by our [code of conduct](https://github.com/GenericMappingTools/pygmt/blob/main/CODE_OF_CONDUCT.md).
A few things to keep in mind:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Docs

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
paths-ignore:
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
steps:
# Cancel previous runs that are not completed
- name: Cancel Previous Runs
uses: styfle/[email protected].0
uses: styfle/[email protected].1
with:
access_token: ${{ github.token }}

Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
uses: dawidd6/[email protected].0
uses: dawidd6/[email protected].1
with:
workflow: cache_data.yaml
workflow_conclusion: success
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:

- name: Push the built HTML to gh-pages
run: |
# Detect if this is a release or from the master branch
# Detect if this is a release or from the main branch
if [[ "${GITHUB_EVENT_NAME}" == "release" ]]; then
# Get the tag name without the "refs/tags/" part
version="${GITHUB_REF#refs/*/}"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Tests

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
paths-ignore:
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
steps:
# Cancel previous runs that are not completed
- name: Cancel Previous Runs
uses: styfle/[email protected].0
uses: styfle/[email protected].1
with:
access_token: ${{ github.token }}

Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
uses: dawidd6/[email protected].0
uses: dawidd6/[email protected].1
with:
workflow: cache_data.yaml
workflow_conclusion: success
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: GMT Dev Tests

on:
# push:
# branches: [ master ]
# branches: [ main ]
pull_request:
types: [synchronize, ready_for_review]
paths-ignore:
Expand All @@ -23,7 +23,7 @@ on:
- cron: '0 0 * * *'

jobs:
test_gmt_master:
test_gmt_dev:
name: ${{ matrix.os }} - GMT ${{ matrix.gmt_git_ref }}
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -39,7 +39,7 @@ jobs:
steps:
# Cancel previous runs that are not completed
- name: Cancel Previous Runs
uses: styfle/[email protected].0
uses: styfle/[email protected].1
with:
access_token: ${{ github.token }}

Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:

# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
uses: dawidd6/[email protected].0
uses: dawidd6/[email protected].1
with:
workflow: cache_data.yaml
workflow_conclusion: success
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dvc-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: |
echo -e "## Summary of changed images\n" > report.md
echo -e "This is an auto-generated report of images that have changed on the DVC remote\n" >> report.md
dvc diff --show-md master HEAD >> report.md
dvc diff --show-md main HEAD >> report.md
# Get just the filename of the added and modified image from the report
awk 'NF==5 && NR>=7 && $2=="added" {print $4}' report.md > added_files.txt
Expand All @@ -68,8 +68,8 @@ jobs:
cml-publish --title $line --md "$line" >> modified_images_new.md < /dev/null
done < modified_files.txt
# Pull images in the master branch from cloud storage
git checkout master
# Pull images in the main branch from cloud storage
git checkout main
dvc pull --remote upstream
# Upload old images
while IFS= read -r line; do
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

name: Publish to PyPI

# Only run for pushes to the master branch and releases.
# Only run for pushes to the main branch and releases.
on:
push:
branches:
- master
- main
release:
types:
- published
# Runs for pull requests should be disabled other than for testing purposes
#pull_request:
# branches:
# - master
# - main

jobs:
publish-pypi:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-baseline-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
shasum -a 256 baseline-images.zip
- name: Upload baseline image as a release asset
uses: shogo82148/[email protected].0
uses: shogo82148/[email protected].1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: baseline-images.zip
4 changes: 2 additions & 2 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/[email protected]
with:
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Style Checks

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
# Schedule daily tests
schedule:
Expand Down
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PyGMT
.. image:: https://github.com/GenericMappingTools/pygmt/workflows/GMT%20Dev%20Tests/badge.svg
:alt: GitHub Actions GMT Dev Tests status
:target: https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_tests_dev.yaml
.. image:: https://img.shields.io/codecov/c/github/GenericMappingTools/pygmt/master.svg?style=flat-square
.. image:: https://img.shields.io/codecov/c/github/GenericMappingTools/pygmt/main.svg?style=flat-square
:alt: Test coverage status
:target: https://codecov.io/gh/GenericMappingTools/pygmt
.. image:: https://img.shields.io/pypi/pyversions/pygmt.svg?style=flat-square
Expand Down Expand Up @@ -110,14 +110,14 @@ Code of conduct
+++++++++++++++

Please note that this project is released with a `Contributor Code of Conduct
<https://github.com/GenericMappingTools/pygmt/blob/master/CODE_OF_CONDUCT.md>`__.
<https://github.com/GenericMappingTools/pygmt/blob/main/CODE_OF_CONDUCT.md>`__.
By participating in this project you agree to abide by its terms.

Contributing Guidelines
+++++++++++++++++++++++

Please read our `Contributing Guide
<https://github.com/GenericMappingTools/pygmt/blob/master/CONTRIBUTING.md>`__ to
<https://github.com/GenericMappingTools/pygmt/blob/main/CONTRIBUTING.md>`__ to
see how you can help and give feedback.

Imposter syndrome disclaimer
Expand Down Expand Up @@ -148,7 +148,7 @@ Citing PyGMT
------------

PyGMT is a community developed project. See the
`AUTHORS.md <https://github.com/GenericMappingTools/pygmt/blob/master/AUTHORS.md>`__
`AUTHORS.md <https://github.com/GenericMappingTools/pygmt/blob/main/AUTHORS.md>`__
file on GitHub for a list of the people involved and a definition of the term "PyGMT
Developers". Feel free to cite our work in your research using the following BibTeX:

Expand Down Expand Up @@ -190,7 +190,7 @@ License

PyGMT is free software: you can redistribute it and/or modify it under the terms of
the **BSD 3-clause License**. A copy of this license is provided in
`LICENSE.txt <https://github.com/GenericMappingTools/pygmt/blob/master/LICENSE.txt>`__.
`LICENSE.txt <https://github.com/GenericMappingTools/pygmt/blob/main/LICENSE.txt>`__.


Support
Expand Down Expand Up @@ -218,7 +218,7 @@ Other Python wrappers for GMT:
Documentation for other versions
--------------------------------

* `Development <https://www.pygmt.org/dev>`__ (reflects the *master* branch on
* `Development <https://www.pygmt.org/dev>`__ (reflects the *main* branch on
GitHub)
* `Latest release <https://www.pygmt.org/latest>`__
* `v0.4.0 <https://www.pygmt.org/v0.4.0>`__
Expand Down
2 changes: 1 addition & 1 deletion doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


{% block sidebartitle %}
<a href="{{ pathto(master_doc) }}"><h2 class="sidebar-title">{{ project }}</h2></a>
<a href="{{ pathto(root_doc) }}"><h2 class="sidebar-title">{{ project }}</h2></a>

{% if theme_display_version %}
{%- set nav_version = version %}
Expand Down
8 changes: 4 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
needs_sphinx = "1.8"
# The encoding of source files.
source_encoding = "utf-8-sig"
master_doc = "index"
root_doc = "index"

# General information about the project
year = datetime.date.today().year
Expand Down Expand Up @@ -164,11 +164,11 @@
"menu_links": [
(
'<i class="fa fa-gavel fa-fw"></i> Code of Conduct',
f"{repository_url}/blob/master/CODE_OF_CONDUCT.md",
f"{repository_url}/blob/main/CODE_OF_CONDUCT.md",
),
(
'<i class="fa fa-book fa-fw"></i> License',
f"{repository_url}/blob/master/LICENSE.txt",
f"{repository_url}/blob/main/LICENSE.txt",
),
(
'<i class="fa fa-comment fa-fw"></i> Contact',
Expand All @@ -187,6 +187,6 @@
zip(sphinx_gallery_conf["gallery_dirs"], sphinx_gallery_conf["examples_dirs"])
),
"github_repo": repository,
"github_version": "master",
"github_version": "main",
"commit": commit_link,
}
11 changes: 6 additions & 5 deletions doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The project is hosted at the

The goal is to maintain a diverse community that's pleasant for everyone.
**Please be considerate and respectful of others**. Everyone must abide by our
[Code of Conduct](https://github.com/GenericMappingTools/pygmt/blob/master/CODE_OF_CONDUCT.md)
[Code of Conduct](https://github.com/GenericMappingTools/pygmt/blob/main/CODE_OF_CONDUCT.md)
and we encourage all to read it carefully.

## Ways to Contribute
Expand Down Expand Up @@ -95,7 +95,7 @@ to make changes to our codebase. Every change made goes through a pull request,
our own, so that our
[continuous integration](https://en.wikipedia.org/wiki/Continuous_integration)
services have a chance to check that the code is up to standards and passes all
our tests. This way, the *master* branch is always stable.
our tests. This way, the *main* branch is always stable.

#### General Guidelines for Making a Pull Request (PR):

Expand Down Expand Up @@ -170,7 +170,7 @@ It will make your life a lot easier!

The repository includes a conda environment file `environment.yml` with the
specification for all development requirements to build and test the project.
See the [`environment.yml`](https://github.com/GenericMappingTools/pygmt/blob/master/environment.yml)
See the [`environment.yml`](https://github.com/GenericMappingTools/pygmt/blob/main/environment.yml)
file for the list of dependencies and the environment name (`pygmt`).
Once you have forked and cloned the repository to your local machine, you can
use this file to create an isolated environment on which you can work.
Expand All @@ -188,7 +188,8 @@ Before building and testing the project, you have to activate the environment
conda activate pygmt
```

We have a [`Makefile`](https://github.com/GenericMappingTools/pygmt/blob/master/Makefile)

We have a [`Makefile`](https://github.com/GenericMappingTools/pygmt/blob/main/Makefile)
that provides commands for installing, running the tests and coverage analysis,
running linters, etc. If you don't want to use `make`, open the `Makefile` and
copy the commands you want to run.
Expand Down Expand Up @@ -451,7 +452,7 @@ will comment on any pull requests as needed.
We also use [flake8](http://flake8.pycqa.org/en/latest/) and
[pylint](https://www.pylint.org/) to check the quality of the code and quickly catch
common errors.
The [`Makefile`](https://github.com/GenericMappingTools/pygmt/blob/master/Makefile)
The [`Makefile`](https://github.com/GenericMappingTools/pygmt/blob/main/Makefile)
contains rules for running both checks:

```bash
Expand Down
4 changes: 2 additions & 2 deletions doc/external_resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Below is a curated collection of external PyGMT resources.

*To add your contribution to this collection, follow [these instructions](https://github.com/GenericMappingTools/pygmt/blob/master/CONTRIBUTING.md#editing-the-documentation)
*To add your contribution to this collection, follow [these instructions](https://github.com/GenericMappingTools/pygmt/blob/main/CONTRIBUTING.md#editing-the-documentation)
to submit a pull request with your recommended addition to the
[External Resources file](https://github.com/GenericMappingTools/pygmt/blob/master/doc/external_resources.md).*
[External Resources file](https://github.com/GenericMappingTools/pygmt/blob/main/doc/external_resources.md).*

---

Expand Down
Loading

0 comments on commit 7f9c12b

Please sign in to comment.