Closed gwarmstrong closed 4 years ago
This issue was handled in part by replacing _method.py
with _pipeline.py
, and moving the relevant Methods to q2-diversity-lib. (#280). alpha
and beta
are now at 100% coverage in both plugins.
https://github.com/qiime2/q2-diversity-lib/pull/6/files# resolves the first issue.
https://github.com/qiime2/q2-diversity-lib/pull/24 should resolve the canberra-adkins issue by removing that guard. (as @gwarmstrong suggested, we'll trust skbio
on this)
Improvement Description There are two lines that are not covered in
q2_diversity/_beta/_method.py
, which means anytime the number of lines in this repo is decreased, it will cause thecoveralls
to fail (e.g., #254 ).The culprits are:
https://github.com/qiime2/q2-diversity/blob/4c235a003b6ab8ad6cca78935c33365a8903f1af/q2_diversity/_beta/_method.py#L73-L74
and
https://github.com/qiime2/q2-diversity/blob/4c235a003b6ab8ad6cca78935c33365a8903f1af/q2_diversity/_beta/_method.py#L120-L122
The first can probably be tested with
unittest.mock
and the second can be testing with something like thisCurrent Behavior Unittests fail if total number of lines is decreased in
q2_diversity/_beta/_method.py
Proposed Behavior Unittests pass if total number of lines is decreased in
q2_diversity/_beta/_method.py
Questions
psutils
case should be relatively easy to cover, but it might require an annoying number of additional lines to test the negative values incanberra_adkins
. Additionally, as it stands I do not think this error can be invoked sinceskbio.diversity.beta_diversity
already checks for negative values. Would it make sense to remove the error check in thecanberra_adkins
function? Since this check is already being made somewhere.