Skip to content

Commit

Permalink
Add RechunkingItem model and update Store to use it for rechunking (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 authored Dec 14, 2024
1 parent a8defd8 commit 4e6dd32
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion leap_data_management_utils/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ class XarrayOpenKwargs(pydantic.BaseModel):
default_xarray_open_kwargs = XarrayOpenKwargs(engine='zarr')


class RechunkingItem(pydantic.BaseModel):
path: str = pydantic.Field(..., description='Path to the rechunked store')
use_case: str = pydantic.Field(..., description='Use case of the rechunking')


class Store(pydantic.BaseModel):
id: str = pydantic.Field(..., description='ID of the store')
name: str = pydantic.Field(None, description='Name of the store')
url: str = pydantic.Field(..., description='URL of the store')
rechunking: list[dict[str, str]] | None = pydantic.Field(None, alias='ncviewjs:rechunking')
rechunking: list[RechunkingItem] | None = pydantic.Field(None)
public: bool | None = pydantic.Field(None, description='Whether the store is public')
geospatial: bool | None = pydantic.Field(None, description='Whether the store is geospatial')
xarray_open_kwargs: XarrayOpenKwargs | None = pydantic.Field(
Expand Down

0 comments on commit 4e6dd32

Please sign in to comment.