Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ repos:
hooks:
- id: black
args: ["--exclude", ".pixi"]
language_version: python3.13
- repo: local
hooks:
- id: check-pixi-lock
Expand Down
1 change: 0 additions & 1 deletion dem_handler/dem/cop_glo30.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import rasterio.mask
import shapely.geometry
from affine import Affine
from osgeo import gdal
from rasterio.crs import CRS

from dem_handler.dem.geoid import apply_geoid
Expand Down
3 changes: 3 additions & 0 deletions dem_handler/utils/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
import rasterio
from affine import Affine
from osgeo import gdal

gdal.UseExceptions()

from pyproj import Transformer
from rasterio.enums import Resampling
from rasterio.io import MemoryFile
Expand Down
3 changes: 3 additions & 0 deletions dem_handler/utils/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
import rasterio
import shapely
from osgeo import gdal

gdal.UseExceptions()

from pyproj import CRS
from pyproj.aoi import AreaOfInterest
from pyproj.database import query_utm_crs_info
Expand Down
9 changes: 6 additions & 3 deletions environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ channels:
dependencies:
- gdal >=3.10.2
- rasterio >=1.4.3
- pyogrio >=0.10.0
- multiprocess >=0.70.17
- aioboto3 ==14.1.0
- python >=3.8
- pip
- pip:
- -e .
- boto3>=1.37.1
- geopandas>=1.0.1
- requests>=2.32.3
- aioboto3>=15.5.0, <16
- scikit-image>=0.26.0, <0.27
- multiprocess
- pyogrio>=0.13.0, <0.14
- pooch>=1.9.0, <2
- tqdm>=4.70.0, <5
2 changes: 2 additions & 0 deletions tests/cop_glo30/test_dem_cop.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

@dataclass
class TestDem:
__test__ = False # Stop pytest from checking (done because the class starts with the word "Test")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!


requested_bounds: tuple[float, float, float, float]
bounds_array_file: str

Expand Down
2 changes: 2 additions & 0 deletions tests/cop_glo30/test_dem_cop_glo30.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

@dataclass
class TestDem:
__test__ = False # Stop pytest from checking (done because the class starts with the word "Test")

requested_bounds: tuple[float, float, float, float]
expanded_bounds: tuple[float, float, float, float]
expanded_shape: tuple[int, int]
Expand Down
2 changes: 2 additions & 0 deletions tests/rema/test_dem_rema.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
# data for tests is downloaded with download_test_data.py script
@dataclass
class TestDem:
__test__ = False # Stop pytest from checking (done because the class starts with the word "Test")

requested_bounds: BBox
dem_file: str
resolution: int
Expand Down
4 changes: 4 additions & 0 deletions tests/utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

@dataclass
class TestValidBounds:
__test__ = False # Stop pytest from checking (done because the class starts with the word "Test")

bounds: BoundingBox
lat_tol: float
lon_tol: float
Expand Down Expand Up @@ -61,6 +63,8 @@ def test_check_valid_bounding_box(case: TestValidBounds):

@dataclass
class TestResizeBounds:
__test__ = False # Stop pytest from checking (done because the class starts with the word "Test")

bounds: BoundingBox
scale_factor: BoundingBox
resized_bounds: BoundingBox
Expand Down
Loading