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

Figure.meca: Fix beachball offsetting for ndarray input (requires GMT>=6.5.0) #2576

Merged
merged 11 commits into from
Jul 8, 2023

Conversation

seisman
Copy link
Member

@seisman seisman commented Jun 14, 2023

Description of proposed changes

Changes in this PR:

  1. 96b5c51: Rename function data_format_code to convention_code and update docstrings
  2. 5e93de0: Add a new function convention_name which determine the convention name (e.g., "aki") from convention code (e.g., "a")
  3. 6de0907: Add a new function convention_params to return the list of focal parameters
  4. 7ae8816: Add a test for offsetting beachballs with ndarray input based on beachball offsetting doesn't work for pandas/dict/ndarray input #2016
  5. a87c0c5: Refactor the Figure.meca method to make it work with ndarray input.
  6. cc74814: Skip the new test for GMT<6.5, because the new test requires the upstream fix Do no free external trailing text strings gmt#7557.

Offsetting beachballs for ndarray input requires GMT>=6.5, due to an upstream bug fixed in GenericMappingTools/gmt#7557.

Fixes #2016

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 wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.
  • Use underscores (not hyphens) in names of Python files and directories.

Slash Commands

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

pygmt/src/meca.py Outdated Show resolved Hide resolved
@seisman seisman added the bug Something isn't working label Jun 22, 2023
@seisman seisman added this to the 0.10.0 milestone Jun 22, 2023
@seisman seisman changed the title WIP: Figure.meca: Fix the beachball offsetting for ndarray input Figure.meca: Fix the beachball offsetting for ndarray input Jun 24, 2023
@seisman seisman changed the title Figure.meca: Fix the beachball offsetting for ndarray input Figure.meca: Fix beachball offsetting for ndarray input Jun 24, 2023
@seisman seisman force-pushed the meca/offset-ndarray branch from 509a790 to e109880 Compare June 24, 2023 14:07
@seisman seisman force-pushed the meca/offset-ndarray branch from 0bb5788 to cc74814 Compare June 24, 2023 14:22
@seisman seisman marked this pull request as ready for review June 24, 2023 14:27
@seisman seisman added upstream Bug or missing feature of upstream core GMT needs review This PR has higher priority and needs review. labels Jun 24, 2023
@seisman seisman changed the title Figure.meca: Fix beachball offsetting for ndarray input Figure.meca: Fix beachball offsetting for ndarray input (requires GMT>=6.5.0) Jun 28, 2023
@seisman seisman requested a review from a team July 2, 2023 08:29
pygmt/tests/test_meca.py Outdated Show resolved Hide resolved
@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Jul 6, 2023
@seisman seisman merged commit c8bf2da into main Jul 8, 2023
@seisman seisman deleted the meca/offset-ndarray branch July 8, 2023 00:23
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Bug or missing feature of upstream core GMT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

beachball offsetting doesn't work for pandas/dict/ndarray input
2 participants