Skip to content

feat(sources): wire tarrant county source and fix hud fmr token selection - #332

Merged
paruff merged 10 commits into
mainfrom
refactor/finance-utils-split
Aug 1, 2026
Merged

feat(sources): wire tarrant county source and fix hud fmr token selection#332
paruff merged 10 commits into
mainfrom
refactor/finance-utils-split

Conversation

@paruff

@paruff paruff commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Wired Tarrant County (TX Constable Precinct 3 Monthly Tax Sales) using Playwright-based HTML fetching in (verified 23 live listings).
  • Fixed HUD FMR and IL integration clients (, , , ) to correctly prefer over .
  • Added setting in .
  • Added a live integration test suite () and a Makefile target, registered the pytest marker, and adjusted pytest exclusions.
  • All pre-commit checks, ruff formatting, and mypy type checks pass cleanly.

paruff added 10 commits July 31, 2026 09:51
Split the 2,347-line investor_app/finance/utils.py into mortgage,
taxes, scoring, and strategies submodules; utils.py now holds only
core KPI primitives and the Django-coupled analysis. Update all 17
importers to canonical locations.

Resolve LIMIT-20: delete the calculate_* aliases, the dead
score_listing_v1 chain, the duplicate pure score_listing_v2, and the
unused service-layer calculate_noi in property_service.py. Mark
LIMIT-20 resolved in docs/KNOWN_LIMITATIONS.md.

Full suite: 1803 passed. Ruff + mypy clean on touched files.
…ervices

Port discovery, screening, underwriting, and offer math from the pydantic
prei package into pydantic-free Django services under core/services/.
Offer math now uses Decimal (resolves LIMIT-21). Both view bridges (Growth
Explorer, VRM pipeline) call core.services; persistence stays on
PipelineProperty via process_discovery.

- delete prei/ entirely (models, pipeline, api, cli, tests)
- move landlord_data.py to core/services/
- migrate 9 test files + BDD steps to core.services.*
- drop fastapi/uvicorn/click; keep pydantic for acceptance tests
- update KNOWN_LIMITATIONS, ARCHITECTURE, CHANGE_IMPACT_MAP

Suite: 1791 passed, 1 skipped, 256 deselected. ruff clean.
PYTHON now resolves to .venv/bin/python when present, avoiding the Apple
/usr/bin/python3 shim that triggers the xcode-select reinstall prompt.
Docker exec targets use CONTAINER_PY (containers have no venv).
…test suite

- core/services/sources/county.py: implement Playwright-based fetch for Tarrant County
  Monthly Tax Sales; add _fetch_via_playwright helper; verified 23 listings
- core/integrations/market/hud_fmr.py: FMRClient now prefers HUD_FMR_TOKEN over HUD_API_KEY
- core/integrations/market/fmr_adapter.py: fetch_fmr_entity_id prefers HUD_FMR_TOKEN
- core/integrations/market/hud_il.py: ILClient and fetch_area_median_income prefer HUD_FMR_TOKEN
- investor_app/settings.py: export HUD_FMR_TOKEN setting
- pytest.ini: register live marker; remove live from default -k exclusion
- Makefile: add test-live-sources target
- core/tests/test_live_sources.py: 9 live integration tests for Tarrant, VRM, HUD FMR, Census, FRED
- pytest.ini: add unit, smoke, acceptance markers; default -m 'unit or integration'
- conftest.py: auto-assign layer markers by file path (acceptance, e2e, smoke, live)
- 11 pure unit test files: explicit pytestmark = pytest.mark.unit
- ci-quality.yml: unit/integration/e2e jobs use -m markers instead of -k keywords
- Makefile: test targets use -m markers; fixed duplicate test-acceptance
- .coveragerc: restored with prei removed from sources

Markers: unit (792), integration (1164), e2e (42), acceptance (41), live (9), smoke (9)
The pytest.ini default -m 'unit or integration' was filtering out acceptance tests.
The acceptance-check job now explicitly uses -m acceptance.
Integration tests exercise the PDF export endpoint which launches a
Playwright browser; the e2e job already installed it but integration
did not.
@paruff
paruff merged commit 3446ebe into main Aug 1, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant