Fix/metar reading (#354)
* Account for empty ICAO; added tests * Fix null returns * Fix typo in volume units display * Add version field for bug report template * Some more changes to the bug report template
This commit is contained in:
13
tests/data/aviationweather/empty.xml
Normal file
13
tests/data/aviationweather/empty.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<response xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XML-Schema-instance" version="1.2"
|
||||
xsi:noNamespaceSchemaLocation="http://aviationweather.gov/adds/schema/metar1_2.xsd">
|
||||
<request_index>26064774</request_index>
|
||||
<data_source name="metars"/>
|
||||
<request type="retrieve"/>
|
||||
<errors>
|
||||
<error>Invalid station string: station string cannot be empty</error>
|
||||
</errors>
|
||||
<warnings/>
|
||||
<time_taken_ms>0</time_taken_ms>
|
||||
</response>
|
||||
18
tests/data/aviationweather/kjfk.xml
Normal file
18
tests/data/aviationweather/kjfk.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<response xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:xsi="http://www.w3.org/2001/XML-Schema-instance" version="1.2"
|
||||
xsi:noNamespaceSchemaLocation="http://aviationweather.gov/adds/schema/metar1_2.xsd">
|
||||
<request_index>24902199</request_index>
|
||||
<data_source name="metars"/>
|
||||
<request type="retrieve"/>
|
||||
<errors/>
|
||||
<warnings/>
|
||||
<time_taken_ms>250</time_taken_ms>
|
||||
<data num_results="1">
|
||||
<METAR>
|
||||
<raw_text>KJFK 042151Z 28026G39KT 10SM FEW055 SCT095 BKN110 BKN230 12/M04 A2958 RMK AO2
|
||||
PK WND 27045/2128 PRESRR SLP018 T01221044
|
||||
</raw_text>
|
||||
</METAR>
|
||||
</data>
|
||||
</response>
|
||||
Reference in New Issue
Block a user