-
Notifications
You must be signed in to change notification settings - Fork 219
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
Wrap project #1122
Wrap project #1122
Conversation
Let's go with the questions!
|
Good question. I think we should always use NumPy if possible, but some modules (e.g.,
If you add
Perhaps you can set |
Thanks @seisman for your comments. Let me reply to each of them:
What about accepting both NumPy arrays and pandas dataframes? The function return value could be adjusted accordingly. For the specific case of
It doesn't work because Maybe a solution would be using required keyword-only arguments: def project(points, *, center, outfile=None, **kwargs) but it doesn't seem to be supported by
This will conflict with the second argument ( |
I meant the input should be general enough to support string (filenames), 2D list, 2D numpy array and pandas.DataFrame. For output, pandas.DataFrame sounds good. For people who want numpy, perhaps they should just convert the pandas.DataFrame to numpy using |
Ping @claudiodsf to check in and see if you need any help getting this pull request to completion |
Hi @willschlitzer and thanks for your help. There are two pending questions for this PR:
Please note that I'm leaving on summer break next Wednesday and will have little time to work on this PR till then. I'll be back on the second half of August. |
I would give it the option to accept multiple types of table-like inputs, such as a list, numpy array, or DataFrame. Have a look at
Since neither
No worries! Just wanted to check in to make sure this PR isn't forgotten about. Enjoy your summer break; PyGMT will still need work to be done when you get back! |
Hi @claudiodsf, we're planning to release PyGMT v0.5.0 in about two weeks (~15 October 2021). Let us know if you have time to finish this Pull Request, otherwise we can get one of the maintainers to finalize things and get this feature in 😄 |
I am available to help with finalizing this pull request. @claudiodsf, would you mind if I push changes to this branch in order to include your new feature in v0.5.0? |
Hi @meghanrjones, sure! Feel free to push your changes. Sorry for slow replying, but it's a tough working period. |
Great, thanks. And no problem, completely understand! |
@GenericMappingTools/pygmt-maintainers Could someone take a look at the suggestions I made for the |
Co-authored-by: Will Schlitzer <schlitzer90@gmail.com>
/format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with one change recommendation
Co-authored-by: Will Schlitzer <schlitzer90@gmail.com>
Thanks again for this feature @claudiodsf! Excited to have this out in the v0.5.0 release 🎉! As a reminder, you're welcome to submit a PR adding yourself to AUTHORS.md. |
* Wrap project Co-authored-by: Meghan Jones <meghanj@alum.mit.edu> Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> Co-authored-by: actions-bot <58130806+actions-bot@users.noreply.github.com> Co-authored-by: Will Schlitzer <schlitzer90@gmail.com>
Description of proposed changes
Here I propose a wrapper for project.
Still some stuff to do (tests!) and many questions, which I'll ask in a comment below.
Preview docs at https://pygmt-git-fork-claudiodsf-project-gmt.vercel.app/api/generated/pygmt.project.html
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version