Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
883bff9
feat: add permissions transfer to the transfer process
jirhiker Dec 3, 2025
d87087c
fix: remvove duplicate 'Sangre de Cristo Center' entry in lexicon
jacob-a-brown Dec 3, 2025
fd48042
fix: remove duplicate 'Lamy MDWCA' entry from lexicon
jacob-a-brown Dec 3, 2025
2239654
fix: remove duplicate organizations from lexicon
jacob-a-brown Dec 4, 2025
5ae5501
refactor: put all mapped organizations into one file
jacob-a-brown Dec 4, 2025
30d73d4
fix: remove duplicate organizations from lexicon
jacob-a-brown Dec 4, 2025
e6ef31e
feat: refactor permission transfer logic and improve chunk processing
jirhiker Dec 4, 2025
34a4d4f
refactor: use single table to map companies to organizations
jacob-a-brown Dec 4, 2025
a7328e8
feat: refactor permission creation logic for water level and chemistr…
jirhiker Dec 4, 2025
722837c
refactor: improve error handling and logging in transfer processes
jirhiker Dec 4, 2025
5246830
feat: enhance value mapping and error handling in water levels transf…
jirhiker Dec 4, 2025
940247a
refactor: improve organization mapping logging in contact transfer pr…
jirhiker Dec 4, 2025
78e9463
feat: optimize groundwater level processing and improve error handlin…
jirhiker Dec 4, 2025
16e4ad7
refactor: standardize Santa Fe County names in lexicon
jacob-a-brown Dec 4, 2025
70f5ba3
note: write note about company --> organization mapping
jacob-a-brown Dec 4, 2025
e19b0a9
fix: validate organization enum in contact transfer
jacob-a-brown Dec 4, 2025
6de7807
refactor: rename 'Other' note type to 'General'
jacob-a-brown Dec 4, 2025
1c695d4
feat: improve error handling and streamline database interactions in …
jirhiker Dec 4, 2025
a922d13
refactor: move well_construction_notes to polymorphic notes table
jacob-a-brown Dec 4, 2025
0eb2fdc
feat: add stratigraphy transfer and improve value mapping error handling
jirhiker Dec 4, 2025
d1f9cd7
fix: use "General" for general notes in thing model
jacob-a-brown Dec 4, 2025
f7087b9
refactor: return specific note types rather than all notes at once
jacob-a-brown Dec 4, 2025
efb216b
refactor: update well notes test for general notes
jacob-a-brown Dec 4, 2025
ec8e5ce
fix: update and standardize categories
jacob-a-brown Dec 4, 2025
ca9744c
feat: enhance error handling and refactor well purposes extraction in…
jirhiker Dec 4, 2025
d8f5d5a
feat: update lexicon value retrieval to include row context in well t…
jirhiker Dec 4, 2025
afc7d06
feat: refactor well transfer to improve formation zone handling and e…
jirhiker Dec 4, 2025
3528af3
feat: enhance error handling in transfer processes and refactor error…
jirhiker Dec 4, 2025
5b8b771
Merge branch 'transfer' into jab-contact-organization-refactor
jirhiker Dec 4, 2025
c47a0c8
Formatting changes
jirhiker Dec 4, 2025
6b70a12
Merge pull request #269 from DataIntegrationGroup/jab-contact-organiz…
jirhiker Dec 4, 2025
3fc559b
fix: remove well construction notes from CreateWell
jacob-a-brown Dec 4, 2025
9c5b8a4
feat: add metrics for permissions and stratigraphy transfers in trans…
jirhiker Dec 4, 2025
cd2699f
refactor: transfer well and location notes to polymorphic notes table
jacob-a-brown Dec 4, 2025
821a2e7
feat: add Coordinate as note type to lexicon
jacob-a-brown Dec 4, 2025
82e9419
feat: add metrics for permissions and stratigraphy transfers in trans…
jirhiker Dec 4, 2025
b7bf0d4
feat: add organization validation and improve data retrieval in trans…
jirhiker Dec 4, 2025
c579f0a
feat: restore main function call in transfer script
jirhiker Dec 4, 2025
46f51bd
feat: update aquifer retrieval to indicate creation status
jirhiker Dec 4, 2025
72cfb40
feat: enhance formation code handling in well transfer process
jirhiker Dec 5, 2025
3b0cbce
feat: skip tests relying on external services and handle None aquifer…
jirhiker Dec 5, 2025
ac03573
feat: optimize well transfer process by removing redundant checks and…
jirhiker Dec 5, 2025
ce2a10c
feat: update lexicon value mapping in transfer utilities to remove de…
jirhiker Dec 5, 2025
4b3be04
feat: refactor aquifer system handling in well transfer process and e…
jirhiker Dec 5, 2025
6df269b
feat: reduce timeout for TIGER data retrieval and enable verbose logg…
jirhiker Dec 5, 2025
ff454f4
feat: enhance organization validation and improve logging verbosity i…
jirhiker Dec 5, 2025
4cb7b73
feat: enhance organization validation and improve logging verbosity i…
jirhiker Dec 5, 2025
a42e85a
feat: remove debug print statement from utility function in transfer …
jirhiker Dec 5, 2025
9d5db6c
Stream after-hook processing in WellTransferer
jirhiker Dec 5, 2025
0056c63
Formatting changes
jirhiker Dec 5, 2025
8d560fe
Merge pull request #273 from DataIntegrationGroup/codex/improve-execu…
jirhiker Dec 5, 2025
0a063b9
feat: optimize data processing in transfer functions and enhance logging
jirhiker Dec 5, 2025
587a748
feat: add validation error handling and improve error logging in tran…
jirhiker Dec 5, 2025
47a10b2
feat: refactor measuring point height handling and improve validation…
jirhiker Dec 5, 2025
35f329e
Merge branch 'transfer' into bdms-233-notes-transfer-and-updates
jirhiker Dec 5, 2025
047e2fa
Merge pull request #272 from DataIntegrationGroup/bdms-233-notes-tran…
jirhiker Dec 5, 2025
04b6505
feat: improve data validation and error handling in transfer process
jirhiker Dec 5, 2025
96ef406
feat: enhance asset transfer process with improved point ID handling …
jirhiker Dec 5, 2025
d119451
feat: improve error handling and logging in transfer processes
jirhiker Dec 5, 2025
f930c38
feat: update database port configuration for safety and improve doten…
jirhiker Dec 5, 2025
2926fe3
feat: update PostgreSQL port configuration for development environment
jirhiker Dec 5, 2025
b1c283b
feat: update test configuration for PostgreSQL connection and service…
jirhiker Dec 5, 2025
f46949b
feat: reorganize test configuration for improved readability and stru…
jirhiker Dec 5, 2025
a515739
feat: update test configuration for PostGIS service and environment v…
jirhiker Dec 5, 2025
5d1f0ff
feat: enhance contact transfer functionality with point ID filtering …
jirhiker Dec 6, 2025
57bfd12
feat: update test configuration to ignore transfer tests and rename t…
jirhiker Dec 6, 2025
1613136
feat: add temporary backwards compatibility for well construction not…
jirhiker Dec 6, 2025
6aeba98
feat: rename step method to asset_step for clarity and improve error …
jirhiker Dec 6, 2025
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
9 changes: 5 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ jobs:
# image: postgis/postgis:17-3.5
env:
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 54321
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
- 54321:5432

