-
Notifications
You must be signed in to change notification settings - Fork 224
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 grdfilter #616
Wrap grdfilter #616
Conversation
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.
Alright, onwards with the review, continuing from #612! This may take a lot of rounds of back and forth (similar to peer review, but a lot more fast paced and interactive since it's on Github). I've made some "suggested changes" to the documentation as a start, which you're welcome to "Commit suggestion" directly, or pool several together using "Add suggestion to batch" before committing. See also https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request#applying-a-suggested-change.
Of course, you can also edit the suggestions and do it yourself locally, no harm with that. We'll make more fine-grained suggestions later on so as not to overwhelm you too many requests/suggestions at once. I must say that grdfilter
looks to be a pretty simple function to wrap, so hopefully it shouldn't take too long 🤞
P.S. You should be able to preview the live documentation at https://pygmt-git-fork-carocamargo-newfeature.gmt.vercel.app once you add grdfilter
to the doc/api/index.rst
file.
Co-authored-by: Wei Ji <[email protected]>
Co-authored-by: Wei Ji <[email protected]>
Ok.. this will sound silly, but then how can I edit the file after I have done the PR? Because if I change it locally, and push it to my branch, then I need to do a new PR to the pygmt, no? Is there a way to add files to this PR? |
If you're using git command line, you can run
|
There are no silly questions :), let's take a step back then. I recommend following https://www.digitalocean.com/community/tutorials/hacktoberfest-how-to-submit-your-first-pull-request-on-github to get a step by step introduction on how things work. Let us know if you need any clarification with specific things.
Simplest way to edit the file would be to do it on the Github UI (i.e. at https://github.com/carocamargo/pygmt/edit/newfeature/doc/api/index.rst). You can change branches on Github (to 'newfeature' in this case) and navigate to the file you want to change: The edit will take place in the same PR, so you don't need to submit a new one. If you want to add a file for this Pull Request (e.g. a gallery example file), there should be an "Add File" button on the top right to do that too: Either way (editing/adding files) can also be accomplished on the command line (worth learning when you have time). Just to follow up on @seisman's comment, the steps would be:
|
removed header from local conflict
Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
< In terms of unit tests, there is a doctest example that might be sufficient for now, but we could perhaps start a Think that it's better in another PR, just to not make it so messy. I'll look at the other test files to see what it should include. |
Sounds good. You can look at https://github.com/GenericMappingTools/pygmt/blob/v0.2.0/pygmt/tests/test_grdcut.py (or any other one) as an example. It's more about testing different file/data input/output types, rather than the |
Co-authored-by: Wei Ji <[email protected]>
@carocamargo This PR is almost ready to merge. Could you please format the codes by running You may need to update your local branch first, as I made a few changes to your remote branch yesterday (applied the @weiji14's suggestion and merged the master branch). |
Ping @carocamargo again to help format the codes, so that we can merge it into master branch. |
Sorry @seisman , but what do you mean by I tried, running, and got this:
|
Run |
/format |
@carocamargo FYI, with PR #646 merged, now it's possible to lint your code automatically by adding @weiji14 The "/format" slash command works well. |
This PR looks good to me. Should we merge into before v0.2.1? |
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.
Yep, this initial implementation looks good to me! I'll approve and merge it now.
🎉🎉🎉 Congrats on merging your first pull request and welcome to the team! 🎉🎉🎉 Please open a new pull request to add yourself to the |
Cool, thanks for giving this a go @carocamargo! Sorry that it took a while. You should be able to use As mentioned in #616 (comment), we should add some more tests for this next (in a separate PR), and you're welcome to add a gallery example too if you have time! Will try and sort out your grd2xyz PR at #636 next too. |
Description of proposed changes
This PR wraps grdfilter.
Fixes #610.
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.