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

Wrap inset #788

Merged
merged 81 commits into from
Feb 5, 2021
Merged

Conversation

willschlitzer
Copy link
Contributor

@willschlitzer willschlitzer commented Jan 3, 2021

Description of proposed changes

As discussed in #663, this is wrapping the GMT function inset. After some back and forth (and an attempt at Option 2), this PR goes with Option 1 to use a context manager and with statement to call inset.

Fixes #663

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Notes

  • You can write /format in the first line of a comment to lint the code automatically

@willschlitzer willschlitzer added the feature Brand new feature label Jan 3, 2021
@willschlitzer willschlitzer added this to the 0.3.0 milestone Jan 3, 2021
pygmt/base_plotting.py Outdated Show resolved Hide resolved
pygmt/src/inset.py Outdated Show resolved Hide resolved
pygmt/src/__init__.py Outdated Show resolved Hide resolved
pygmt/src/inset.py Outdated Show resolved Hide resolved
pygmt/src/inset.py Outdated Show resolved Hide resolved
pygmt/src/inset.py Show resolved Hide resolved
examples/tutorials/inset.py Show resolved Hide resolved
examples/gallery/plot/inset.py Outdated Show resolved Hide resolved
examples/tutorials/inset.py Outdated Show resolved Hide resolved
examples/tutorials/inset.py Outdated Show resolved Hide resolved
examples/tutorials/inset.py Outdated Show resolved Hide resolved
examples/tutorials/inset.py Outdated Show resolved Hide resolved
pygmt/tests/test_inset.py Outdated Show resolved Hide resolved
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fingers crossed that we can finalize this before the PyGMT meeting!

pygmt/src/inset.py Show resolved Hide resolved
pygmt/src/inset.py Outdated Show resolved Hide resolved
pygmt/src/inset.py Outdated Show resolved Hide resolved
examples/gallery/plot/inset.py Outdated Show resolved Hide resolved
examples/gallery/plot/inset.py Outdated Show resolved Hide resolved
examples/tutorials/inset.py Outdated Show resolved Hide resolved
@seisman
Copy link
Member

seisman commented Feb 5, 2021

The PR looks good to me after addressing the above minor comments.

Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phew, thanks for your patience @willschlitzer. Feel free to merge once the tests pass! 🚀

@willschlitzer willschlitzer merged commit 12adb41 into GenericMappingTools:master Feb 5, 2021
@willschlitzer willschlitzer deleted the wrap-inset branch February 6, 2021 09:45
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
*Wrap inset function to use a context manager
*Create src/inset.py and import inset function into base_plotting.py

Co-authored-by: Wei Ji <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Brand new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrapper for inset
3 participants