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

Use consistently 1-D, 2-D, or 3-D (with hyphen and capitalized) #2252

Merged
merged 53 commits into from
Dec 22, 2022

Conversation

yvonnefroehlich
Copy link
Member

@yvonnefroehlich yvonnefroehlich commented Dec 16, 2022

Description of proposed changes

Corresponding to this upstream GMT PR GenericMappingTools/gmt#7157, this PR aims to use consistently x-D (with hypen and capitalized, i.e., not xd or xD) for x=1,2,3.

  • src (documentation)
  • examples/gallery
  • examples/tutorials
  • datasets
  • helpers
  • tests

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

@yvonnefroehlich yvonnefroehlich added documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog labels Dec 16, 2022
@yvonnefroehlich yvonnefroehlich added this to the 0.8.0 milestone Dec 16, 2022
@yvonnefroehlich yvonnefroehlich changed the title Use consistently 1-D, 2-D or 3-D in documentation (with hyphen and capitalized) WIP: Use consistently 1-D, 2-D or 3-D in documentation (with hyphen and capitalized) Dec 16, 2022
@yvonnefroehlich yvonnefroehlich changed the title WIP: Use consistently 1-D, 2-D or 3-D in documentation (with hyphen and capitalized) WIP: Use consistently 1-D, 2-D or 3-D in documentation and examples (with hyphen and capitalized) Dec 16, 2022
@yvonnefroehlich yvonnefroehlich changed the title WIP: Use consistently 1-D, 2-D, or 3-D (with hyphen and capitalized) Use consistently 1-D, 2-D, or 3-D (with hyphen and capitalized) Dec 18, 2022
@seisman
Copy link
Member

seisman commented Dec 19, 2022

I'm not sure about these changes. It seems numpy prefers to use xD instead (e.g., see https://numpy.org/doc/stable/user/basics.creation.html#id1).

@yvonnefroehlich
Copy link
Member Author

I'm not sure about these changes. It seems numpy prefers to use xD instead (e.g., see https://numpy.org/doc/stable/user/basics.creation.html#id1).

Hm. I only looked on this numpy documentation page https://numpy.org/doc/stable/user/absolute_beginners.html#more-information-about-arrays. There they introduce the shortcuts with hyphen, but you are right later they use the shortcuts more often without hyphen 😂.

@seisman
Copy link
Member

seisman commented Dec 20, 2022

Ping @GenericMappingTools/pygmt-maintainers to decide if we should use 2-D (consistent with GMT) or 2D (consistent with NumPy).

@yvonnefroehlich yvonnefroehlich mentioned this pull request Dec 20, 2022
65 tasks
@michaelgrund
Copy link
Member

Ping @GenericMappingTools/pygmt-maintainers to decide if we should use 2-D (consistent with GMT) or 2D (consistent with NumPy).

I have no strong opinion on that, would be happy with both solutions as long as we have a consistent naming.

Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

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

OK with the changes.

@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Dec 22, 2022
@seisman seisman merged commit 0a7c4a9 into main Dec 22, 2022
@seisman seisman deleted the fix-typos-11 branch December 22, 2022 11:27
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Dec 22, 2022
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.

4 participants