ReadCoverage#
- class scikitplot.corpus.ReadCoverage(unit='part', read=0, empty=0, skipped=<factory>)[source]#
What one read of a source covered: parts read, empty and skipped.
- Parameters:
- unitstr
What a part is (
"member","page","file"), for messages.- readint
Parts that gave text.
- emptyint
Parts that were read and gave no text.
- skippeddict of str to int
Parts not read, by reason (
"unsupported","hidden","unsafe-path","error","symlink").
- Parameters:
Notes
User note: A reader that fills one exposes it as
reader.coverageafter iteration; a new read starts a new record, so reading twice gives the same counts. Messages hold counts and reasons only, never text.- is_poor(warn_share=0.5)[source]#
Return whether the read deserves a warning.
True when parts were seen but none gave text, or when the share of parts skipped or empty is above warn_share (
0< share <=1;1warns only when nothing was read).
- merge(other)[source]#
Add another record’s counts (a nested archive’s) to this one.
- Parameters:
other (ReadCoverage)
- Return type:
None