-
Notifications
You must be signed in to change notification settings - Fork 51
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
What to do with NA input to gh()
?
#21
Comments
Thanks! I am not surprised. As you no, there are no tests. You are my tester. Sorry about it. So, yes, I am very much looking forward to it. I'll also try to find some time to set up some test infrastructure, but I don't think that it will happen within 1-2 weeks. |
Your idea re: building a table of endpoints is starting to make more sense to me now! It would be useful for tests (and other purposes too, I think). That Python (?) wrapper I linked to on some other thread basically does that to generate their tests. I would be willing to lend a hand ... but not until my teaching ends (first week of Dec). |
Sounds good to me! Back then I did some quick searches to find some (even partial) declarative description of the GitHub API, but failed. There are some "API generators", that take such a description, and then generate an API client. (Not in R, obviously.) As you say, we could use such a description to generate test cases. Even just creating such a description in a language agnostic way has some value. I'll take another look in a minute. |
although that mostly sounds like something the API creator is supposed to do? |
Or it could be a really tedious web-scraping task. 😕 |
That page has some good links. E.g. this looks good: And there a lot of others, e.g. here: https://news.ycombinator.com/item?id=8912897 It is not easy to search for a GitHub api spec, because all these tools are actually on GitHub. You know what, I'll just ask GitHub support.... |
Question sent. Btw., you said the Python client has this already? Let me take a look. |
Well, they have it in "Python code", so that is not really ideal.... |
GH support replied, they don't have a machine-readable api spec, but they want to create one. No ETA, though. |
I mentioned this already for another issue, but there is a good list of endpoints here: https://github.com/mikedeboer/node-github/blob/master/lib/routes.json |
To return back to the original issue, I think NAs should generate errors, no? What else could we do in this case? |
I agree. I now call In fact, I wonder if if makes sense to build anything like that into |
I don't think I would run in |
No, not by default. I should clarify that I'm usually using |
If
...
ingh(endpoint, ...)
contains an NA,gh()
errors with this:Obviously you'd never do that intentionally. I'm using
gh()
over rather long lists of (alleged) GitHub users, repos, teams, etc. and sometimes this just happens. I wonder if there's a nicer way to handle?I'm working on another PR re: errors and will also try to propose something for this.
The text was updated successfully, but these errors were encountered: