Conversation
…acking_number_data patterns
…12 compatibility for description_placeholders
|
ping @PineappleEmperor if you have a moment, it may look like a massive change, but it's really just using https://github.com/jkeen/tracking_number_data as the source of truth for some auto-detection of carriers. |
PineappleEmperor
left a comment
There was a problem hiding this comment.
Hallo! Apologies for being AWOL! Looks good to me! We could consider releasing these as betas to make it easier to test/review? How do you want to package all of these PRs into a new version?
|
@PineappleEmperor Good idea, and I'm not sure yet.. I can figure this out this weekend unless you have any ideas! |
|
@PineappleEmperor just pushed as a v1.8.0 pre-release, it absorbs a few other PRs as well. I'll test on my main HA instance but things are looking good! |
|
@jmdevita sorry again! I'm rammed at the minute! I've installed the beta on my main HA and have run a few tests - looks good to me! I could see us getting requests for more automatically recognised tracking numbers, depending on how popular the feature is? Do you want to squash and merge when you're ready to release it fully? :) |
Summary
Adds automatic carrier detection from tracking numbers, so the
courierfield is now optionalwhen calling
add_parceloredit_parcel.jkeen/tracking_number_data (vendored JSON, no
runtime API calls)
Canada Post, DPD, OnTrac, LaserShip, Landmark, Old Dominion
detect_carrierservice for testing detection in HA developer toolscourierexplicitly are unaffecteddescription_placeholdersNew files
carrier_detection.py— core detection moduletracking_data/*.json— 12 vendored carrier pattern filestests/test_carrier_detection.py— 247 tests using jkeen's own test vectors