-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Please write better examples for documentation #321
Comments
I wouldn't say it is true, and in any case, you are more than welcome to contribute. As a quick start, try: >>> g = github.Github(token)
>>> u = g.get_user()
>>> print u.name
David Awad
>>> print u.hireable
True
>>> print u.followers
94
>>> r = sorted(u.get_repos(), key=lambda r: r.stargazers_count, reverse=True)[0]
>>> print "The repository {r.name} has {r.stargazers_count} stars!".format(r=r)
The repository SpaceShare has 32 stars! etc. |
Totally agree. If I have to quickly create a program, then this module is totally of no use. I have to go through the classes and understand how to use them. |
So, I put a lot of time into writing a collection of such examples and putting them on the "wiki" associated with the repo. But I don't see a way to access that "wiki" anymore, and I'm wondering if github.com dropped the "wiki" associated with each repo while I wasn't paying attention? |
@pconrad Oh thanks :-) But I ended up using github3.py |
http://pygithub.github.io/PyGithub/ is also of interest. Is it linked from somewhere here? I think the links in https://github.com/PyGithub/PyGithub/blob/master/doc/introduction.rst should be updated. |
https://media.readthedocs.org/pdf/pygithub/stable/pygithub.pdf |
is there any good usage doc on dealing with Pull Requests? |
Hello everyone, |
Latest docs on readthedocs site should be easy to follow now. |
I still think that more and better documentation is needed, especially examples. The documentation is easy to read and well done, but having never worked with the github API before it is not clear how to actually implement the functions. What is a blob...how to I create one...etc |
@MaslowCommunityGardenRobot I agree. I am thinking of starting a new PyGithub by examples section on the docs, but we would require a lot of user contributions for it. Is this something that would interest you? |
I would gladly contribute if it was easy to make pull requests to. After working with pygithub for a couple weeks now it's really easy to use and well written, but a couple clear examples would have helped me a lot getting started and I am happy to contribute them as long as you give them a look over to make sure I'm doing things right 😉 |
@BarbourSmith That sounds brilliant! I can't wait to see you PR. Maybe start with a simple |
@sfdye I'd like to jump in here and start the Examples section. Like others have said above, PyGithub is a great resource but took me some time to figure out how to manipulate the Classes and methods for my use. Any preference for how to structure the Examples section? I'm thinking a simple Class-by-Class approach might be good, to mirror the reference documentation itself. |
This is still on my todo list too. Life keeps getting in the way, but I would love to help @allardbrain |
@BarbourSmith Great! Let's each pick a few examples we'd like to start with so we don't overlap. Since my current personal project involves using the ContentFile class, I'll start there. Here's a link to my forked version which now has |
Great! It's going to be at least another week or two before I will really have time to dig in, but I'm mostly dealing with reading issues and comments and merging pull requests so it sounds like we'll have good coverage |
Thank you @allardbrain @BarbourSmith for bringing up this topic. How about we start a |
@sfdye Sounds good to me. Excited to work on this! @BarbourSmith no problem. |
I'm running into an issue while documenting the To read the comments on a pull request you need to open it as an issue instead of a pull request and access the comments that way. The Similarly to close a pull request you need to open it as an issue and use Because a good example often includes multiple classes I think we might be better off with a single examples.rst file instead of separate files for each class. How do we feel about having a single examples.rst file? |
@BarbourSmith Wouldn’t hurt, let’s start with that :) |
I opened #762 to start us off |
@allardbrain Have you had a chance to work on this any more? I'm looking for info on using the using the ContentFile class, even just one simple example would help me a lot. This blog post also includes more examples which are useful: https://chase-seibert.github.io/blog/2016/07/22/pygithub-examples.html |
@BarbourSmith I am still trying to figure out how to use parts of this package for a project I have due on Friday. I can start writing examples once I submit it. This should help in the mean time:
|
That helps a ton. Thank you. |
Anyone who is working on PyGithub examples will earn a free |
I'm adding my examples in this Pull Reuest, would like to know, where to add them, as examples/pullrequest.rst structure is still not in this repository. |
Please see #874 |
there's no way to know how to use this if you've never used the github API before.
The text was updated successfully, but these errors were encountered: