Skip to content

Commit cc145d0

Browse files
committed
♻️ Separate preprocessors
1 parent 8edde46 commit cc145d0

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

ice_station_zebra/data_processors/preprocessors/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from .base import IPreprocessor, NullPreprocessor
21
from .icenet_sic import IceNetSICPreprocessor
2+
from .ipreprocessor import IPreprocessor
3+
from .null import NullPreprocessor
34

45
__all__ = [
56
"IPreprocessor",

ice_station_zebra/data_processors/preprocessors/icenet_sic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from icenet.data.sic.osisaf import SICDownloader
88
from omegaconf import DictConfig
99

10-
from .base import IPreprocessor
10+
from .ipreprocessor import IPreprocessor
1111

1212
logger = logging.getLogger(__name__)
1313

ice_station_zebra/data_processors/preprocessors/base.py renamed to ice_station_zebra/data_processors/preprocessors/ipreprocessor.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from collections.abc import ABC, abstractmethod
1+
from abc import ABC, abstractmethod
22
from pathlib import Path
33

44
from omegaconf import DictConfig
@@ -13,7 +13,3 @@ def __init__(self, config: DictConfig) -> None:
1313
@abstractmethod
1414
def download(self, preprocessor_path: Path) -> None:
1515
"""Download data to the specified preprocessor path."""
16-
17-
18-
class NullPreprocessor(IPreprocessor):
19-
pass
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from pathlib import Path
2+
3+
from .ipreprocessor import IPreprocessor
4+
5+
6+
class NullPreprocessor(IPreprocessor):
7+
def download(self, preprocessor_path: Path) -> None: # noqa: ARG002
8+
"""NullPreprocessor does not download any data."""
9+
return

0 commit comments

Comments
 (0)