Skip to content

Commit 97e46dc

Browse files
Merge branch 'master' into parameters-histogram
2 parents 9fb74ae + e35bb47 commit 97e46dc

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

.github/workflows/ci_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ jobs:
141141

142142
# Upload coverage to Codecov
143143
- name: Upload coverage to Codecov
144-
uses: codecov/codecov-action@v1.4.1
144+
uses: codecov/codecov-action@v1.5.0
145145
with:
146146
file: ./coverage.xml # optional
147147
env_vars: OS,PYTHON,NUMPY

CONTRIBUTING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ General guidelines for pull requests (PRs):
219219
do.
220220
* Each pull request should consist of a **small** and logical collection of changes.
221221
* Larger changes should be broken down into smaller components and integrated
222-
separately.
222+
separately. For example, break the wrapping of aliases into multiple pull requests.
223223
* Bug fixes should be submitted in separate PRs.
224224
* Use underscores for all Python (*.py) files as per [PEP8](https://www.python.org/dev/peps/pep-0008/),
225225
not hyphens. Directory names should also use underscores instead of hyphens.
@@ -303,6 +303,12 @@ warn us and you can make a new commit with the formatted code.
303303
Even better, you can just write `/format` in the first line of any comment in a
304304
Pull Request to lint the code automatically.
305305

306+
When wrapping a new alias, use an underscore to separate words bridged by vowels
307+
(aeiou), such as `no_skip` and `z_only`. Do not use an underscore to separate
308+
words bridged only by consonants, such as `distcalc`, and `crossprofile`. This
309+
convention is not applied by the code checking tools, but the PyGMT maintainers
310+
will comment on any pull requests as needed.
311+
306312
We also use [flake8](http://flake8.pycqa.org/en/latest/) and
307313
[pylint](https://www.pylint.org/) to check the quality of the code and quickly catch
308314
common errors.

pygmt/src/meca.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ def data_format_code(convention, component="full"):
9898
@use_alias(
9999
R="region",
100100
J="projection",
101+
A="offset",
101102
B="frame",
102-
C="offset",
103103
N="no_clip",
104104
V="verbose",
105105
X="xshift",
@@ -334,8 +334,8 @@ def update_pointers(data_pointers):
334334
if arg is None:
335335
spec.append(0)
336336
else:
337-
if "C" not in kwargs:
338-
kwargs["C"] = True
337+
if "A" not in kwargs:
338+
kwargs["A"] = True
339339
spec.append(arg)
340340

341341
# or assemble the 2D array for the case of lists as values
@@ -389,8 +389,8 @@ def update_pointers(data_pointers):
389389
if arg is None:
390390
row.append(0)
391391
else:
392-
if "C" not in kwargs:
393-
kwargs["C"] = True
392+
if "A" not in kwargs:
393+
kwargs["A"] = True
394394
row.append(arg[index])
395395
spec_array.append(row)
396396
spec = spec_array
@@ -435,8 +435,8 @@ def update_pointers(data_pointers):
435435
if arg is None:
436436
row.append(0)
437437
else:
438-
if "C" not in kwargs:
439-
kwargs["C"] = True
438+
if "A" not in kwargs:
439+
kwargs["A"] = True
440440
row.append(arg[index])
441441
spec_array.append(row)
442442
spec = spec_array

0 commit comments

Comments
 (0)