-
Notifications
You must be signed in to change notification settings - Fork 42
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
New functions for the PubChem PUG-REST API #239
Conversation
Codecov Report
@@ Coverage Diff @@
## master #239 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 19 19
Lines 1724 1786 +62
======================================
- Misses 1724 1786 +62
Continue to review full report at Codecov.
|
The formula in #206 didn't work because the query is sometimes asynchronous and returns a listkey which has to be queried in a subsequent request, similarly to ChemSpider. I restructured |
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.
I agree that we shouldn't worry about #216 right now and get this merged. This adds a TON of functionality—awesome contribution. I've only made minor suggestions.
} | ||
else { | ||
res <- httr::POST(qurl, user_agent("webchem"), | ||
handle = handle("")) |
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.
add user_agent() ?
The PR is related to issues #206 and #216.
I originally created two new functions.
pc_pugrest()
gave a lot of control over the PUG-REST API andpc_validate()
validated all inputs topc_pugrest()
. The aim was to offer functions for more advanced users to assemble their own requests. However,pc_validate
became too complex and very difficult to test, and so I decided to just remove both functions. Instead, I created the functionget_sid()
for issue #216 and will editget_cid()
for issue #206 after @Aariq updated it according to #193 so there is no conflict.PR task list:
devtools::document()