Tests for tag $station

Station location: Ĺōćāţĩőń with UTF8 characters
Latitude: 45° 41.16' N
Longitude: 121° 33.96' W
Altitude (default unit): 100 m
Altitude (feet): 328 feet
Altitude (meters): 100 m

Tests for tag $current

Current dateTime: 03-Sep-2010 11:00
Current dateTime with formatting: 11:00
Raw dateTime: 1283536800
Outside Temperature (normal formatting) 17.7°C
Outside Temperature (explicit unit conversion to Celsius) 17.7°C
Outside Temperature (explicit unit conversion to Fahrenheit) 63.9°F
Outside Temperature (explicit unit conversion to Celsius, plus formatting) 17.734°C
Outside Temperature (explicit unit conversion to Fahrenheit, plus formatting) 63.921°F
Outside Temperature (with explicit binding to 'wx_binding') 17.7°C
Outside Temperature (with explicit binding to 'alt_binding') -3.9°C
Outside Temperature with nonsense binding $current($data_binding='foo_binding').outTemp $current($data_binding='foo_binding').outTemp
Outside Temperature with explicit time 17.7°C
Outside Temperature with nonsense time N/A
Outside Temperature trend (3 Stunden) 8.4°C
Outside Temperature trend with explicit time_delta (3600 seconds) 2.9°C
Trend with nonsense type $trend.foobar
Barometer (normal) 989.1 mbar
Barometer trend where previous value is known to be None (3 Stunden) N/A
Barometer using $latest 989.1 mbar
Barometer using $latest and explicit data binding 1004.8 mbar at 1283536800
Wind Chill (normal) 17.7°C
Heat Index (normal) 17.7°C
Heat Index (in Celsius) 17.7°C
Heat Index (in Fahrenheit) 63.9°F
Dewpoint 14.6°C
Humidity 82%
Wind 29 kph from 128°
Wind (beaufort) 4
Rain Rate 0.0 mm/h
Inside Temperature 20.0°C
Test tag "exists" for an existent type: $current.outTemp.exists TRUE
Test tag "exists" for a nonsense type: $current.nonsense.exists FALSE
Test tag "has_data" for an existing type with data: $current.outTemp.has_data TRUE
Test tag "has_data" for an existing type without data: $current.hail.has_data FALSE
Test tag "has_data" for a nonsense type: $current.nonsense.has_data FALSE
Test tag "has_data" for the last hour: $hour.outTemp.has_data TRUE
Test tag "has_data" for the last hour of a nonsense type: $hour.nonsense.has_data FALSE
Test for a bad observation type on a $current tag: $current.foobar ?'foobar'?

Tests for tag $hour

Start of hour: 09/03/2010 10:00:00
Start of hour (unix epoch time): 1283533200
Max Temperature 17.7°C
Min Temperature 16.3°C
Time of max temperature: 11:00
Time of min temperature: 10:30

Wind related tags

$current

$current.windSpeed 29 kph
$current.windDir 128°
$current.windGust 35 kph
$current.windGustDir 128°

$hour

Hour start, stop 1283533200
1283536800
$hour.wind.vecdir 127°
$hour.wind.vecavg 29 kph
$hour.wind.max 35 kph
$hour.wind.gustdir 126°
$hour.wind.maxtime 10:30

$month

$month.start.raw 1283324400
$month.end.raw 1285916400
$month.length.raw 2592000
$month.start 01-Sep-2010 00:00
$month.end 01-Oct-2010 00:00
$month.length 2592000 Sekunden
$month.length.long_form("%(day)d %(day_label)s") 30 Tage
$month.windSpeed.avg 18 kph
$month.wind.avg 18 kph
$month.wind.vecavg 13 kph
$month.wind.vecdir 061°
$month.windGust.max 39 kph
$month.wind.max 39 kph
$month.wind.gustdir 090°
$month.windGust.maxtime 03-Sep-2010 01:00
$month.wind.maxtime 03-Sep-2010 01:00
$month.windSpeed.max 32 kph
$month.windDir.avg 168°

Iterate over three hours:

Start of hour Min temperature When
07:00 8.1°C 07:30
08:00 10.6°C 08:30
09:00 13.4°C 09:30
10:00 16.3°C 10:30

Tests for tag $span

