Commit Graph

3 Commits

Author SHA1 Message Date
agessaman 8f04d8ceb6 refactor(shared): create shared/parsers/ for path and packet parsing
Extracts canonical path-parsing and packet-hashing logic from
modules/utils.py into shared/parsers/path_parser.py and
shared/parsers/packet_parser.py, eliminating duplication across
three prior implementations. All callers updated to import from
shared.parsers.*; modules/utils.py re-exports via shared imports
for any remaining internal callers. 2866 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 20:50:59 -07:00
agessaman 7042059d6d refactor(shared): extract geocoding and text utilities into shared/
Move geocoding functions (calculate_distance, Nominatim wrappers, geocode_city/zipcode,
location normalization) from modules/utils.py to shared/geocoding.py.

Move text formatting functions (abbreviate_location, truncate_string,
decode_escape_sequences, format_location_for_display, format_elapsed_display)
to shared/text_utils.py.

utils.py shrinks from 2,447 to ~1,125 lines. Update imports across ~25 files.
No logic changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 17:36:11 -07:00
agessaman 23da88c37d refactor(shared): create shared/ package and migrate foundation modules
Move models.py, db_manager.py, db_migrations.py, and security_utils.py
from modules/ to a new shared/ top-level package that can be imported by
both the bot and the web viewer without coupling them.

Update all imports across ~75 files (commands, service plugins, tests,
web viewer, generate_website.py). No logic changes — pure file moves and
import path updates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 17:19:46 -07:00