diff --git a/db/thing.py b/db/thing.py index bedc4430d..b9394a655 100644 --- a/db/thing.py +++ b/db/thing.py @@ -89,8 +89,8 @@ class Thing(Base, AutoBaseMixin, ReleaseMixin, StatusHistoryMixin, PermissionMix well_casing_diameter: Mapped[float] = mapped_column( Float, nullable=True, - info={"unit": "inches"}, - comment="Diameter of the well casing in inches.", + info={"unit": "feet"}, + comment="Diameter of the well casing in feet.", ) well_casing_depth: Mapped[float] = mapped_column( Float, diff --git a/schemas/thing.py b/schemas/thing.py index cd741c758..d2563cc4d 100644 --- a/schemas/thing.py +++ b/schemas/thing.py @@ -92,7 +92,7 @@ class CreateWell(CreateBaseThing, ValidateWell): ) well_construction_notes: str | None = None well_casing_diameter: float | None = Field( - default=None, gt=0, description="Well casing diameter in inches" + default=None, gt=0, description="Well casing diameter in feet" ) well_casing_depth: float | None = Field( default=None, gt=0, description="Well casing depth in feet" @@ -148,7 +148,7 @@ class WellResponse(BaseThingResponse): hole_depth: float | None = None hole_depth_unit: str = "ft" well_casing_diameter: float | None = None # in inches - well_casing_diameter_unit: str = "in" + well_casing_diameter_unit: str = "ft" well_casing_depth: float | None = None well_casing_depth_unit: str = "ft" well_casing_materials: list[CasingMaterial] = [] @@ -266,7 +266,7 @@ class UpdateWell(UpdateThing, ValidateWell): well_depth: float | None = None # in feet hole_depth: float | None = None # in feet well_construction_notes: str | None = None - well_casing_diameter: float | None = None # in inches + well_casing_diameter: float | None = None # in feet well_casing_depth: float | None = None # in feet well_casing_materials: list[str] | None = None diff --git a/tests/conftest.py b/tests/conftest.py index fae8aedaa..7ed6a12c8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -59,7 +59,7 @@ def water_well_thing(location): well_depth=10, hole_depth=10, well_construction_notes="Test well construction notes", - well_casing_diameter=5.0, + well_casing_diameter=1.0, well_casing_depth=10.0, ) session.add(water_well) diff --git a/tests/features/steps/api_fixture.py b/tests/features/steps/api_fixture.py index 041f6ed59..83cb8c30b 100644 --- a/tests/features/steps/api_fixture.py +++ b/tests/features/steps/api_fixture.py @@ -78,7 +78,7 @@ def add_well(location, wid): well_depth=10, hole_depth=10, well_construction_notes="Test well construction notes", - well_casing_diameter=5.0, + well_casing_diameter=1.0, well_casing_depth=10.0, ) session.add(well) diff --git a/tests/test_thing.py b/tests/test_thing.py index 03ab9ac09..eff9535ee 100644 --- a/tests/test_thing.py +++ b/tests/test_thing.py @@ -91,7 +91,7 @@ def test_add_water_well(location, group): "well_depth": 100.0, "hole_depth": 110, "well_construction_notes": "this is a test of notes", - "well_casing_diameter": 5.0, + "well_casing_diameter": 1.0, "well_casing_depth": 10.0, "well_casing_materials": ["PVC"], "well_purposes": ["Domestic"], @@ -113,7 +113,7 @@ def test_add_water_well(location, group): assert data["well_depth_unit"] == "ft" assert data["well_construction_notes"] == payload["well_construction_notes"] assert data["well_casing_diameter"] == payload["well_casing_diameter"] - assert data["well_casing_diameter_unit"] == "in" + assert data["well_casing_diameter_unit"] == "ft" assert data["well_casing_depth"] == payload["well_casing_depth"] assert data["well_casing_depth_unit"] == "ft" assert data["well_casing_materials"] == payload["well_casing_materials"] @@ -394,7 +394,7 @@ def test_get_water_wells(water_well_thing, location): data["items"][0]["well_casing_diameter"] == water_well_thing.well_casing_diameter ) - assert data["items"][0]["well_casing_diameter_unit"] == "in" + assert data["items"][0]["well_casing_diameter_unit"] == "ft" assert data["items"][0]["well_casing_depth"] == water_well_thing.well_casing_depth assert data["items"][0]["well_casing_depth_unit"] == "ft" assert data["items"][0]["well_casing_materials"] == [ @@ -427,7 +427,7 @@ def test_get_water_well_by_id(water_well_thing, location): assert data["hole_depth_unit"] == "ft" assert data["well_construction_notes"] == water_well_thing.well_construction_notes assert data["well_casing_diameter"] == water_well_thing.well_casing_diameter - assert data["well_casing_diameter_unit"] == "in" + assert data["well_casing_diameter_unit"] == "ft" assert data["well_casing_depth"] == water_well_thing.well_casing_depth assert data["well_casing_depth_unit"] == "ft" assert data["well_casing_materials"] == [