Current dateTime: 03-Sep-2010 11:00
Min Temperature in last hour (via $span($time_delta=3600)): 16.3°C
Min Temperature in last hour (via $span($hour_delta=1)): 16.3°C
Min Temperature in last 90 min (via $span($time_delta=5400)): 14.9°C
Min Temperature in last 90 min (via $span($hour_delta=1.5)): 14.9°C
Max Temperature in last 24 hours (via $span($time_delta=86400)): 26.2°C
Max Temperature in last 24 hours (via $span($hour_delta=24)): 26.2°C
Max Temperature in last 24 hours (via $span($day_delta=1)): 26.2°C
Min Temperature in last 7 days (via $span($time_delta=604800)): 3.8°C
Min Temperature in last 7 days (via $span($hour_delta=168)): 3.8°C
Min Temperature in last 7 days (via $span($day_delta=7)): 3.8°C
Min Temperature in last 7 days (via $span($week_delta=1)): 3.8°C
Rainfall in last 24 hours (via $span($time_delta=86400)): 32.5 mm
Rainfall in last 24 hours (via $span($hour_delta=24)): 32.5 mm
Rainfall in last 24 hours (via $span($day_delta=1)): 32.5 mm
Max Windchill in last hour (existing obs type that is None): 17.7°C

Tests for tag $day

Start of day: 09/03/2010 00:00:00
Start of day (unix epoch time): 1283497200
End of day (unix epoch time): 1283583600
Max Temperature 17.7°C
Min Temperature 3.8°C
Time of max temperature: 11:00
Time of min temperature: 04:00
Last temperature of the day 17.7°C
Time of the last temperature of the day 09/03/2010 11:00:00
First temperature of the day 8.2°C
Time of the first temperature of the day 09/03/2010 00:30:00
Max Temperature in alt_binding -3.9°C
Max Temperature with bogus binding $day($data_binding='foo_binding').outTemp.max
Min temp with explicit conversion to Celsius 3.8°C
Min temp with explicit conversion to Fahrenheit 38.9°F
Min temp with explicit conversion to nonsense type $day.outTemp.min.badtype
Min temperature with inappropriate conversion: $day.outTemp.min.mbar $day.outTemp.min.mbar
Max value for a type with no data: $day.UV.max N/A
Sum aggregation (rain) 19.3 mm
Aggregation of xtype: $day.humidex.avg 8.8°C
Aggregation of xtype: $day.humidex.min 3.8°C
Aggregation of xtype: $day.humidex.mintime 04:00
Aggregation of xtype: $day.humidex.max 21.4°C
Aggregation of xtype: $day.humidex.maxtime 11:00
High Wind from "$day.wind.max" 39 kph from 090° at 01:00
High Wind from "$day.windGust.max" 39 kph
High Wind from "$day.windSpeed.max" 32 kph
Average wind from "$day.wind.avg" 31 kph
Average wind from "$day.windSpeed.avg" 31 kph
Average wind w/alt_binding: "$day(data_binding='alt_binding').wind.avg" 11 kph
RMS aggregation: "$day.wind.rms" 31 kph
Vector average: "$day.wind.vecavg" 30 kph
Aggregation Vector Direction (wind) 107°
Test tag "has_data" with nonsense type $day.nonsense.has_data FALSE
Test tag "exists" with an existing type that has no data $day.UV.exists TRUE
Test tag "has_data" with existent type that has no data $day.UV.has_data FALSE
Test tag "has_data" with existent type that has data $day.outTemp.has_data TRUE
Test tag "not_null" with existent type that has no data $day.UV.not_null 0
Test tag "not_null" with existent type that has data $day.outTemp.not_null 1
Test for a bad observation type on a $day tag: $day.foobar.min $day.foobar.min
Test for a bad aggregation type on a $day tag: $day.outTemp.foo $day.outTemp.foo
Test tag "has_data" for an xtype: $day.humidex.has_data TRUE
Test tag "has_data" for another xtype: $month.heatdeg.has_data TRUE
Test for sunshineDur: $day.sunshineDur.sum 25200 Sekunden
Test for sunshineDur: $day.sunshineDur.sum.long_form 7 Stunden, 0 Minuten, 0 Sekunden
Test for sunshineDur, custom format: 7 Stunden, 0 Minuten
sunshineDur in hours: 7.00 Stunden
$day.stringData.first.raw S1283499000
$day.stringData.last.raw S1283536800
$day.stringData.first.format("%s") S1283499000

