-
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
202 integrate ccdR into tcpl load data #221
Conversation
pulls from all assays if supplied 'fld' is not 'aeid'
the 'pass' parameter. To request a key, send an | ||
email to [email protected].") | ||
if (is.null(host)) options("TCPL_HOST" = "https://api-ccte.epa.gov/bioactivity") | ||
register_ccdr(key = pass) |
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.
calling register_ccdr requires @import statement in roxygen skeleton/documentation
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.
purposefully haven't added ccdR imports as they would would make it so you couldn't load the package i thought. Waiting until ccdR is on CRAN
All of the examples you provided could/should be made as unit tests. Let's discuss how we implemented mocking into ccdr and how it can be applied in this situation. |
Imports added. Unit tests are a great idea. Known problem with CRAN version of ccdR as an import to tcpl: when calling register_ccdr() within tcplConf, an error prints when saving api key for session. However, the key is already saved at the point of error and this does not affect functionality. ccdR team will plan to patch this soon, so I have chosen to not suppress this on the tcpl side, by forcibly fully loading ccdR with |
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.
Tested with dev version of ccdr and is working.
l5 <- tcplLoadData(lvl = 5, fld = "DTXSID", val = "DTXSID7020182")
Takes a while to load, we should investigate keys with asif to ensure we have keys for each fld specified.
This PR closes #202. ccdR is integrated into tcplConf, tcplLoadData, and tcplLoadAeid. tcplQueryAPI was added to interface with ccdR. Other tcplLoadXxxx functions can be integrated soon after with new tickets.
Here are a bunch of tests, copy+paste to try it out!