Skip to content

Complete documentation for grdtrack #1190

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 12 commits into from
May 31, 2021
Merged

Complete documentation for grdtrack #1190

merged 12 commits into from
May 31, 2021

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented Apr 6, 2021

Description of proposed changes

Finish up aliasing parameters for grdtrack, improving the documentattion to be better than what we currently have at https://www.pygmt.org/v0.3.1/api/generated/pygmt.grdtrack.html! For reference, upstream GMT docs is at https://docs.generic-mapping-tools.org/6.1/grdtrack.html and https://github.com/GenericMappingTools/gmt/blame/master/doc/rst/source/grdtrack.rst.

Preview at https://pygmt-git-complete-docs-grdtrack-gmt.vercel.app/api/generated/pygmt.grdtrack.html

TODO:

Arguments/Aliases to document (see also https://www.generic-mapping-tools.org/GMT.jl/dev/#GMT.grdtrack). New aliases are highlighted in bold:

  • A - resample
  • C - crossprofile
  • D - dfile?
  • E - profile
  • F - critical ?
  • G - outfile (but not really an alias...)
  • N - no_skip
  • R - region
  • S - stack
  • T - radius
  • V - verbose
  • Z - z_only
  • f - coltypes
  • i - incols
  • j - distcalc
  • n - interpolation

Finalizes #307. Note: Merge this PR after #1189.

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.

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

Starting to properly document all major parameters
for `grdtrack` as per upstream GMT docs at
https://docs.generic-mapping-tools.org/6.1/grdtrack.
Begin by adding long aliases for resampling (A),
cross_profile (C), profile (E), and common aliases
region (R) and distcalc (j).
@weiji14 weiji14 added the documentation Improvements or additions to documentation label Apr 6, 2021
@weiji14 weiji14 added this to the 0.4.0 milestone Apr 6, 2021
@weiji14 weiji14 self-assigned this Apr 6, 2021
@maxrjones
Copy link
Member

What is the convention for including separators in the aliases? Here it seems as if partial words are concatenated without a separator (e.g., distcalc) while full words are separated with an underscore (e.g. cross_profile). But at least one of the planned aliases for the common options (skiprows) is two full words concatenated without a separator #48 (comment). In a quick search I did not find any established guidelines for this topic; it would be helpful to have this documented given all the conversations and development about long options and aliases happening.

@weiji14
Copy link
Member Author

weiji14 commented Apr 6, 2021

What is the convention for including separators in the aliases?

There isn't a policy yet I think, so how about this. Use an underscore to separate words bridged by vowels (aeiou), e.g. no_skip, z_only, etc. Don't use underscore for others, e.g. distcalc, crossprofile (I'll change this) and coltypes. What do you think?

@maxrjones
Copy link
Member

What is the convention for including separators in the aliases?

There isn't a policy yet I think, so how about this. Use an underscore to separate words bridged by vowels (aeiou), e.g. no_skip, z_only, etc. Don't use underscore for others, e.g. distcalc, crossprofile (I'll change this) and coltypes. What do you think?

Very nice!

weiji14 added a commit to lhoupert/pygmt that referenced this pull request Apr 30, 2021
weiji14 added a commit to lhoupert/pygmt that referenced this pull request Apr 30, 2021
@weiji14 weiji14 mentioned this pull request May 3, 2021
5 tasks
@maxrjones
Copy link
Member

For reference, here is what GMT.jl uses:
A - interp_path
C - equidistant
D - dfile
E - by_coord
G - grid
N - no_skip
S - stack
T - radius
Z - z_only

@weiji14 weiji14 force-pushed the complete-docs/grdtrack branch from 83e509e to b4cc56a Compare May 17, 2021 22:19
@weiji14 weiji14 force-pushed the complete-docs/grdtrack branch from b4cc56a to 4d58d0f Compare May 17, 2021 22:27
@weiji14 weiji14 marked this pull request as ready for review May 28, 2021 23:57
@weiji14 weiji14 added the final review call This PR requires final review and approval from a second reviewer label May 29, 2021
@weiji14 weiji14 merged commit 8efa0aa into master May 31, 2021
@weiji14 weiji14 deleted the complete-docs/grdtrack branch May 31, 2021 21:26
@weiji14 weiji14 removed the final review call This PR requires final review and approval from a second reviewer label May 31, 2021
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Finish up aliasing parameters for `grdtrack`
as per upstream GMT docs at
https://docs.generic-mapping-tools.org/6.1/grdtrack.
Begin by adding long aliases for resample (A),
crossprofile (C), profile (E), and common aliases
region (R), verbose (V), coltypes (f), distcalc (j),
and interpolation (n).

* Alias no_skip (N) and z_only (Z) for grdtrack
* Alias dfile (D) for grdtrack
* Alias critical (F) for grdtrack
* Alias stack (S) for grdtrack
* Alias radius (T) for grdtrack
* Alias incols (i) for grdtrack

Co-authored-by: Meghan Jones <[email protected]>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants