Open kbonney opened 8 months ago
New unit tests added, @kbonney can you rerun coverage?
@ryanjcooper Below is the coverage run with the new tests. You can generate this by running coverage run --source=pyrocs -m pytest && coverage report --show-missing
in the root of the repository. Looks like we have very strong coverage now!
Name Stmts Miss Cover Missing
--------------------------------------------------------------------------------
pyrocs/__init__.py 1 0 100%
pyrocs/biosciences/__init__.py 3 0 100%
pyrocs/biosciences/affinity.py 35 0 100%
pyrocs/biosciences/functional_redundancy.py 8 0 100%
pyrocs/biosciences/hill_diversity.py 17 3 82% 106-109
pyrocs/complex_systems/__init__.py 3 0 100%
pyrocs/complex_systems/causal_complexity.py 39 2 95% 85-86
pyrocs/complex_systems/fluctuation_complexity.py 16 0 100%
pyrocs/complex_systems/grc.py 10 0 100%
pyrocs/information_theory/__init__.py 4 0 100%
pyrocs/information_theory/entropy.py 13 0 100%
pyrocs/information_theory/kl_divergence.py 34 0 100%
pyrocs/information_theory/mutual_info.py 9 0 100%
pyrocs/version.py 6 0 100%
--------------------------------------------------------------------------------
TOTAL 198 5 97%
Below is a coverage report for the test suite:
Looking into some of the missing lines reveals some major code blocks that aren't touched:
kl_divergence.novelty_transience_resonance
the main for loop does not get entered under the given test parameters.hill_diversity.hill_shannon
the special cases where q==0 or 2 and the general case are not tested.fluctuation_complexity
is not testedThere are some other minor areas that aren't touched by the tests as listed in the "Missing" column, but these three look like the best spots for improvement.