steps:
- name: Check out source repository
Expand All @@ -50,12 +51,12 @@ jobs:
env:
MODE: development
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_PORT: 54321
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DB_DRIVER: postgres

run: uv run pytest -vv --durations=20 --cov --cov-report=xml --junitxml=junit.xml
run: uv run pytest -vv --durations=20 --cov --cov-report=xml --junitxml=junit.xml --ignore=tests/transfers

- name: Checkout BDD repo (features only)
uses: actions/checkout@v4
Expand All @@ -71,7 +72,7 @@ jobs:
- name: Run BDD tests
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_PORT: 54321
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DB_DRIVER: postgres
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ repos:
always_run: true
args:
- -x
- --ignore=tests/transfers

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.10.0 # Use the latest stable version or pin to your preference
Expand Down
21 changes: 6 additions & 15 deletions core/lexicon.json
Original file line number Diff line number Diff line change
Expand Up @@ -376,30 +376,27 @@
{"categories": ["organization"], "term": "City of Aztec", "definition": "City of Aztec"},
{"categories": ["organization"], "term": "Daybreak Investments", "definition": "Daybreak Investments"},
{"categories": ["organization"], "term": "Vallecitos HOA", "definition": "Vallecitos HOA"},
{"categories": ["organization"], "term": "Naiche Development", "definition": "Naiche Corporation"},
{"categories": ["organization"], "term": "Santa Fe County; Santa Fe Animal Shelter", "definition": "Santa Fe County; Santa Fe Animal Shelter"},
{"categories": ["organization"], "term": "SFC, Santa Fe Animal Shelter", "definition": "Santa Fe County, Santa Fe Animal Shelter"},
{"categories": ["organization"], "term": "El Guicu Ditch Association", "definition": "El Guicu Ditch Association"},
{"categories": ["organization"], "term": "Santa Fe Municipal Airport", "definition": "Santa Fe Municipal Airport"},
{"categories": ["organization"], "term": "Uluru Development", "definition": "Uluru Development"},
{"categories": ["organization"], "term": "AllSup's Convenience Stores", "definition": "AllSup's Convenience Stores"},
{"categories": ["organization"], "term": "Santa Fe Downs", "definition": "Santa Fe Downs Resort"},
{"categories": ["organization"], "term": "Santa Fe Downs Resort", "definition": "Santa Fe Downs Resort"},
{"categories": ["organization"], "term": "City of Truth or Consequences, WWTP", "definition": "City of Truth or Consequences, WWTP"},
{"categories": ["organization"], "term": "Riverbend Hotsprings", "definition": "Riverbend Hotsprings"},
{"categories": ["organization"], "term": "Armendaris Ranch", "definition": "Armendaris Ranch"},
{"categories": ["organization"], "term": "El Paso Water", "definition": "El Paso Water"},
{"categories": ["organization"], "term": "BLM, Socorro Field Office", "definition": "BLM, Socorro Field Office"},
{"categories": ["organization"], "term": "USFWS", "definition": "US Fish & Wildlife Service"},
{"categories": ["organization"], "term": "NPS", "definition": "National Park Service"},
{"categories": ["organization"], "term": "Sile MDWCA", "definition": "Sile Municipal Domestic Water Assn."},
{"categories": ["organization"], "term": "Pena Blanca Water & Sanitation District", "definition": "Pena Blanca Water & Sanitation District"},
{"categories": ["organization"], "term": "Town of Questa", "definition": "Town of Questa"},
{"categories": ["organization"], "term": "Lamy MDWCA", "definition": "Lama MDWCA"},
{"categories": ["organization"], "term": "Town of Cerro", "definition": "Town of Cerro"},
{"categories": ["organization"], "term": "Farr Cattle Company", "definition": "Farr Cattle Company (Farr Ranch)"},
{"categories": ["organization"], "term": "Carrizozo Orchard", "definition": "Carrizozo Orchard"},
{"categories": ["organization"], "term": "USFS, Kiowa Grasslands", "definition": "USFS, Kiowa Grasslands"},
{"categories": ["organization"], "term": "Cloud Country West Subdivision", "definition": "Cloud Country West Subdivision"},
{"categories": ["organization"], "term": "Chama West Water Users Association", "definition": "Chama West Water Users Assn."},
{"categories": ["organization"], "term": "Chama West WUA", "definition": "Chama West Water Users Assn."},
{"categories": ["organization"], "term": "El Rito Regional Water and Waste Water Association", "definition": "El Rito Regional Water + Waste Water Association"},
{"categories": ["organization"], "term": "West Rim MDWUA", "definition": "West Rim MDWUA"},
{"categories": ["organization"], "term": "Village of Willard", "definition": "Village of Willard"},
Expand All @@ -422,7 +419,6 @@
{"categories": ["organization"], "term": "Lake Roberts WUA", "definition": "Lake Roberts Water Assn."},
{"categories": ["organization"], "term": "El Creston MDWCA", "definition": "El Creston MDWCA"},
{"categories": ["organization"], "term": "Reserve Municipality Water Works", "definition": "Reserve Municipality Water Works"},
{"categories": ["organization"], "term": "Bayard", "definition": "Bayard Municipal Water"},
{"categories": ["organization"], "term": "Town of Estancia", "definition": "Town of Estancia"},
{"categories": ["organization"], "term": "Pie Town MDWCA", "definition": "Pie Town MDWCA"},
{"categories": ["organization"], "term": "Roosevelt SWCD", "definition": "Roosevelt Soil & Water Conservation District"},
Expand All @@ -438,7 +434,7 @@
{"categories": ["organization"], "term": "Pinon Ridge WUA", "definition": "Pinon Ridge Water Users Association"},
{"categories": ["organization"], "term": "McSherry Farms", "definition": "McSherry Farms"},
{"categories": ["organization"], "term": "Agua Sana WUA", "definition": "Agua Sana Water Users Assn."},
{"categories": ["organization"], "term": "Chamita MDWCA", "definition": "Chamita Water Users Association"},
{"categories": ["organization"], "term": "Chamita MDWCA", "definition": "Chamita Mutual Domestic Water Consumers Assn."},
{"categories": ["organization"], "term": "W Spear-bar Ranch", "definition": "W Spear-bar Ranch"},
{"categories": ["organization"], "term": "Village of Capitan", "definition": "Village of Capitan"},
{"categories": ["organization"], "term": "Brazos MDWCA", "definition": "Brazos Mutual Domestic Water Consumers Assn."},
Expand Down Expand Up @@ -597,14 +593,9 @@
{"categories": ["organization"], "term": "Rio En Medio MDWCA", "definition": "Rio En Medio MDWCA"},
{"categories": ["organization"], "term": "San Acacia MDWCA", "definition": "San Acacia MDWCA"},
{"categories": ["organization"], "term": "San Juan Residences", "definition": "San Juan Residences"},
{"categories": ["organization"], "term": "Sangre de Cristo Center", "definition": "Sangre de Cristo Center"},
{"categories": ["organization"], "term": "Sangre de Cristo Estates", "definition": "Sangre de Cristo Estates"},
{"categories": ["organization"], "term": "Santa Fe Community College", "definition": "Santa Fe Community College"},
{"categories": ["organization"], "term": "Santa Fe County, Fire Facilities", "definition": "Santa Fe County, Fire Facilities"},
{"categories": ["organization"], "term": "Santa Fe County, Utilities Dept.", "definition": "Santa Fe County, Utilities Dept."},
{"categories": ["organization"], "term": "Sangre de Cristo Center", "definition": "Sangre de Cristo Center"},
{"categories": ["organization"], "term": "Valle Vista Water Utility", "definition": "Valle Vista Water Utility"},
{"categories": ["organization"], "term": "Santa Fe County, Valle Vista Water Utility, Inc.", "definition": "Santa Fe County, Valle Vista Water Utility, Inc."},
{"categories": ["organization"], "term": "Santa Fe Horse Park", "definition": "Santa Fe Horse Park"},
{"categories": ["organization"], "term": "Santa Fe Opera", "definition": "Santa Fe Opera"},
{"categories": ["organization"], "term": "Santa Fe Waldorf School", "definition": "Santa Fe Waldorf School"},
Expand Down Expand Up @@ -651,7 +642,6 @@
{"categories": ["organization"], "term": "Yates Petroleum Corporation", "definition": "Yates Petroleum Corporation"},
{"categories": ["organization"], "term": "Zamora Accounting Services", "definition": "Zamora Accounting Services"},
{"categories": ["organization"], "term": "PLSS", "definition": "Public Land Survey System"},
{"categories": ["organization"], "term": "Quemado Municipal Water & SWA", "definition": "Quemado Municipal Water & SWA"},
{"categories": ["collection_method"], "term": "Altimeter", "definition": "ALtimeter"},
{"categories": ["collection_method"], "term": "Differentially corrected GPS", "definition": "Differentially corrected GPS"},
{"categories": ["collection_method"], "term": "Survey-grade GPS", "definition": "Survey-grade GPS"},
Expand Down Expand Up @@ -1176,9 +1166,10 @@
{"categories": ["note_type"], "term": "Construction", "definition": "Construction details, well development, drilling notes, etc. Could create separate `types` for each of these if needed."},
{"categories": ["note_type"], "term": "Maintenance", "definition": "Maintenance observations and issues."},
{"categories": ["note_type"], "term": "Historical", "definition": "Historical information or context about the well or location."},
{"categories": ["note_type"], "term": "Other", "definition": "Other types of notes that do not fit into the predefined categories."},
{"categories": ["note_type"], "term": "General", "definition": "Other types of notes that do not fit into the predefined categories."},
{"categories": ["note_type"], "term": "Water", "definition": "Water bearing zone information and other info from ose reports"},
{"categories": ["note_type"], "term": "Measuring", "definition": "Notes about measuring/visiting the well, on Access form"},
{"categories": ["note_type"], "term": "Coordinate", "definition": "Notes about a location's coordinates"},
{"categories": ["well_pump_type"], "term": "Submersible", "definition": "Submersible"},
{"categories": ["well_pump_type"], "term": "Jet", "definition": "Jet Pump"},
{"categories": ["well_pump_type"], "term": "Line Shaft", "definition": "Line Shaft"},
Expand Down
23 changes: 14 additions & 9 deletions db/thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ===============================================================================
from typing import List, TYPE_CHECKING
from datetime import date
from sqlalchemy import Integer, ForeignKey, String, Column, Float, Text, Date
from typing import List, TYPE_CHECKING

from sqlalchemy import Integer, ForeignKey, String, Column, Float, Date
from sqlalchemy.ext.associationproxy import association_proxy, AssociationProxy
from sqlalchemy.orm import relationship, mapped_column, Mapped
from sqlalchemy_utils import TSVectorType
Expand All @@ -27,11 +28,10 @@
Base,
ReleaseMixin,
)
from db.data_provenance import DataProvenanceMixin
from db.measuring_point_history import MeasuringPointHistory
from db.permission_history import PermissionHistoryMixin
from services.util import retrieve_latest_polymorphic_history_table_record
from db.status_history import StatusHistoryMixin
from db.measuring_point_history import MeasuringPointHistory
from db.data_provenance import DataProvenanceMixin
from services.util import retrieve_latest_polymorphic_history_table_record

if TYPE_CHECKING:
Expand Down Expand Up @@ -117,8 +117,6 @@ class Thing(
comment="Depth of the well casing from ground surface to the bottom of the casing (in feet).",
)

well_construction_notes: Mapped[str] = mapped_column(Text, nullable=True)

well_completion_date: Mapped[date] = mapped_column(
nullable=True, comment="the date the well was completed if known"
)
Expand Down Expand Up @@ -348,7 +346,10 @@ class Thing(
)

# Full-text search vector
search_vector = Column(TSVectorType("name", "well_construction_notes"))
search_vector = Column(TSVectorType("name"))

