Skip to content
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

Tropicos tests (prefix tp_) don't pass check - will try to fix this #45

Closed
sckott opened this issue Oct 22, 2012 · 3 comments
Closed

Tropicos tests (prefix tp_) don't pass check - will try to fix this #45

sckott opened this issue Oct 22, 2012 · 3 comments
Assignees

Comments

@sckott
Copy link
Contributor

sckott commented Oct 22, 2012

on testthat::check() I get:

* checking tests ...
  Running 'test-all.R' [5s/69s]
 ERROR
Running the tests in 'tests/test-all.R' failed.
Last 13 lines of output:
  itis_taxrank : http://www.itis.gov/ITISWebService/services/ITISService/getTaxonomicRankNameFromTSN?tsn=202385
  ..
  iucn_summary : ..
  phylomatic_tree : http://www.itis.gov/ITISWebService/services/ITISService/getFullHierarchyFromTSN?tsn=36616
  http://www.itis.gov/ITISWebService/services/ITISService/getFullHierarchyFromTSN?tsn=19322
  http://www.itis.gov/ITISWebService/services/ITISService/getFullHierarchyFromTSN?tsn=183327
  ...
  tp_acceptednames : 4
  tp_namedistributions : 5
  tp_namereferences : Error in getOption("tropicoskey", stop("need an API key for Tropicos")) : 
    need an API key for Tropicos
  Calls: test_package ... eval -> eval -> tp_namereferences -> paste -> getOption
  Execution halted
Error: Command failed (1)
@ghost ghost assigned sckott Oct 22, 2012
@eduardszoecs
Copy link
Member

Yep, having the same trouble with the Sweave-file (since CRAN has no API-key and no custumisable Rprofile.site and/or R CMD CHECK doesnot take care of the Rprofile).

I've came around in the vignette with:

<<>>=
options(pmkey = '<insertyourcodehere>')
@
<<echo=FALSE, results=hide>>=
options(pmkey = 'xxx')    # xxx stands for my personal key
@

<<>>=
plants <- c("Myrcia lingua", "Myrcia bella", "Ocotea pulchella")
plantminer(plants)
@

So I'm showing the user a code (to fill with his own key) but internal I'm using my personal key.

So to explicitely define the key in options.
Do you have a API-key which can be used for this? I am not happy with the solution to use my personal key here...
If options() doesn't work with Cran supply the key as argument

@sckott
Copy link
Contributor Author

sckott commented Oct 23, 2012

If okay with you, I moved all tropicos functions out of taxize. In addition, I removed all the tests as even after removing tropicos tests I was still getting a lot of errors that didn't make sense. We can still run tests basically, just by running examples. Using testthat you can do run_examples('path_to_package', run=F), where the run=F will uncomment the \dontrun lines and run all the examples. I just ran them all and no errors on my end at least. Pushing changes soon

@sckott
Copy link
Contributor Author

sckott commented Oct 23, 2012

Closing this and opening new issue to fix tropicos functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants