Skip to content

Figure.meca: Improve documentation #3517

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

Merged
merged 20 commits into from
Dec 29, 2024
Merged

Figure.meca: Improve documentation #3517

merged 20 commits into from
Dec 29, 2024

Conversation

yvonnefroehlich
Copy link
Member

@yvonnefroehlich yvonnefroehlich commented Oct 15, 2024

Description of proposed changes

Some improvements of the documetation of Figure.meca:

  • rewrapp line length
  • add missing articels
  • shorten formulations

Preview: https://pygmt-dev--3517.org.readthedocs.build/en/3517/api/generated/pygmt.Figure.meca.html

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 command is:

  • /format: automatically format and lint the code

@yvonnefroehlich yvonnefroehlich added documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog labels Oct 15, 2024
@yvonnefroehlich yvonnefroehlich added this to the 0.14.0 milestone Oct 15, 2024
@yvonnefroehlich yvonnefroehlich self-assigned this Oct 15, 2024
@yvonnefroehlich yvonnefroehlich changed the title WIP: DOC: Improve documentation of Figure.meca DOC: Improve documentation of Figure.meca Oct 15, 2024
@yvonnefroehlich yvonnefroehlich changed the title DOC: Improve documentation of Figure.meca WIP: DOC: Improve documentation of Figure.meca Oct 15, 2024
@yvonnefroehlich
Copy link
Member Author

/format

@yvonnefroehlich yvonnefroehlich changed the title WIP: DOC: Improve documentation of Figure.meca WIP: DOC/Figure.meca: Improve documentation Nov 1, 2024
@yvonnefroehlich yvonnefroehlich changed the title WIP: DOC/Figure.meca: Improve documentation WIP: Figure.meca: Improve documentation Nov 1, 2024
@yvonnefroehlich yvonnefroehlich mentioned this pull request Dec 16, 2024
49 tasks
@seisman
Copy link
Member

seisman commented Dec 24, 2024

@yvonnefroehlich What's the status of this PR? Do you think we can finish it in v0.14.0?

@yvonnefroehlich
Copy link
Member Author

@yvonnefroehlich What's the status of this PR? Do you think we can finish it in v0.14.0?

I just resolved the merge conflicts and will look later what is missing here.

@yvonnefroehlich yvonnefroehlich changed the title WIP: Figure.meca: Improve documentation Figure.meca: Improve documentation Dec 27, 2024
Comment on lines 253 to 262
convention. For the different conventions, the following combination of keys/
column names are required:

- ``"aki"``: *strike*, *dip*, *rake*, *magnitude*
- ``"gcmt"``: *strike1*, *dip1*, *rake1*, *strike2*, *dip2*, *rake2*,
*mantissa*, *exponent*
- ``"mt"``: *mrr*, *mtt*, *mff*, *mrt*, *mrf*, *mtf*, *exponent*
- ``"partial"``: *strike1*, *dip1*, *strike2*, *fault_type*, *magnitude*
- ``"principal_axis"``: *t_value*, *t_azimuth*, *t_plunge*, *n_value*,
*n_azimuth*, *n_plunge*, *p_value*, *p_azimuth*, *p_plunge*, *exponent*
Copy link
Member

@seisman seisman Dec 27, 2024

Choose a reason for hiding this comment

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

What about adding a table about focal mechanism conventions before the parameter list, then we can shorten this part. The table can be like:

Convention Description Focal parameters
"aki" Aki & Richard strike, dip, rake, magnitude
... ... ...

Of course, it can be done in future PRs if you prefer to have this PR merged in v0.14.0

Copy link
Member Author

@yvonnefroehlich yvonnefroehlich Dec 27, 2024

Choose a reason for hiding this comment

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

I think this is a good idea. A table makes these different options more readable. And later we can point to this table in the beachball tutorial and short the introduction part there. Can give it a try in a separat PR.

yvonnefroehlich and others added 2 commits December 27, 2024 22:02
Co-authored-by: Dongdong Tian <[email protected]>
@seisman seisman merged commit 1256d15 into main Dec 29, 2024
21 checks passed
@seisman seisman deleted the improve-doc-meca branch December 29, 2024 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants