Skip to content

Commit

Permalink
Update TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
margrietpalm committed Nov 7, 2024
1 parent 57c05ee commit 9a8503b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion integration_tests/test_bergermeer.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def test_integration(tmp_path, filename):
## LINES
assert f["lines"]["id"].shape == (31916,) # Inpy: (31916, )
assert_array_equal(f["lines"]["id"][:], np.arange(f["lines"]["id"].shape[0]))
# TODO: Somehow LINE_2D and LINE_2D_OBSTACLE both ended up with type LineType.LINE_2D
assert count_unique(f["lines"]["kcu"]) == {
-9999: 1, # Inpy: 0: 1
LineType.LINE_2D_GROUNDWATER: 11037,
Expand Down
8 changes: 1 addition & 7 deletions threedigrid_builder/interface/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,6 @@ def get_cross_section_locations(self) -> CrossSectionLocations:
.order_by(models.CrossSectionLocation.id)
.as_structarray()
)
# TODO: fix definition
# TODO: handle vegetation table
arr["geom"] = self.reproject(arr["geom"])

attr_dict = arr_to_attr_dict(arr, {"geom": "the_geom"})
Expand All @@ -594,7 +592,6 @@ def get_cross_section_locations(self) -> CrossSectionLocations:

def get_culverts(self) -> Culverts:
"""Return Culverts"""
# TODO: cross section info -> downstream
with self.get_session() as session:
arr = (
session.query(
Expand Down Expand Up @@ -623,7 +620,6 @@ def get_culverts(self) -> Culverts:
arr["friction_type"][arr["friction_type"] == 4] = 2

# When no calculation type is provides we default to isolated
# TODO: I don't understand this
arr["exchange_type"][arr["exchange_type"] == -9999] = LineType.LINE_1D_ISOLATED
# map "old" calculation types (100, 101, 102, 105) to (0, 1, 2, 5)
arr["exchange_type"][arr["exchange_type"] >= 100] -= 100
Expand Down Expand Up @@ -763,7 +759,6 @@ def get_orifices(self) -> Orifices:
.order_by(models.Orifice.id)
.as_structarray()
)
# TODO fix cross section
# map friction_type 4 to friction_type 2 to match crosssectionlocation enum
arr["friction_type"][arr["friction_type"] == 4] = 2
attr_dict = arr_to_attr_dict(
Expand Down Expand Up @@ -798,7 +793,7 @@ def get_pipes(self) -> Pipes:
models.Pipe.hydraulic_conductivity_out,
models.Pipe.hydraulic_conductivity_in,
]
# TODO: handel material and cross_section
# TODO: handle material
with self.get_session() as session:
arr = session.query(*cols).order_by(models.Pipe.id).as_structarray()

Expand Down Expand Up @@ -881,7 +876,6 @@ def get_weirs(self) -> Weirs:
.order_by(models.Weir.id)
.as_structarray()
)
# TODO cross section
# map friction_type 4 to friction_type 2 to match crosssectionlocation enum
arr["friction_type"][arr["friction_type"] == 4] = 2
attr_dict = arr_to_attr_dict(
Expand Down

0 comments on commit 9a8503b

Please sign in to comment.