Repository navigation
·
68 commits
to Limnoria-Weather
since this release
Weather v1.0.0
Initial stable release of the Limnoria Weather plugin.
What's new
Core changes
-
Replaced per-request
aiohttp.ClientSessioncreation with a single persistent session, created at plugin start and closed cleanly on shutdown. -
Added
_create_session()async helper and proper event-loop lifecycle management viaasyncio.new_event_loop(). -
Set
threaded = Trueto prevent blocking the bot during API calls. -
Added graceful teardown in
die()— session and event loop are closed with logged warnings on failure.
Code quality
- Explicit
encoding="utf-8"on all JSON file I/O (load_db/flush_db). - Import error now raised as
ImportErrorinstead of bareException. - User-Agent header updated to
Limnoria-Weather/1.0 (+<https://github.com/Alcheri/Weather>). - UV index source attribution updated to the Australian Bureau of Meteorology (BOM).
- Code formatted with
psf/black; line endings normalised to LF.
Tests & docs
- Baseline test suite added (
WeatherTestCase,WeatherSmokeTestCase). - Plugin docstring updated to document
weather,weather --forecast, andsetcommands. - Architecture flowchart added (
Flowchart.md/Weather_Flowchart.png).
Requirements
- Python ≥ 3.10
- aiohttp
- OpenWeather API key
- Google Maps API key