Skip to content

Commit

Permalink
- CI: Stop writing vector on disk
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-braun committed Sep 8, 2021
1 parent 4893247 commit dc71753
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- FIX: Checking path existence in `vectors.read`
- FIX: Repair geometries in `vectorize`
- FIX: Do not modify in place the input in `merge_vrt` (`str` transformed in `Path`)
- CI: Stop writing vector on disk

## 1.7.2 (2021-09-06)

Expand Down
8 changes: 1 addition & 7 deletions CI/SCRIPTS/test_rasters.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_rasters():
# Create tmp file
# VRT needs to be build on te same disk
with tempfile.TemporaryDirectory() as tmp_dir:
tmp_dir = rasters_path().joinpath("OUTPUT_XARRAY")
# tmp_dir = rasters_path().joinpath("OUTPUT_XARRAY")
os.makedirs(tmp_dir, exist_ok=True)

# Get Extent
Expand Down Expand Up @@ -239,15 +239,9 @@ def test_rasters():
vect_xda = rasters.vectorize(raster_path)
vect_val = rasters.vectorize(raster_path, values=val)
vect_val_diss = rasters.vectorize(raster_path, values=val, dissolve=True)
vect_val_diss.to_file(
os.path.join(tmp_dir, "vect_val_diss.geojson"), driver="GeoJSON"
)
vect_val_disc = rasters.vectorize(
raster_path, values=[1, 255], keep_values=False
)
vect_xda.to_file(
os.path.join(tmp_dir, "test_vector.geojson"), driver="GeoJSON"
)
ci.assert_geom_equal(vect_xda, vect_truth)
ci.assert_geom_equal(vect_val_diss, diss_truth)
ci.assert_geom_equal(vect_val, vect_truth.loc[vect_truth.raster_val == val])
Expand Down
4 changes: 0 additions & 4 deletions CI/SCRIPTS/test_rasters_rio.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ def test_rasters_rio():
vect_val_disc = rasters_rio.vectorize(
raster_path, values=[1, 255], keep_values=False
)
vect.to_file(os.path.join(tmp_dir, "test_vector.geojson"), driver="GeoJSON")
vect_val_diss.to_file(
os.path.join(tmp_dir, "vect_val_diss.geojson"), driver="GeoJSON"
)
vect_truth = vectors.read(vect_truth_path)
diss_truth = vectors.read(diss_truth_path)
ci.assert_geom_equal(vect, vect_truth)
Expand Down

0 comments on commit dc71753

Please sign in to comment.