Skip to content

Commit

Permalink
rename to GeomsComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
savente93 committed Apr 2, 2024
1 parent 69b930e commit 4bee82f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions hydromt/components/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Implementations of the core ModelComponents."""

from hydromt.components.base import ModelComponent
from hydromt.components.geoms import GeomComponent
from hydromt.components.geoms import GeomsComponent
from hydromt.components.grid import GridComponent
from hydromt.components.region import ModelRegionComponent
from hydromt.components.tables import TablesComponent
Expand All @@ -11,5 +11,5 @@
"ModelComponent",
"GridComponent",
"TablesComponent",
"GeomComponent",
"GeomsComponent",
]
2 changes: 1 addition & 1 deletion hydromt/components/geoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from hydromt.models.model import Model


class GeomComponent(ModelComponent):
class GeomsComponent(ModelComponent):
"""A component to manage geo-spatial geometries."""

def __init__(
Expand Down
4 changes: 2 additions & 2 deletions hydromt/components/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from hydromt import hydromt_step
from hydromt._typing.error import NoDataStrategy, _exec_nodata_strat
from hydromt._typing.type_def import DeferedFileClose
from hydromt.components import GeomComponent
from hydromt.components import GeomsComponent
from hydromt.components.base import ModelComponent
from hydromt.components.region import _parse_region
from hydromt.gis import raster
Expand Down Expand Up @@ -413,7 +413,7 @@ def create(
grid = grid.drop_vars("mask")

# Add region and grid to model
self._model.get_component("geom", GeomComponent).set(geom, "region")
self._model.get_component("geom", GeomsComponent).set(geom, "region")
self.set(grid)

return grid
Expand Down
4 changes: 2 additions & 2 deletions tests/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pytest_mock import MockerFixture

from hydromt.components.base import ModelComponent
from hydromt.components.geoms import GeomComponent
from hydromt.components.geoms import GeomsComponent
from hydromt.components.grid import GridComponent
from hydromt.components.region import ModelRegionComponent
from hydromt.components.tables import TablesComponent
Expand All @@ -19,7 +19,7 @@ def test_core_component_plugins():
"ModelRegionComponent": ModelRegionComponent,
"GridComponent": GridComponent,
"ModelComponent": ModelComponent,
"GeomComponent": GeomComponent,
"GeomComponent": GeomsComponent,
"TablesComponent": TablesComponent,
}

Expand Down

0 comments on commit 4bee82f

Please sign in to comment.