Closed mwtoews closed 2 months ago
Attention: Patch coverage is 96.07843%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 70.8%. Comparing base (
e2d16df
) to head (ac52c31
).
Thanks for this @mwtoews. The binary readers have been needing some updates. Appreciate you taking it on. Time to get past the python2 hangover.
This fixes issues while reading some binaryfiles with auto precision detection, and also modernizes a few aspects of flopy.utils.binaryfile left-over from python2.
There are two changes to
flopy.utils.binaryfile.binaryread()
:vartype=str
, sincebytes
is the the return type with Python3Other refactors:
bytes
to a list of int, then check if bytes are within range.encode("ascii")
where appropriateExamples of issues
CellBudgetFile
Reading a cell budget file that contains
imeth=5
withprecision="auto"
(the default):previously this will hang indefinitely since it is attempting to read data at the end of the file without raising any exception. This example is fixed with this PR.
HeadFile
And this is not so much a fix, but a less confusing error:
the exception is changed from:
to:
I have some pending changes to resolve this issue, due after this one.