diff --git a/ndsl/initialization/grid_sizer.py b/ndsl/initialization/grid_sizer.py index f3347e27..684fa5ab 100644 --- a/ndsl/initialization/grid_sizer.py +++ b/ndsl/initialization/grid_sizer.py @@ -1,9 +1,10 @@ +from abc import ABC, abstractmethod from collections.abc import Sequence from dataclasses import dataclass @dataclass -class GridSizer: +class GridSizer(ABC): nx: int """Length of the x compute dimension for produced arrays.""" ny: int @@ -15,11 +16,11 @@ class GridSizer: data_dimensions: dict[str, int] """Name/Lengths pair of any non-x/y/z dimensions, such as land or radiation dimensions.""" - def get_origin(self, dims: Sequence[str]) -> tuple[int, ...]: - raise NotImplementedError() + @abstractmethod + def get_origin(self, dims: Sequence[str]) -> tuple[int, ...]: ... - def get_extent(self, dims: Sequence[str]) -> tuple[int, ...]: - raise NotImplementedError() + @abstractmethod + def get_extent(self, dims: Sequence[str]) -> tuple[int, ...]: ... - def get_shape(self, dims: Sequence[str]) -> tuple[int, ...]: - raise NotImplementedError() + @abstractmethod + def get_shape(self, dims: Sequence[str]) -> tuple[int, ...]: ...