Skip to content

Add GMTInvalidInput Error for Figure.coast - #787

Merged
seisman merged 11 commits into
GenericMappingTools:masterfrom
willschlitzer:coast-invalid-input
Jan 20, 2021
Merged

seisman merged 11 commits into
GenericMappingTools:masterfrom
willschlitzer:coast-invalid-input

Conversation

@willschlitzer

@willschlitzer willschlitzer commented Jan 3, 2021 •

Copy link
Copy Markdown
Contributor

Currently, Figure.coast returns a GMTCLibError if the required arguments are not included. The error lists the GMT argument names instead of the PyGMT argument names. I added an if statement that will raise a GMTInvalidInput Error if the conditions aren't met and a test.

I left C and Q as is because they do not have an alias on the PyGMT master branch yet.

…usly returned a GMtClibError that specified GMT arguments; added GMTInvalidInput to use PyGMT arguments
@willschlitzer
willschlitzer marked this pull request as ready for review January 3, 2021 11:43
@willschlitzer willschlitzer added the maintenance Boring but important stuff for the core devs label Jan 3, 2021
@willschlitzer willschlitzer added this to the 0.3.0 milestone Jan 3, 2021
@seisman

seisman commented Jan 3, 2021

Copy link
Copy Markdown
Member

It seems there is a trailing whitespace near Line 154. Please fix it manually.

pygmt/base_plotting.py:154:71: W291 trailing whitespace

@willschlitzer

Copy link
Copy Markdown
Contributor Author

@seisman Updated.

Comment thread pygmt/base_plotting.py Resolved
@willschlitzer

Copy link
Copy Markdown
Contributor Author

/format

Comment thread pygmt/base_plotting.py Resolved
Co-authored-by: Dongdong Tian <[email protected]>
@seisman

seisman commented Jan 20, 2021

Copy link
Copy Markdown
Member

/format

@seisman
seisman merged commit 9a5858f into GenericMappingTools:master Jan 20, 2021
@willschlitzer
willschlitzer deleted the coast-invalid-input branch January 21, 2021 09:14
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
* Add error raising to coast function in base_plotting.py. Error previously returned a GMtClibError that specified GMT arguments; added GMTInvalidInput to use PyGMT arguments
* Add test for updated error in test_coast.py

Co-authored-by: Wei Ji <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>

This branch was previously deployed

1 inactive deployment
Preview — ed488a56 Deployed Jan 20, 2021 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants