-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set a test API key (the one in the API call examples from OWM API website) * Try to fix Travis Virtualenv support for Py32 * Fix again * Bump to version 2.3.1 * Don't commit coverage file * Dockerfile (#106) * First attempt * Guide * Fix Dockerfile and docs * Update docs * Change URL of documentation to comply with new readthedocs domain * Backporting from master branch * Refactor integration tests to use the API key specified in api_key.py * Fix ValueError then sunrise_time & sunset time is less than zero when there is a polar day * Fix ValueError then sunrise_time & sunset time is less than zero when there is a polar day * Fix ValueError then sunrise_time & sunset time is less than zero when there is a polar day * Fix ValueError then sunrise_time & sunset time is less than zero when there is a polar day * Fix ValueError then sunrise_time & sunset time is less than zero when there is a polar day * Messed up with Git... sunrise/sunset fix from #109 is OK now * Sometimes Wind data is None Hello ! I'm useing Homeassistant, and sometimes I got the following error: ``` Traceback (most recent call last): File "/home/titilambert/gits/domo/homeassitant/env/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 98, in _setup_platform discovery_info) File "/home/titilambert/gits/domo/homeassitant/env/lib/python3.4/site-packages/homeassistant/components/sensor/openweathermap.py", line 70, in setup_platform dev.append(OpenWeatherMapSensor(data, variable, unit)) File "/home/titilambert/gits/domo/homeassitant/env/lib/python3.4/site-packages/homeassistant/components/sensor/openweathermap.py", line 94, in __init__ self.update() File "/home/titilambert/gits/domo/homeassitant/env/lib/python3.4/site-packages/homeassistant/components/sensor/openweathermap.py", line 114, in update self.owa_client.update() File "/home/titilambert/gits/domo/homeassitant/env/lib/python3.4/site-packages/homeassistant/util/__init__.py", line 289, in wrapper result = method(*args, **kwargs) File "/home/titilambert/gits/domo/homeassitant/env/lib/python3.4/site-packages/homeassistant/components/sensor/openweathermap.py", line 179, in update self.longitude) File "/home/titilambert/gits/domo/homeassitant/config/deps/pyowm/webapi25/owm25.py", line 432, in three_hours_forecast_at_coords forecast = self._parsers['forecast'].parse_JSON(json_data) File "/home/titilambert/gits/domo/homeassitant/config/deps/pyowm/webapi25/forecastparser.py", line 66, in parse_JSON for item in d['list']] File "/home/titilambert/gits/domo/homeassitant/config/deps/pyowm/webapi25/forecastparser.py", line 66, in <listcomp> for item in d['list']] File "/home/titilambert/gits/domo/homeassitant/config/deps/pyowm/webapi25/weather.py", line 462, in weather_from_dictionary wind = d['wind'].copy() AttributeError: 'NoneType' object has no attribute 'copy' ``` This patch fixes this error * Regression test for #110 * update with new contributor * Fixes for #110 and #114 * Forgot... * Were missing * Bump to version 2.3.2
- Loading branch information
Showing
19 changed files
with
233 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ sphinx/_build/* | |
.pydevproject | ||
.idea/* | ||
.tox/* | ||
.coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM ubuntu:15.10 | ||
MAINTAINER Claudio Sparpaglione <[email protected]> | ||
|
||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get -y install software-properties-common && \ | ||
RUN echo -ne '\n' | apt-add-repository ppa:fkrull/deadsnakes | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install python2.7 python3.2 python3.3 python-pip -y | ||
|
||
ADD . /pyowm | ||
WORKDIR /pyowm | ||
|
||
RUN pip install -r /pyowm/dev-requirements.txt | ||
|
||
CMD tail -f /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Playing with Docker image locally | ||
================================= | ||
|
||
Build the image | ||
--------------- | ||
``` | ||
cd <pyowm-root-dir> | ||
build -t pyowm:latest . | ||
``` | ||
|
||
|
||
Start container | ||
--------------- | ||
``` | ||
docker run -d --name pyowm pyowm | ||
``` | ||
|
||
Run tests on Tox | ||
--------------- | ||
``` | ||
docker exec -ti pyowm tox | ||
``` | ||
|
||
|
||
Releasing on DockerHub | ||
====================== | ||
|
||
Eg: for tagged version 2.3.1 | ||
|
||
``` | ||
VERSION="2.3.1" | ||
# Build and tag | ||
docker build -t csparpa/pyowm:${VERSION} . | ||
docker tag csparpa/pyowm:${VERSION} csparpa/pyowm:latest | ||
# Push to DockerHub | ||
docker push csparpa/pyowm:${VERSION} | ||
docker push csparpa/pyowm:latest | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Put here your valid API key in order to run integration tests | ||
API_KEY = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.