Tests for tag $yesterday

Start of yesterday: 09/02/2010 00:00:00
Start of yesterday (unix epoch time): 1283410800
Max Temperature yesterday 26.2°C
Min Temperature yesterday 4.2°C
Time of max temperature yesterday: 16:00
Time of min temperature yesterday: 04:00
Yesterday's last temperature 9.5°C
Time of yesterday's last temperature 09/03/2010 00:00:00

Tests for tag $rainyear

Rainyear total 2015.7 mm

Test for tag $alltime

Max temp from $alltime.outTemp.max 37.8°C
at 02-Jul-2010 16:00
High Wind from "$alltime.wind.max" 39 kph
from 090°
at 02-Jan-2010 00:00

Test for tag $seven_day

Max temp from $seven_day.outTemp.max 28.2°C
at 27-Aug-2010 16:00
High Wind from "$seven_day.wind.max" 39 kph
from 090°
at 30-Aug-2010 01:00

Test for various versions of $colorize

Current temperature using $colorize_1 17.7°C
Current temperature using $colorize_2 17.7°C
Current temperature using $colorize_3 17.7°C

Tests at timestamp 1280692800, when the temperature is null:

Null temperature using $colorize_1 N/A
Null temperature using $colorize_2 N/A
Null temperature using $colorize_3 N/A

Tests for tag $Extras

Radar URL "http://radar.weather.gov/ridge/lite/N0R/RTX_loop.gif"

Tests for tag $almanac

Sunrise: 06:29
Sunset: 19:40
Moon: abnehmend (29%full)
$almanac.sun.visible: 13 Stunden, 10 Minuten, 42 Sekunden
(47442 Sekunden)
$almanac.sun.visible_change: 3 Minuten, 6 Sekunden (-186 Sekunden)

Test for tag $unit

Tag "$unit.unit_type.outTemp" degree_C
Tag "$unit.label.outTemp" °C
Tag "$unit.format.outTemp" %.1f
Example from customizing guide
("$day.outTemp.max.format(add_label=False)$unit.label.outTemp")
17.7°C
Test the above with backwards compatibility
("$day.outTemp.max.formatted$unit.label.outTemp")
17.7°C
Add a new unit type, existing group degree_C
Check its label °C
Check its format %.1f
Add a new unit type, new group amp
Check its label A
Check its format %.1f

Test for tag $obs

Tag "$obs.label.outTemp" Außentemperatur

Test for formatting examples in the Customizing Guide

$current.outTemp 17.7°C
$current.outTemp.format 17.7°C
$current.outTemp.format() 17.7°C
$current.outTemp.format(format_string="%.3f") 17.734°C
$current.outTemp.format("%.3f") 17.734°C
$current.outTemp.format(add_label=False) 17.7
$current.UV N/A
$current.UV.format(None_string="No UV") No UV
$current.windDir 128°
$current.windDir.ordinal_compass SO
$current.dateTime 03-Sep-2010 11:00
$current.dateTime.format(format_string="%H:%M") 11:00
$current.dateTime.format("%H:%M") 11:00
$current.dateTime.raw 1283536800
$current.outTemp.raw 17.73414

Test for aggregates

$month.outTemp.maxmin 4.5°C
$month.outTemp.maxmintime 01-Sep-2010 04:00
$month.outTemp.minmax 17.7°C
$month.outTemp.minmaxtime 03-Sep-2010 11:00
$month.outTemp.minsum 527.6°C
$month.outTemp.minsumtime 03-Sep-2010 00:00
$month.outTemp.maxsumtime 02-Sep-2010 00:00
$month.heatdeg.sum 16.3°C-day
$month.cooldeg.sum 0.0°C-day
$month.growdeg.sum 10.5°C-day
$year.rain.sum_le((0.1, 'inch', 'group_rain')) 122
$year.outTemp.avg_ge((41, 'degree_F', 'group_temperature')) 153
$year.outTemp.avg_le((32, 'degree_F', 'group_temperature')) 80

Tests for $gettext

$lang de
$page test
$gettext("Foo") Foo
$gettext("Today") Heute
$pgettext("test","Plots") test
$pgettext($page,"Plots") Diagramme
$pgettext($page,"Something") Something
$pgettext("Foo","Plots") Plots
$pgettext("Foo","Bar") Bar