Recent Releases of env_canada

env_canada - v0.15.0

Changes

  • ECMap / ECRadar: Replace WMS-fetched legend with locally generated horizontal legends for all three radar layers (rain, snow, precip_type), matching the Environment Canada weather map style
  • ECMap / ECRadar: Bundle DejaVu Sans font for legend labels and timestamp overlay, replacing the old bitmap font
  • ECMap: Fix composite cache key to include language so EN/FR frames are cached independently

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 2 months ago

env_canada - v0.14.1

Changes

  • ECHistorical: Add support for alphanumeric climate IDs (#132)

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie 2 months ago

env_canada - v0.14.0

Changes

  • ECHistorical: Switch from station ID to climate ID for historical weather data queries

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie 3 months ago

env_canada - v0.13.2

Bug Fixes

  • ECAlerts: Fix over-reporting of alerts by replacing the bounding-box-only approach with a 50 km BBOX pre-filter combined with client-side point-in-polygon filtering, so only alerts whose coverage polygon actually contains the queried coordinates are returned

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie 3 months ago

env_canada - v0.13.1

Bug Fixes

  • ECWeather: Fix TypeError crash when forecast period or text summary is None (#130)

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie 3 months ago

env_canada - v0.13.0

New Features

  • ECAlerts: New class providing weather alerts from the GeoMet WFS Current-Alerts layer with richer data than the XML source: full alert text, affected area, risk colour, confidence, and impact
  • ECWeather: update() now uses ECAlerts internally; falls back to XML alerts on failure. New alert_features property exposes raw WFS feature properties

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie 3 months ago

env_canada - v0.12.4

New Features

  • Cache: Add Cache.clear() class method to clear cache entries by prefix or all entries
  • ECMap: Add clear_cache() method to clear cached basemap, layer, legend, and capabilities data for a map instance
  • ECRadar: Add clear_cache() method to clear cached radar data, useful when changing precip_type to ensure fresh images are fetched

Background

This release adds public API methods to support the Home Assistant integration fix in home-assistant/core#156152. The new clear_cache() methods allow clearing cached radar images when changing precipitation type, without requiring access to private members.

Usage

radar = ECRadar(coordinates=(50, -100), precip_type="rain")
await radar.update()

# When changing precip type, clear the cache first
radar.clear_cache()
radar.precip_type = "snow"
await radar.update()

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie 5 months ago

env_canada - v0.12.3

Bug Fixes

  • ECWeather: Fix alert endings not being parsed from Environment Canada data
    • Changed ALERT_TYPE_TO_NAME mapping from "ending" to "ended" to match actual XML attribute values
    • Fixes issue where "Endings" sensor always showed 0 despite ended alerts being present in the data

Fixes home-assistant/core#161493

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie 5 months ago

env_canada - v0.12.2

New Features

  • ECWeather: Add support for parsing hourly UV index from Environment Canada data
  • ECWeather: Add additional alert variables including alert_level, alert_type, and alert_region for enhanced weather alert information

Documentation

  • README: Update documentation and examples

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie 6 months ago

env_canada - v0.12.1

Bug Fixes

  • Packaging: Fix font file inclusion in wheel distribution
    • Replace package-dir with explicit package-data declaration
    • Ensures 10x20.pil and 10x20.pbm files are included in installed package
    • Fixes FileNotFoundError when rendering radar timestamps

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie 8 months ago

env_canada - v0.12.0

New Features

  • get_ec_sites_list: Add new async function for UI dropdown selection
    • Returns formatted list of weather stations with city/province labels
    • Provides 3-digit station codes as values for easy integration
    • Designed for use in Home Assistant config flows and other UIs

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie 8 months ago

env_canada - v0.11.3

Bug Fixes

  • API URLs: Update Environment Canada API URLs to use new 'today' endpoint structure
    • ECWeather: Updated SITE_LIST_URL to site_list_towns_en.csv
    • ECHydro: Updated URLs to use 'today' path prefix
    • ECAQHI: Updated URLs to use 'today' path prefix
    • Fixes 404 errors from outdated URL endpoints
  • ECHydro: Fix test to handle optional discharge measurements

Infrastructure

  • Remove unused dependencies: imageio and numpy

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie 8 months ago

env_canada - v0.11.2

Bug Fixes

  • ECMap: Fix multi-instance caching issue where different geographic locations shared cached data
    • Cache keys now include location-specific prefix to prevent data sharing between coordinates
    • Ensures each ECRadar/ECMap instance maintains separate caches for basemap, legend, and radar overlays

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 1 year ago

env_canada - v0.11.1

Bug Fixes

  • ECWeather: Fix Home Assistant compatibility issue with station ID handling
    • Keep station_id as string for external API compatibility
    • Move one-time initialization from update() to _resolve_station() method for better performance
    • Add station_tuple property for accessing internal tuple representation
    • Update validate_station to return input unchanged instead of extracting digits

Technical Details

This release addresses a TypeError that occurred in Home Assistant integrations when validate_station received a tuple instead of a string. The fix maintains backward compatibility while improving performance by moving expensive initialization operations to run only once per instance.

Migration Notes

  • External API users: No changes required - station_id remains a string
  • Internal library users: Use station_tuple property if you need the (province_code, station_number) tuple

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 1 year ago

env_canada - Release v0.11.0

env_canada v0.11.0

Major Features

New ECMap Class

Complete weather map functionality using Environment Canada's WMS layers:

  • Support for rain, snow, and precipitation type radar layers
  • Dynamic legend discovery from WMS capabilities
  • Customizable map dimensions, radius, opacity, and overlay options
  • Animated GIF creation for weather loops
  • Full English/French language support

New Features

Flexible Station ID Formats

Support for multiple station ID input formats:

  • Full format: "AB/s0000123" (province code and full station ID)
  • Station ID only: "s0000123" (province resolved automatically)
  • Numeric only: "123" (just the station number)

Dynamic File Discovery

Automatic handling of Environment Canada's new timestamped weather file format (effective June 2025)

Enhanced ECRadar

Now uses ECMap as internal implementation while maintaining full backward compatibility

Improvements

  • Mapbox dependency removed: Now exclusively uses Canadian government data sources (Natural Resources Canada + Environment Canada)
  • Proper logging: Module-specific loggers throughout codebase
  • Enhanced error handling: Robust network failure handling and caching
  • Station ID validation: Improved validation with regex patterns and automatic province resolution
  • Type safety: Full mypy compliance and enhanced type annotations

Infrastructure

  • Automatic adaptation to Environment Canada's infrastructure changes
  • Enhanced test coverage with comprehensive mocking
  • Support for dynamic URL structure discovery

Installation

pip install env-canada==0.11.0

Full Changelog

https://github.com/michaeldavie/env_canada/blob/v0.11.0/CHANGELOG.md

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 1 year ago

env_canada - Fix alerts growing in size.

What's Changed

New Contributors

Full Changelog: https://github.com/michaeldavie/env_canada/compare/0.10.1...0.10.2

Sustainable Development - Data Catalogs and Interfaces - Python
Published by gwww about 1 year ago

env_canada - 0.10.1

What's Changed

  • Fix dependency for geopy

Sustainable Development - Data Catalogs and Interfaces - Python
Published by gwww about 1 year ago

env_canada - v0.10.0

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.9.0...0.10.0

Sustainable Development - Data Catalogs and Interfaces - Python
Published by gwww about 1 year ago

env_canada - v0.9.0

What's Changed

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.8.0...v0.9.0

Sustainable Development - Data Catalogs and Interfaces - Python
Published by gwww about 1 year ago

env_canada - v0.8.0

What's Changed

New Contributors

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.7.2...v0.8.0

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 1 year ago

env_canada - v0.7.2

What's Changed

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.7.1...v0.7.2

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 2 years ago

env_canada - v0.7.1

What's Changed

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.7.0...v0.7.1

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 2 years ago

env_canada - v0.6.3

What's Changed

New Contributors

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.6.2...v0.6.3

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 2 years ago

env_canada - v0.7.0

What's Changed

New Contributors

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.6.2...v0.7.0

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 2 years ago

env_canada - v0.6.2

What's Changed

New Contributors

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.6.1...v0.6.2

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 2 years ago

env_canada - v0.6.1

Dependency updates

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.6.0...v0.6.1

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 2 years ago

env_canada - v0.6.0

What's Changed

New Contributors

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.37...v0.6.0

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 2 years ago

env_canada - v0.5.37

What's Changed

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.36...v0.5.37

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 2 years ago

env_canada - v0.5.36

What's Changed

New Contributors

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.35...v0.5.36

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 3 years ago

env_canada - v0.5.35

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.34...v0.5.35

  • Add wind speed and direction to hourly forecasts
  • Handle missing AQHI forecasts
  • Fixes for dependency changes

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 3 years ago

env_canada - v0.5.34

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.33...v0.5.34

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 3 years ago

env_canada - v0.5.33

Bug fix for handling unexpected strings in numeric conditions.

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.32...v0.5.33

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 3 years ago

env_canada - v0.5.32

Generalize handling unexpected string values in numeric fields.

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.31...v0.5.32

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 3 years ago

env_canada - v0.5.31

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.30...v0.5.31

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 3 years ago

env_canada - v0.5.30

What's Changed

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.29...v0.5.30

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 3 years ago

env_canada - v0.5.29

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.28...v0.5.29

  • Handle forecast temperatures of 0ΒΊ

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 3 years ago

env_canada - v0.5.28

Raise an error on old weather data

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.27...v0.5.28

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 3 years ago

env_canada - v0.5.27

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.26...v0.5.27

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 3 years ago

env_canada - v0.5.26

What's Changed

New Contributors

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.25...v0.5.26

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 3 years ago

env_canada - v0.5.25

What's Changed

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.24...v0.5.25

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 4 years ago

env_canada - v0.5.24

What's Changed

New Contributors

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.23...v0.5.24

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 4 years ago

env_canada - v0.5.23

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.22...v0.5.23

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 4 years ago

env_canada - v0.5.22

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.21...v0.5.22

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 4 years ago

env_canada - v0.5.21

What's Changed

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.20...v0.5.21

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 4 years ago

env_canada - v0.5.20

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.19...v0.5.20

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.19

Work around GeoGratis map service outage

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.18...v0.5.19

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.18

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.17...v0.5.18

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.17

What's Changed

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.16...v0.5.17

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.16

Fixes #52

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.15...v0.5.16

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.15

What's Changed

New Contributors

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.14...v0.5.15

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.14

What's Changed

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.5.13...v0.5.14

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.2.7

What's Changed

Full Changelog: https://github.com/michaeldavie/env_canada/compare/v0.2.6...v0.2.7

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.13

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.12

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.11

Add attribution to weather metadata

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.10

Adds normal high and low temperatures

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.9

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.8

Raise an exception when XML decoding fails

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.7

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 4 years ago

env_canada - v0.5.6

Fix radar precip_type setter

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 5 years ago

env_canada - v0.5.5

Make precip_type a property in ECRadar

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 5 years ago

env_canada - v0.5.4

Support precip_type=None in ECRadar

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 5 years ago

env_canada - v0.5.3

Accept None for optional parameters

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 5 years ago

env_canada - Input validation

Validate init arguments, raise HTTP errors

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 5 years ago

env_canada - Faster weather server

Switch weather to a faster server

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 5 years ago

env_canada - Maintenance - Faster weather server

Switch weather to a faster server

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 5 years ago

env_canada - Add historical climate data

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 5 years ago

env_canada - Fix radar options

  • Fixes disabling legend and timestamp for radar πŸ›
  • Handles previous day's precipitation value of "Trace" πŸ™„

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 5 years ago

env_canada - Make weather data more Pythonic

Return values as int, float, or timezone-awaredatetime as appropriate.

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 5 years ago

env_canada - Updates to radar GIF

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie about 5 years ago

env_canada - Fix for Python 3.9

Remove getchildren()

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 5 years ago

env_canada - AQHI region name

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 5 years ago

env_canada - Async and tests

  • Make fetching methods asynchronous
  • Add tests
  • Rename data to weather
  • Separate AQHI from weather

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 5 years ago

env_canada - Switch to bitmap font

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 5 years ago

env_canada - Update setup.py

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 5 years ago

env_canada - Add font to library

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 5 years ago

env_canada - Remove OpenCV

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 5 years ago

env_canada - Move NRCan basemap to HTTP

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 6 years ago

env_canada - Add legend and timestamp to radar

Overlays a legend and timestamp on the radar image

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 6 years ago

env_canada -

Adds legend and timestamp to radar map
Fixes #24

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 6 years ago

env_canada - v0.0.39

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie almost 6 years ago

env_canada -

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 6 years ago

env_canada -

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 6 years ago

env_canada -

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 6 years ago

env_canada - v0.0.30

Sustainable Development - Data Catalogs and Interfaces - Python
Published by michaeldavie over 6 years ago