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>
- Enhanced .gitignore to allow test files in the tests/ directory and committed pytest.ini for test discovery.
- Added checks for missing sections in configuration files, specifically for Admin_ACL and Banned_Users, to prevent errors during bot startup.
- Updated generate_website.py and command_manager.py to handle cases where required sections are absent, returning empty lists instead of raising exceptions.
- Introduced optional dependencies for testing in pyproject.toml, ensuring a smoother development experience.
- Improved localization handling in core.py to default to English when the Localization section is missing, enhancing user experience.