Skip to content

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

Merged
seisman merged 11 commits into
mainfrom
meca/offset-ndarray
Jul 8, 2023
Merged

Figure.meca: Fix beachball offsetting for ndarray input (requires GMT>=6.5.0)#2576
seisman merged 11 commits into
mainfrom
meca/offset-ndarray

Conversation

@seisman

@seismanseisman commented Jun 14, 2023

Copy link
Copy Markdown
Member

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 fixDo 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

Comment threadpygmt/src/meca.py Outdated
@seismanseisman added the bug Something isn't working label Jun 22, 2023
@seismanseisman added this to the 0.10.0 milestone Jun 22, 2023
@seismanseisman changed the title WIP: Figure.meca: Fix the beachball offsetting for ndarray inputFigure.meca: Fix the beachball offsetting for ndarray inputJun 24, 2023
@seismanseisman changed the title Figure.meca: Fix the beachball offsetting for ndarray inputFigure.meca: Fix beachball offsetting for ndarray inputJun 24, 2023
@seisman
seismanforce-pushed the meca/offset-ndarray branch from 509a790 to e109880CompareJune 24, 2023 14:07
@seisman
seismanforce-pushed the meca/offset-ndarray branch from 0bb5788 to cc74814CompareJune 24, 2023 14:22
@seisman
seisman marked this pull request as ready for review June 24, 2023 14:27
@seismanseisman added upstream Bug or missing feature of upstream core GMT needs review This PR has higher priority and needs review. labels Jun 24, 2023
@seismanseisman changed the title Figure.meca: Fix beachball offsetting for ndarray inputFigure.meca: Fix beachball offsetting for ndarray input (requires GMT>=6.5.0)Jun 28, 2023
@seisman
seisman requested a review from a teamJuly 2, 2023 08:29
Comment threadpygmt/tests/test_meca.py Outdated
Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
@seismanseisman 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 mainJul 8, 2023
@seisman
seisman deleted the meca/offset-ndarray branch July 8, 2023 00:23
@seismanseisman removed the final review call This PR requires final review and approval from a second reviewer label Jul 8, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugSomething isn't workingupstreamBug 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

@seisman@michaelgrund