Merge lp:~knitzsche/ubuntu-rest-scopes/fix-10-day-forecast-url into lp:ubuntu-rest-scopes
Status: | Needs review |
---|---|
Proposed branch: | lp:~knitzsche/ubuntu-rest-scopes/fix-10-day-forecast-url |
Merge into: | lp:ubuntu-rest-scopes |
Diff against target: |
90 lines (+10/-10) 2 files modified
src/scopes/tests/test_weatherchannel.py (+5/-5) src/scopes/weatherchannel.py (+5/-5) |
To merge this branch: | bzr merge lp:~knitzsche/ubuntu-rest-scopes/fix-10-day-forecast-url |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kyle Nitzsche (community) | Abstain | ||
Facundo Batista (community) | Needs Fixing | ||
Review via email:
|
Description of the change
Ensure that the url used to open the 10-day forecast on weather.com uses lat and long of sufficient precision to avoid 404 style error when user taps Open on Preview from Today scope.
Unmerged revisions
- 537. By Kyle Nitzsche
-
add the ":.5f" format modifier to the URL_TEMPLATE or ENGLISH_
URL_TEMPLATE
themselves, per review request - 536. By Kyle Nitzsche
-
modify weatherchannel tests to ensure that the actual url produced has
five digit percision. - 535. By Kyle Nitzsche
-
weatherchannel.py:
* don't prebuild string to set lat and lng for url
* improve the format specifier
* also apply format to URL_TEMPLATE so lat an lng have 5 digit precisions - 534. By Kyle Nitzsche
-
fixes lp:1629243
- 533. By Kyle Nitzsche
-
create url used from preview to open weatherchannel.com web page
with 10-day forecast with latitude and longitude that has 5 digit
precisions, as seems to be required.
Ah, it's a good catch that the URL needs a 5 digit precision (even if the numbers are completed with zeros).
A detail in the formatting: the 2 as width doesn't make sense, as if you request 5 digits for precision, it always will be greater than 2, so please remove it.
Also, please include this formatting change in the ENGLISH_ URL_TEMPLATE itself, no need to prebuild other string.
Thanks!!