Skip to content

Commit

Permalink
Use internal function to preserve validation
Browse files Browse the repository at this point in the history
  • Loading branch information
sssangha authored Dec 6, 2024
1 parent e350dbb commit 40ed8ae
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/tile_mate/tile_model.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import geopandas as gpd
from pandera import Column, DataFrameSchema

# Add support for GeometryDtype
pandas_engine.Engine.dtype = staticmethod(
lambda dtype: dtype if dtype == gpd.array.GeometryDtype else None
)

TILE_SCHEMA = DataFrameSchema(
{
'tile_id': Column(str, required=True),
'url': Column(str, required=True),
'year': Column(int, required=False),
'temporal_baseline_days': Column(int, required=False),
'season': Column(str, required=False),
'geometry': Column(gpd.array.GeometryDtype, required=True),
'geometry': Column("geometry", required=True),
}
)

0 comments on commit 40ed8ae

Please sign in to comment.