-
Notifications
You must be signed in to change notification settings - Fork 15
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 observations/species_counts endpoint #55
Conversation
@willkuhn Thanks for the contribution! We just need a couple changes to the PR before merging this in. It looks like you branched off of the master branch rather than the dev branch, and there are some merge conflicts. Coincidentally, a Then, the new function needs a unit test. See test/test_node_api.py for examples. This and a few other guidelines are mentioned in the Contributing guide. If you would like help with any of that, let me know. I would probably have time to add tests for this later this week if needed. |
@JWCook Thanks for the feedback and apologies for not following directions! I think I'm in the straight and narrow now... I've forked the dev now and added I am having trouble getting the docs to rebuild with I went ahead and created a commit to my fork with the changes that I've made so far. I would be grateful if you're about to provide any suggestions for how to fix this! Apart from that, I'm ready to PR this baby. My fork: https://github.com/willkuhn/pyinaturalist Traceback:
|
I think that error isn't necessarily your fault, it seems to be caused by something within the I checked out your fork, and if I comment out that decorator from both By the way, you may already know this, but you can overwrite your original branch in-place so you don't have to open a separate PR: # Rename the local patch-1 branch
git checkout patch-1
git branch -m patch-1-backup
# Overwrite the remote patch-1 branch with the contents of dev
git checkout dev
git checkout -b patch-1
git push --force --set-upstream origin patch-1 Thanks! |
Ok, I commented out those 2 lines and also added an Example for I don't really know what I'm doing with the Thanks for all your guidance to a noob! |
99% success! You can see the logs on Travis CI. The only part that failed was the black check: https://travis-ci.org/github/niconoe/pyinaturalist/jobs/730241072#L325 You can appease it by running |
Your changes are now available in the latest dev build on pypi, Thanks again for the contribution! |
@willkuhn FYI, these changes are now available in the latest stable release. |
Added two new functions
get_observations_species_counts
andget_all_observations_species_counts
that utilize the iNaturalist API observations/species_counts endpoint (https://api.inaturalist.org/v1/docs/#!/Observations/get_observations_species_counts). I needed these and thought others might find them useful as well.I hope this is helpful!