# for temporary backwards compatibility
well_construction_notes = mapped_column(String(1000), nullable=True)

@property
def current_location(self):
Expand All @@ -372,12 +373,16 @@ def water_notes(self):

@property
def general_notes(self):
return self._get_notes("Other")
return self._get_notes("General")

@property
def measuring_notes(self):
return self._get_notes("Measuring")

@property
def construction_notes(self):
return self._get_notes("Construction")

@property
def well_status(self) -> str | None:
"""
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- 5432:5432
- 54321:5432
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
Expand Down
55 changes: 25 additions & 30 deletions schemas/thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
ScreenType,
Organization,
MonitoringFrequency,
Organization,
MonitoringFrequency,
WellConstructionMethod,
WellPumpType,
FormationCode,
Expand All @@ -36,14 +34,15 @@
from schemas.notes import NoteResponse, CreateNote
from schemas.permission_history import PermissionHistoryResponse


# -------- VALIDATE ----------


class ValidateWell(BaseModel):
well_depth: float | None = None # in feet
hole_depth: float | None = None # in feet
well_casing_depth: float | None = None # in feet
measuring_point_height: float | None = None # in feet
measuring_point_height: float | None = None

@model_validator(mode="after")
def validate_values(self):
Expand All @@ -60,24 +59,24 @@ def validate_values(self):
"well casing depth must be less than or equal to hole depth"
)

if self.measuring_point_height is not None:
if (
self.hole_depth is not None
and self.measuring_point_height >= self.hole_depth
):
raise ValueError("measuring point height must be less than hole depth")
elif (
self.well_casing_depth is not None
and self.measuring_point_height >= self.well_casing_depth
):
raise ValueError(
"measuring point height must be less than well casing depth"
)
elif (
self.well_depth is not None
and self.measuring_point_height >= self.well_depth
):
raise ValueError("measuring point height must be less than well depth")
# if self.measuring_point_height is not None:
# if (
# self.hole_depth is not None
# and self.measuring_point_height >= self.hole_depth
# ):
# raise ValueError("measuring point height must be less than hole depth")
# elif (
# self.well_casing_depth is not None
# and self.measuring_point_height >= self.well_casing_depth
# ):
# raise ValueError(
# "measuring point height must be less than well casing depth"
# )
# elif (
# self.well_depth is not None
# and self.measuring_point_height >= self.well_depth
# ):
# raise ValueError("measuring point height must be less than well depth")

return self

Expand Down Expand Up @@ -122,17 +121,15 @@ class CreateWell(CreateBaseThing, ValidateWell):
hole_depth: float | None = Field(
default=None, gt=0, description="Hole depth in feet"
)
well_construction_notes: str | None = None
well_casing_diameter: float | None = Field(
default=None, gt=0, description="Well casing diameter in inches"
)
well_casing_depth: float | None = Field(
default=None, gt=0, description="Well casing depth in feet"
)
well_casing_materials: list[CasingMaterial] | None = None
measuring_point_height: float = Field(
ge=0, description="Measuring point height in feet"
)

measuring_point_height: float = Field(description="Measuring point height in feet")
measuring_point_description: str | None = None
notes: list[CreateNote] | None = None
well_completion_date: PastOrTodayDate | None = None
Expand Down Expand Up @@ -195,13 +192,11 @@ class BaseThingResponse(BaseResponseModel):
thing_type: str
current_location: LocationGeoJSONResponse
first_visit_date: PastOrTodayDate | None
# The new relationship to the polymorphic Notes table
notes: List[NoteResponse] = []

groups: list[GroupResponse] = []
monitoring_status: str | None
links: list[ThingIdLinkResponse] = Field(default=[], alias="alternate_ids")
monitoring_frequencies: list[MonitoringFrequencyResponse] = []
general_notes: list[NoteResponse] | None = None

@field_validator("monitoring_frequencies", mode="before")
def remove_records_with_end_date(cls, monitoring_frequencies):
Expand Down Expand Up @@ -234,7 +229,6 @@ class WellResponse(BaseThingResponse):
well_casing_depth: float | None = None
well_casing_depth_unit: str = "ft"
well_casing_materials: list[CasingMaterial] = []
well_construction_notes: str | None = None
well_completion_date: PastOrTodayDate | None
well_completion_date_source: str | None
well_driller_name: str | None
Expand All @@ -251,7 +245,8 @@ class WellResponse(BaseThingResponse):
aquifers: list[dict] = []
water_notes: list[NoteResponse] | None = None
measuring_notes: list[NoteResponse] | None = None
general_notes: list[NoteResponse] | None = None

construction_notes: list[NoteResponse] | None = None
permissions: list[PermissionHistoryResponse]
formation_completion_code: FormationCode | None

Expand Down
2 changes: 1 addition & 1 deletion services/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def get_tiger_data(
"returnGeometry": "false",
}
try:
resp = httpx.get(url, params=params, timeout=30)
resp = httpx.get(url, params=params, timeout=5)
except Exception as e:
print(f"Error getting TIGER data for POINT ({lon} {lat}) {e}")
return None
Expand Down
5 changes: 5 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@
# ===============================================================================
# Load .env file BEFORE importing anything else
# Use override=True to override conflicting shell environment variables
import os

from dotenv import load_dotenv

load_dotenv(override=True)

# for safety dont test on the production database port
os.environ["POSTGRES_PORT"] = "54321"

# this should not be needed since all Pydantic serializes all datetimes as UTC
# furthermore, tzset is not supported on Windows, so this breaks cross-platform compatibility
# # Set timezone to UTC for consistent datetime handling in tests
Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def water_well_thing(location):
release_status="draft",
well_depth=10,
hole_depth=10,
well_construction_notes="Test well construction notes",
well_casing_diameter=5.0,
well_casing_depth=10.0,
)
Expand Down
Loading