The above line tests that as.terminfo() doesn't fetch classification data when not using withClassification.
In the v2-beta2 release an optimization has been made to the underlying /term API endpoint to always return classification data.
Another aspect of the changed /term API endpoint is when a term is not found the classification structure is now filled in with empty lists. Example:
> obj <- as.terminfo("foo")
Warning message:
Failed to retrieve term for IRI foo
> str(obj$classification)
List of 3
$ subClassOf : Named list()
$ superClassOf: Named list()
$ equivalentTo: Named list()
When using the
v2-beta2
API changes to/term
endpoint cause a test to fail. The following line started failing: https://github.com/phenoscape/rphenoscape/blob/531601b13fa80fdb8859252bcaaf3eaee4719abc/tests/testthat/test-pk.R#L208The above line tests that
as.terminfo()
doesn't fetch classification data when not usingwithClassification
. In thev2-beta2
release an optimization has been made to the underlying/term
API endpoint to always return classification data.Another aspect of the changed
/term
API endpoint is when a term is not found the classification structure is now filled in with empty lists. Example:This causes another failure in the same test where the code expects
obj$classification
to be NULL for a bogus term: https://github.com/phenoscape/rphenoscape/blob/531601b13fa80fdb8859252bcaaf3eaee4719abc/tests/testthat/test-pk.R#L222-L226See https://github.com/phenoscape/phenoscape-kb-services/issues/413 for details on the
/term
endpoint changes.This is part of #235