mock_loaders¶
ecoscope.platform.mock_loaders ¶
Mock data loaders for wt-task testing.
This module provides a parquet loader registered via the wt_task.mock_loaders
entry point group, enabling wt_task.testing.create_task_magicmock to load
.parquet example-return files without wt-task depending on geopandas/pandas.
Functions:¶
load_parquet ¶
Load a parquet or geoparquet file.
Attempts to read as a GeoDataFrame first (via geopandas); falls back to a plain DataFrame (via pandas) if the file doesn't contain geometry data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
Path to the parquet file. |
required |
Returns:
| Type | Description |
|---|---|
Any
|
A GeoDataFrame or DataFrame with the file contents. |