Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
Default to kPa for Pressure
Browse files Browse the repository at this point in the history
  • Loading branch information
waynedgrant committed Apr 23, 2015
1 parent b7bf7d8 commit 33f600d
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pifacecad-wdlive is licensed under the MIT License:

> The MIT License (MIT)
>
> Copyright (c) 2014 Wayne D Grant
> Copyright (c) 2015 Wayne D Grant
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pifacecad-wdlive

Copyright © 2014 Wayne D Grant
Copyright © 2015 Wayne D Grant

Licensed under the MIT License

Expand Down
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

__author__ = "Wayne D Grant (www.waynedgrant.com)"
Expand Down
2 changes: 1 addition & 1 deletion clientraw.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

from measures import Pressure
Expand Down
2 changes: 1 addition & 1 deletion cyclical.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License


Expand Down
2 changes: 1 addition & 1 deletion formatters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

from decimal import *
Expand Down
2 changes: 1 addition & 1 deletion measures.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

from decimal import *
Expand Down
2 changes: 1 addition & 1 deletion pifacecad-wdlive.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

import pifacecad
Expand Down
2 changes: 1 addition & 1 deletion settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

from cyclical import Cyclical
Expand Down
2 changes: 1 addition & 1 deletion test/test_clientraw.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

import unittest
Expand Down
2 changes: 1 addition & 1 deletion test/test_cyclical.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

import unittest
Expand Down
2 changes: 1 addition & 1 deletion test/test_formatters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

import unittest
Expand Down
2 changes: 1 addition & 1 deletion test/test_measures.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

import unittest
Expand Down
6 changes: 3 additions & 3 deletions test/test_settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

import unittest
Expand All @@ -23,9 +23,9 @@ def test_weather_item_type(self):

def test_pressure_unit(self):
testee = Settings()
self.assertEqual(PressureUnit.HECTOPASCALS, testee.get_pressure_unit())
self.assertEqual(PressureUnit.KILOPASCALS, testee.get_pressure_unit())
testee.change_pressure_unit()
self.assertEqual(PressureUnit.INCHES_OF_MERCURY, testee.get_pressure_unit())
self.assertEqual(PressureUnit.MILLIBARS, testee.get_pressure_unit())

def test_rainfall_unit(self):
testee = Settings()
Expand Down
6 changes: 3 additions & 3 deletions test/test_weatheritems.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

import unittest
Expand Down Expand Up @@ -30,7 +30,7 @@ def __gen_populated_client_raw_str(self):
def test_summary(self):
weather_item = self.__get_weather_item(WeatherItemType.SUMMARY)
self.assertEqual("25.4°C ➘ 97% ➚", weather_item.get_line1())
self.assertEqual("1019.7 hPa ➙", weather_item.get_line2())
self.assertEqual("101.97 kPa ➙", weather_item.get_line2())

def test_average_wind(self):
weather_item = self.__get_weather_item(WeatherItemType.AVERAGE_WIND)
Expand Down Expand Up @@ -90,7 +90,7 @@ def test_rainfall_rate(self):
def test_surface_pressure(self):
weather_item = self.__get_weather_item(WeatherItemType.SURFACE_PRESSURE)
self.assertEqual("Surface Pressure", weather_item.get_line1())
self.assertEqual("1019.7 hPa ➙", weather_item.get_line2())
self.assertEqual("101.97 kPa ➙", weather_item.get_line2())

def test_temperature(self):
weather_item = self.__get_weather_item(WeatherItemType.TEMPERATURE)
Expand Down
6 changes: 3 additions & 3 deletions units.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License


Expand All @@ -11,8 +11,8 @@ class PressureUnit:
MILLMETRES_OF_MERCURY = 5

def get_all(self):
return [self.HECTOPASCALS, self.INCHES_OF_MERCURY, self.KILOPASCALS,
self.MILLIBARS, self.MILLMETRES_OF_MERCURY]
return [self.KILOPASCALS, self.MILLIBARS, self.MILLMETRES_OF_MERCURY,
self.HECTOPASCALS, self.INCHES_OF_MERCURY, ]


class RainfallUnit:
Expand Down
2 changes: 1 addition & 1 deletion weatheritems.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 Wayne D Grant (www.waynedgrant.com)
# Copyright 2015 Wayne D Grant (www.waynedgrant.com)
# Licensed under the MIT License

from formatters import ForecastFormatter
Expand Down

0 comments on commit 33f600d

Please sign in to comment.