12 Commits

Author SHA1 Message Date
James Lu
3ca6f3c973 NuWeather: minor cleanup 2022-06-19 15:21:28 -07:00
James Lu
753619c513 NuWeather: refactor formatter config reading & test setup 2022-06-19 11:45:47 -07:00
James Lu
96ecf283fe NuWeather: use more precise mi/km conversion 2022-05-25 15:10:21 -07:00
James Lu
05b15b0111 NuWeather: implement configurable unit display for distance and speed
This is implemented as two new options using simple templates: plugins.nuweather.units.distance and plugins.nuweather.units.speed

Closes #101.
Closes #97.
2022-05-24 13:29:47 -07:00
James Lu
cb49620a2d NuWeather: split formatting another module; implement format_temp with only c input 2022-05-24 12:56:08 -07:00
James Lu
968e4c7390 NuWeather: refactor tests to workaround errors in the test framework
Previously, these tests always errored:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/supybot/test.py", line 214, in runTest
    originalRunTest()
  File "/usr/local/lib/python3.7/dist-packages/supybot/test.py", line 214, in runTest
    originalRunTest()
  File "./NuWeather/test.py", line 73, in testSavedLocation
    self.assertError('weather')  # No location set
  File "/usr/local/lib/python3.7/dist-packages/supybot/test.py", line 344, in assertError
    m = self._feedMsg(query, expectException=True, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/supybot/test.py", line 298, in _feedMsg
    to = self.irc.nick
AttributeError: 'NoneType' object has no attribute 'nick'
2020-09-19 01:07:13 -07:00
James Lu
f548d2dd54 NuWeather: use PluginTestCase.setUp() in tests
PluginTestCase.setUp() checks some hardcoded class names, so using super() here causes the tests to break.
2020-08-14 18:00:35 -07:00
James Lu
586d16712f NuWeather: add CI tests for Weatherstack and Openweathermap 2020-08-03 14:17:17 -07:00
James Lu
1678b0646e NuWeather: replace Apixu with its successor Weatherstack
Apixu goes down in only one week, so there's no point in leaving the old code here.

Closes #87.
2019-10-06 11:35:27 -07:00
James Lu
a9d0d5fe60 NuWeather: add support for current-conditions-only providers 2019-10-06 11:33:19 -07:00
James Lu
bfb1fc87f6 NuWeather: add basic unit tests
Closes #76.
2019-06-23 12:36:09 -07:00
James Lu
08d3f675c5 NuWeather: a new weather plugin using Apixu
Closes #71.
2018-12-30 13:01:10 -08:00