Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/
The crawler subdirectory was the only active project. Moving it to the repo root simplifies paths and removes the unnecessary nesting. The vqa/ and immoweb/ directories were legacy/unused and have been removed. Updated .drone.yml, .gitignore, .claude/ docs, and skills to reflect the new flat structure.
This commit is contained in:
parent
e2247be700
commit
eafbc1ac52
221 changed files with 70 additions and 146140 deletions
37
services/district_service.py
Normal file
37
services/district_service.py
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
"""Unified district service - shared between CLI and HTTP API."""
|
||||
from rec.districts import get_districts as _get_districts
|
||||
|
||||
|
||||
def get_all_districts() -> dict[str, str]:
|
||||
"""Get all available districts with their region IDs.
|
||||
|
||||
Used by:
|
||||
- CLI: --district option choices
|
||||
- API: GET /api/get_districts
|
||||
|
||||
Returns:
|
||||
Dictionary mapping district names to region IDs
|
||||
"""
|
||||
return _get_districts()
|
||||
|
||||
|
||||
def get_district_names() -> list[str]:
|
||||
"""Get list of all district names.
|
||||
|
||||
Returns:
|
||||
List of district names
|
||||
"""
|
||||
return list(_get_districts().keys())
|
||||
|
||||
|
||||
def validate_districts(district_names: list[str]) -> list[str]:
|
||||
"""Validate that district names exist.
|
||||
|
||||
Args:
|
||||
district_names: List of district names to validate
|
||||
|
||||
Returns:
|
||||
List of invalid district names (empty if all valid)
|
||||
"""
|
||||
valid_districts = set(_get_districts().keys())
|
||||
return [d for d in district_names if d not in valid_districts]
|
||||
Loading…
Add table
Add a link
Reference in a new issue