Skip to content

Commit

Permalink
Merge branch 'master' into check-links
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Feb 11, 2021
2 parents 00df234 + 394c847 commit ce62f80
Show file tree
Hide file tree
Showing 163 changed files with 5,150 additions and 2,935 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
name: Bug report
about: Report a problem/bug to help us improve
title: ''
labels: bug
assignees: ''

---

Expand Down
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: GMT Community Forum
url: https://forum.generic-mapping-tools.org/c/questions/pygmt-q-a
about: Please ask questions here or find answers to common problems.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
name: Feature request
about: Request the addition of a new feature/functionality
title: ''
labels: feature request
assignees: ''

---

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: PyGMT release checklist
about: Checklist for a new PyGMT release.
title: 'Release PyGMT x.x.x'
labels: 'maintenance'
title: Release PyGMT x.x.x
labels: maintenance
assignees: ''

---
Expand Down
8 changes: 6 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Fixes #
- [ ] Write detailed docstrings for all functions/methods.
- [ ] If adding new functionality, add an example to docstrings or tutorials.

**Notes**
**Slash Commands**

- You can write `/format` in the first line of a comment to lint the code automatically
You can write slash commands (`/command`) in the first line of a comment to perform
specific operations. Supported slash commands are:

- `/format`: automatically format and lint the code
- `/test-gmt-dev`: run full tests on the latest GMT development version
2 changes: 1 addition & 1 deletion .github/workflows/cache_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
gmt which -Ga @earth_relief_10m_p @earth_relief_10m_g \
@earth_relief_30m_p @earth_relief_30m_g \
@earth_relief_01d_p @earth_relief_01d_g \
@earth_relief_05m_g
@earth_relief_05m_p @earth_relief_05m_g
gmt which -Ga @ridge.txt @Table_5_11.txt @test.dat.nc \
@tut_bathy.nc @tut_quakes.ngdc @tut_ship.xyz \
@usgs_quakes_22.txt
Expand Down
38 changes: 6 additions & 32 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
push:
branches: [ master ]
pull_request:
paths-ignore:
- 'doc/**'
- '*.md'
- '*.json'
- 'README.rst'
- 'LICENSE.txt'
release:
types:
- published
Expand All @@ -15,38 +21,6 @@ on:
- cron: '0 0 * * *'

jobs:
style_check:
name: Style Checks
runs-on: ubuntu-latest

steps:
# Checkout current git repository
- name: Checkout
uses: actions/checkout@v2.3.1

# Setup Miniconda
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install packages
run: |
pip install black blackdoc flake8 pylint isort
sudo apt-get install dos2unix
- name: Formatting check (black and flake8)
run: make check

- name: Linting (pylint)
run: make lint

- name: Ensure files use UNIX line breaks and have 644 permission
run: |
find . -type f -not -path '*/\.git/*' -exec grep -Iq . {} \; -exec dos2unix --quiet {} \;
find . -type f -not -path '*/\.git/*' -exec grep -Iq . {} \; -exec chmod 644 {} \;
if [[ $(git ls-files -m) ]]; then git --no-pager diff HEAD; exit 1; fi
test:
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
Expand Down
44 changes: 41 additions & 3 deletions .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# This workflow installs PyGMT dependencies, builds documentation and runs tests on GMT latest
# This workflow installs PyGMT dependencies, builds documentation and runs tests on GMT dev version
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: GMT Latest Tests
name: GMT Dev Tests

on:
# push:
# branches: [ master ]
pull_request:
types: [review_requested, ready_for_review]
types: [ready_for_review]
paths-ignore:
- 'doc/**'
- '*.md'
- '*.json'
- 'README.rst'
- 'LICENSE.txt'
repository_dispatch:
types: [test-gmt-dev-command]
# Schedule daily tests
schedule:
- cron: '0 0 * * *'
Expand Down Expand Up @@ -36,10 +44,31 @@ jobs:
# Checkout current git repository
- name: Checkout
uses: actions/checkout@v2.3.4
if: github.event_name != 'repository_dispatch'
with:
# fecth all history so that setuptools-scm works
fetch-depth: 0

# Generate token from GenericMappingTools bot
- name: Generate token from GenericMappingTools bot
uses: tibdex/github-app-token@v1
if: github.event_name == 'repository_dispatch'
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

# Checkout the pull request branch
- name: Checkout
uses: actions/checkout@v2
if: github.event_name == 'repository_dispatch'
with:
token: ${{ steps.generate-token.outputs.token }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}
# fecth all history so that setuptools-scm works
fetch-depth: 0

# Setup Miniconda
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2.0.0
Expand Down Expand Up @@ -106,3 +135,12 @@ jobs:
with:
name: artifact-GMT-${{ matrix.gmt_git_ref }}-${{ runner.os }}
path: tmp-test-dir-with-unique-name

- name: Add reaction
uses: peter-evans/create-or-update-comment@v1
if: github.event_name == 'repository_dispatch'
with:
token: ${{ steps.generate-token.outputs.token }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reaction-type: hooray
2 changes: 1 addition & 1 deletion .github/workflows/format-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# Install formatting tools
- name: Install formatting tools
run: |
pip install black blackdoc flake8 isort
pip install black blackdoc docformatter flake8 isort
sudo apt-get install dos2unix
# Run "make format" and commit the change to the PR branch
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/slash-command-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ jobs:
token: ${{ steps.generate-token.outputs.token }}
commands: |
format
test-gmt-dev
issue-type: pull-request
permission: none
42 changes: 42 additions & 0 deletions .github/workflows/style_checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Style Checks

on:
push:
branches: [ master ]
pull_request:
# Schedule daily tests
schedule:
- cron: '0 0 * * *'

jobs:
style_check:
name: Style Checks
runs-on: ubuntu-latest

steps:
# Checkout current git repository
- name: Checkout
uses: actions/checkout@v2.3.4

# Setup Miniconda
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install packages
run: |
pip install black blackdoc docformatter flake8 pylint isort
sudo apt-get install dos2unix
- name: Formatting check (black, blackdoc, docformatter, flake8 and isort)
run: make check

- name: Linting (pylint)
run: make lint

- name: Ensure files use UNIX line breaks and have 644 permission
run: |
find . -type f -not -path '*/\.git/*' -exec grep -Iq . {} \; -exec dos2unix --quiet {} \;
find . -type f -not -path '*/\.git/*' -exec grep -Iq . {} \; -exec chmod 644 {} \;
if [[ $(git ls-files -m) ]]; then git --no-pager diff HEAD; exit 1; fi
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ indent-string=' '
max-line-length=100

# Maximum number of lines in a module.
max-module-lines=2000
max-module-lines=3000

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
Expand Down
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Manoa.
The following people have contributed code to the project (alphabetical by last name)
and are considered the "PyGMT Developers":

* [Michael Grund](https://github.com/michaelgrund)
* [Wei Ji Leong](https://github.com/weiji14)
* [Tyler Newton](http://www.tnewton.com/)
* [William Schlitzer](https://github.com/willschlitzer)
Expand Down
75 changes: 75 additions & 0 deletions AUTHORSHIP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Authorship guidelines for academic papers and software archives

First of all, we are deeply thankful to everyone who has helped make PyGMT
what it is today. Our goal for this document is to establish guidelines
for giving credit to contributors for their work.
To do so, we will attempt to define:

- Fair and diverse ways of providing recognition for contributors' efforts.
- Define _contributions_ in a broad way: writing code and/or documentation,
providing ideas, fostering the community, etc.

The following are the ways in which individuals who have contributed will be
recognized.

> **Note**: These policies are not set in stone and may be changed to
> accommodate the growth of the project or the preferences of the community.
## The `AUTHORS.md` file

Anyone who has contributed a pull request to the project is welcome to add
themselves to the `AUTHORS.md` file. This file lives in the repository and is
packaged with distributions. This is an optional process.

## Changelog for each release

Every time we make a release, everyone who has made a commit to the repository
since the previous release will be mentioned in the changelog entry. If their
full name is available on GitHub, we will use it. Otherwise, we will use the
GitHub handle. This is a way of saying "Thank you".

## Authorship on Zenodo archives of releases

Anyone who has contributed to the repository (i.e., appears on `git log`) will
be invited to be an author on the Zenodo archive of new releases.

To be included as an author, you *must* add the following to the `AUTHORS.md`
file of the repository:

1. Full name
2. Affiliation (if omitted, we will use "Unaffiliated")
3. ORCID (optional)

The order of authors will be defined by the number of commits to the repository
(`git shortlog -sne`). The order can also be changed on a case-by-case basis.

If you have contributed and do not wish to be included in Zenodo archives,
there are a few options:

1. Don't add yourself to `AUTHORS.md`
2. Remove yourself from `AUTHORS.md`
3. Indicate next to your name on `AUTHORS.md` that you do not wish to be
included with something like `(not included in Zenodo)`.

## Scientific publications (papers)

We aim to write academic papers for most of our software packages. Ideally, we
will publish updated papers for major changes or significant new components of the
package.

To be included as an author on the paper, you *must* satisfy the following
criteria:

1. Have made multiple and regular contributions to the repository, or the GMT repository, in numerous facets, such as wrapping functions, testing, and/or writing documentation.
2. Have made non-coding contributions, including project administration and decision making.
3. Have participated in the writing and reviewing of the paper.
2. Add your full name, affiliation, and (optionally) ORCID to the paper. These
can be submitted on pull requests to the corresponding paper repository.
3. Write and/or read and review the manuscript in a timely manner and provide
comments on the paper (even if it's just an "OK", but preferably more).

The order of authors will be defined by the number of commits made since the
previous major release that has an associated paper (`git shortlog
vX.0.0...HEAD -sne`). The order of any author who hasn't made any commits will
be decided by all authors. The order can also be changed on a case-by-case
basis.
Loading

0 comments on commit ce62f80

Please sign in to comment.