Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GMTInvalidInput Error for Figure.coast #787

Merged
merged 11 commits into from
Jan 20, 2021

Conversation

willschlitzer
Copy link
Contributor

@willschlitzer willschlitzer commented Jan 3, 2021

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
Copy link
Member

seisman commented Jan 3, 2021

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
Contributor Author

@seisman Updated.

pygmt/base_plotting.py Outdated Show resolved Hide resolved
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
@willschlitzer
Copy link
Contributor Author

/format

pygmt/base_plotting.py Outdated Show resolved Hide resolved
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@seisman
Copy link
Member

seisman commented Jan 20, 2021

/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 <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
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