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

Add common option aliases to COMMON_OPTIONS in decorators.py #1407

Merged
merged 11 commits into from
Aug 4, 2021

Conversation

maxrjones
Copy link
Member

Description of proposed changes

This PR adds the following common options to COMMON_OPTIONS in pygmt/helpers/decorators.py:

  • binary
  • nodata
  • find
  • gap
  • header
  • outcols
  • skiprows
  • wrap

This is all the remaining common options from #48 except -l (which I would prefer having some discussion about the implementation before adding) and -: which I do not think we need to support since this can be done with incols.

The common options are added to either wiggle or blockmean/blockmedian for convenience for reviewing. I did not add the common options to all the modules that accept them because these could be good first issues for the upcoming ESWN workshop, in order to have a first exercise where everyone works on a similar task.

Relates to #48

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

@maxrjones maxrjones mentioned this pull request Aug 3, 2021
23 tasks
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.

Just a few fullstops to add and one entry which needs extra indentation.

pygmt/helpers/decorators.py Outdated Show resolved Hide resolved
pygmt/helpers/decorators.py Outdated Show resolved Hide resolved
pygmt/helpers/decorators.py Outdated Show resolved Hide resolved
pygmt/helpers/decorators.py Outdated Show resolved Hide resolved
pygmt/helpers/decorators.py Outdated Show resolved Hide resolved
pygmt/helpers/decorators.py Outdated Show resolved Hide resolved
pygmt/helpers/decorators.py Outdated Show resolved Hide resolved
pygmt/helpers/decorators.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.

Looks alright to me. Keen to get this in for PyGMT v0.4.1 too (before the ESWN workshop), but someone with a eye for detail should have another look.

@weiji14 weiji14 added documentation Improvements or additions to documentation final review call This PR requires final review and approval from a second reviewer labels Aug 4, 2021
Copy link
Member

@michaelgrund michaelgrund left a comment

Choose a reason for hiding this comment

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

Looks fine to me! Great work @meghanrjones.

@michaelgrund michaelgrund mentioned this pull request Aug 4, 2021
5 tasks
@maxrjones maxrjones merged commit cbd508b into master Aug 4, 2021
@maxrjones maxrjones deleted the add-common-options branch August 4, 2021 20:49
@seisman seisman added this to the 0.4.1 milestone Aug 4, 2021
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Aug 4, 2021
This was referenced Aug 8, 2021
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
…MappingTools#1407)

* Add binary alias

* Add nodata alias

* Add find alias

* Add gap alias

* Add header alias

* Add outcols alias

* Add skiprows alias

* Add wrap alias

* Format

* Apply suggestions from code review

Co-authored-by: Wei Ji <[email protected]>

Co-authored-by: Wei Ji <[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.

4 participants