Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions db/thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions schemas/thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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] = []
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/features/steps/api_fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions tests/test_thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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"]
Expand Down Expand Up @@ -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"] == [
Expand Down Expand Up @@ -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"] == [
Expand Down
Loading