Closed eytanadler closed 3 months ago
Attention: Patch coverage is 0%
with 31 lines
in your changes are missing coverage. Please review.
Project coverage is 65.47%. Comparing base (
dcf5ff6
) to head (c8621ea
).
Files | Patch % | Lines |
---|---|---|
pygeo/geo_utils/file_io.py | 0.00% | 31 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Looks like the previous function
getCoordinatesFromFile
usesf.open()
andf.close()
, could you update that and other functions to usewith
?
Sure thing. I'm pretty sure np.loadtxt()
could replace this entire function, but I can't find any examples of this method being used so I have no idea what file type it's meant for.
Purpose
When initializing a
DVGeometry
object, one way to specify the FFD file is to provide its filename. The function responsible for reading this file opens it, but never closes it. This can cause file system problems. I changed it to put the code that reads from the file in awith
block so that it is closed upon exiting (either a raised error or function return).Expected time until merged
1 day
Type of change
Testing
Checklist
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formattedfprettify
or C/C++ code withclang-format
as applicable