Remove TRREB references from Python modules and SQLAlchemy models #49

Closed
opened 2026-01-16 14:54:09 +00:00 by lmiranda · 0 comments
Owner

Description

Update Python module init files and SQLAlchemy model files to remove all TRREB imports and class definitions.

Branch: feature/9-cleanup

Reference: docs/changes/Change-Toronto-Analysis-Reviewed.md - Phase 1

Files to MODIFY

File Action
portfolio_app/toronto/schemas/__init__.py Remove TRREB schema imports
portfolio_app/toronto/parsers/__init__.py Remove TRREB parser imports
portfolio_app/toronto/loaders/__init__.py Remove TRREB loader imports
portfolio_app/toronto/models/facts.py Remove FactPurchases model class
portfolio_app/toronto/models/dimensions.py Remove DimTRREBDistrict model class
portfolio_app/toronto/demo_data.py Remove TRREB demo data generation

Acceptance Criteria

  • All __init__.py files have no TRREB imports
  • FactPurchases class removed from models/facts.py
  • DimTRREBDistrict class removed from models/dimensions.py
  • demo_data.py has no TRREB data generation code
  • python -c "from portfolio_app.toronto.models import facts, dimensions" succeeds
  • Application starts without import errors (make run)
  • All remaining imports and __all__ exports are consistent

Technical Notes

  • Keep CMHC-related models and imports intact
  • Keep base classes (Base, FactBase, etc.)
  • Ensure __all__ lists in __init__.py files are updated
  • SQLAlchemy models may have relationships that need careful removal

Sprint

Sprint 9 - Phase 1 (Cleanup)

Labels: Type/Refactor, Priority/High, Efforts/M, Component/Backend, Component/Database, Tech/Python

## Description Update Python module init files and SQLAlchemy model files to remove all TRREB imports and class definitions. **Branch:** `feature/9-cleanup` **Reference:** `docs/changes/Change-Toronto-Analysis-Reviewed.md` - Phase 1 ## Files to MODIFY | File | Action | |------|--------| | `portfolio_app/toronto/schemas/__init__.py` | Remove TRREB schema imports | | `portfolio_app/toronto/parsers/__init__.py` | Remove TRREB parser imports | | `portfolio_app/toronto/loaders/__init__.py` | Remove TRREB loader imports | | `portfolio_app/toronto/models/facts.py` | Remove `FactPurchases` model class | | `portfolio_app/toronto/models/dimensions.py` | Remove `DimTRREBDistrict` model class | | `portfolio_app/toronto/demo_data.py` | Remove TRREB demo data generation | ## Acceptance Criteria - [ ] All `__init__.py` files have no TRREB imports - [ ] `FactPurchases` class removed from `models/facts.py` - [ ] `DimTRREBDistrict` class removed from `models/dimensions.py` - [ ] `demo_data.py` has no TRREB data generation code - [ ] `python -c "from portfolio_app.toronto.models import facts, dimensions"` succeeds - [ ] Application starts without import errors (`make run`) - [ ] All remaining imports and `__all__` exports are consistent ## Technical Notes - Keep CMHC-related models and imports intact - Keep base classes (`Base`, `FactBase`, etc.) - Ensure `__all__` lists in `__init__.py` files are updated - SQLAlchemy models may have relationships that need careful removal ## Sprint Sprint 9 - Phase 1 (Cleanup) **Labels:** Type/Refactor, Priority/High, Efforts/M, Component/Backend, Component/Database, Tech/Python
lmiranda added this to the Launch: Host, Bio and Toronto House Market Analysis project 2026-01-16 14:55:49 +00:00
lmiranda self-assigned this 2026-01-16 14:55:54 +00:00
lmiranda moved this to To Do in Launch: Host, Bio and Toronto House Market Analysis on 2026-01-16 14:56:01 +00:00
lmiranda moved this to Done in Launch: Host, Bio and Toronto House Market Analysis on 2026-01-16 15:33:52 +00:00
Sign in to join this conversation.