Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Oct 2, 2024
1 parent a11d826 commit a2527bb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 81 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ optional-dependencies.all = [
]

optional-dependencies.create = [
"earthkit-data[mars]>=0.9",
"earthkit-data[mars]>=0.10.4",
"earthkit-geo>=0.2",
"earthkit-meteo",
"ecmwflibs>=0.6.3",
"eccodes>=2.37",
"entrypoints",
"pyproj",
]
Expand Down
12 changes: 6 additions & 6 deletions src/anemoi/datasets/create/input/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ def select(self, group_of_dates):
action = action_factory(self.config, context, self.action_path)
return action.select(group_of_dates)

def __repr__(self):
from .action import ActionContext
from .action import action_factory
# def __repr__(self):
# from .action import ActionContext
# from .action import action_factory

context = ActionContext(**self.kwargs)
a = action_factory(self.config, context, self.action_path)
return repr(a)
# context = ActionContext(**self.kwargs)
# a = action_factory(self.config, context, self.action_path)
# return repr(a)

def _trace_select(self, group_of_dates):
return f"InputBuilder({group_of_dates})"
Expand Down
2 changes: 0 additions & 2 deletions src/anemoi/datasets/create/input/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def __init__(self, /, order_by, flatten_grid, remapping, use_grib_paramid):
def action_factory(config, context, action_path):

from .concat import ConcatAction
from .data_sources import DataSourcesAction
from .function import FunctionAction
from .join import JoinAction
from .pipe import PipeAction
Expand All @@ -106,7 +105,6 @@ def action_factory(config, context, action_path):
raise ValueError(f"Invalid input config {config[key]} ({type(config[key])}")

cls = {
"data_sources": DataSourcesAction,
"concat": ConcatAction,
"join": JoinAction,
"pipe": PipeAction,
Expand Down
71 changes: 0 additions & 71 deletions src/anemoi/datasets/create/input/data_sources.py

This file was deleted.

3 changes: 3 additions & 0 deletions src/anemoi/datasets/dates/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ def as_dict(self):
"frequency": frequency_to_string(self.frequency),
}.update(self.kwargs)

def __repr__(self) -> str:
return f"{self.__class__.__name__}({self.start},{self.end},{self.frequency})"


class Hindcast:

Expand Down

0 comments on commit a2527bb

Please sign in to comment.