Skip to content

Commit

Permalink
WIP2: Fixing remaining permission issues due to open files
Browse files Browse the repository at this point in the history
  • Loading branch information
SorooshMani-NOAA committed Nov 17, 2023
1 parent 8068f94 commit e2c0aa8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ocsmesh/hfun/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,10 @@ def msh_t(self) -> jigsaw_msh_t:
rast = self._create_big_raster(temp_dir)
hfun = self._apply_features_fast(rast)
composite_hfun = self._get_hfun_composite_fast(hfun)
# So that the tempfiles are deleted and the dir can be
# safely removed
del rast
del hfun

else:
raise ValueError(f"Invalid method specified: {self._method}")
Expand Down
4 changes: 2 additions & 2 deletions tests/api/hfun.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ def test_calculated_size(self):
hfun_val_diff = self.hfun_orig_val - hfun_calc_val

# TODO: Come up with a more robust criteria!
threshold = 0.21
err_value = np.max(np.abs(hfun_val_diff))/np.max(self.hfun_orig_val)
threshold = 0.05
err_value = np.mean(np.abs(hfun_val_diff))/np.mean(self.hfun_orig_val)
self.assertTrue(err_value < threshold)


Expand Down

0 comments on commit e2c0aa8

Please sign in to comment.