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

Added alias for F in basemap #1894

Merged
merged 6 commits into from
Apr 24, 2022
Merged

Conversation

jackbeagley
Copy link
Contributor

@jackbeagley jackbeagley commented Apr 22, 2022

Description of proposed changes

Adds an alias for "box" so that backgrounds and frames for map_scales can be generated more easily.

Fixes #1893

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.

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

@welcome
Copy link

welcome bot commented Apr 22, 2022

💖 Thanks for opening this pull request! 💖

Please make sure you read our contributing guidelines and abide by our code of conduct.

A few things to keep in mind:

  • If you need help writing tests, take a look at the existing ones for inspiration. If you don't know where to start, let us know and we'll walk you through it.
  • All new features should be documented. It helps to write the docstrings for your functions/classes before writing the code. This will help you think about your code design and results in better code.
  • No matter what, we are really grateful that you put in the effort to do this! 🎉

@michaelgrund
Copy link
Member

michaelgrund commented Apr 22, 2022

Thanks for opening this PR @jackbeagley. Besides adding an alias for -F could you please also provide the corresponding documentation part in the docstring? You can orientate yourself on the already existing ones for basemap.

@michaelgrund michaelgrund added the documentation Improvements or additions to documentation label Apr 22, 2022
@michaelgrund michaelgrund added this to the 0.7.0 milestone Apr 22, 2022
@seisman
Copy link
Member

seisman commented Apr 22, 2022

Besides adding an alias for -F could you please also provide the corresponding documentation part in the docstring? You can orientate yourself on the already existing ones for basemap.

@jackbeagley FYI, the same box parameter has been aliased in the colorbar function, so you can simply copy (perhaps needs slight modifications) the box docstring from colorbar to basemap:

box : bool or str

@jackbeagley
Copy link
Contributor Author

@seisman , awesome, I have just copied the description from colorbar verbatim, as it seemed very well written and as you say - it is the same scale, so I don't think there is anything additional that needs to be added?

@jackbeagley
Copy link
Contributor Author

Does a test need to be written for this too?

pygmt/src/basemap.py Outdated Show resolved Hide resolved
@seisman
Copy link
Member

seisman commented Apr 22, 2022

Does a test need to be written for this too?

I don't think a test is needed for such an alias.

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.

I think we have to consider the different types of map objects that can be manipulated such as map inset, map scale, or map rose.

Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@jackbeagley
Copy link
Contributor Author

I think we have to consider the different types of map objects that can be manipulated such as map inset, map scale, or map rose.

Hey @michaelgrund, is that what you had in mind?

@jackbeagley jackbeagley marked this pull request as ready for review April 22, 2022 09:31
pygmt/src/basemap.py Outdated Show resolved Hide resolved
pygmt/src/basemap.py Outdated Show resolved Hide resolved
jackbeagley and others added 2 commits April 23, 2022 08:19
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Apr 23, 2022
@seisman seisman merged commit d3183e4 into GenericMappingTools:main Apr 24, 2022
@welcome
Copy link

welcome bot commented Apr 24, 2022

🎉🎉🎉 Congrats on merging your first pull request and welcome to the team! 🎉🎉🎉

Please open a new pull request to add yourself to the AUTHORS.md file. We hope that this was a good experience for you. Let us know if there is any way that the contributing process could be improved.

@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Apr 24, 2022
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
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.

Missing alias for option -F in basemap
4 participants