Beispiel #1
0
    def __init__(self, text, tp):
        """ Constructor """
        self.unixtext = text
        self.tp = tp  # Reference to parent
        self.ugcs, self.ugcexpire = ugc.parse(text, tp.valid,
                                              ugc_provider=tp.ugc_provider)
        self.vtec = vtec.parse(text)
        self.headlines = self.parse_headlines()
        self.hvtec = hvtec.parse(text, nwsli_provider=tp.nwsli_provider)

        # TIME...MOT...LOC Stuff!
        self.tml_giswkt = None
        self.tml_valid = None
        self.tml_sknt = None
        self.tml_dir = None
        self.process_time_mot_loc()

        #
        self.giswkt = None
        self.sbw = self.process_latlon()

        # tags
        self.windtag = None
        self.windtagunits = None
        self.hailtag = None
        self.haildirtag = None
        self.winddirtag = None
        self.tornadotag = None
        self.waterspouttag = None
        self.tornadodamagetag = None
        self.is_emergency = False
        self.process_tags()

        self.bullets = self.process_bullets()
Beispiel #2
0
    def __init__(self, text, tp):
        """ Constructor """
        self.unixtext = text
        self.tp = tp  # Reference to parent
        self.ugcs, self.ugcexpire = ugc.parse(text, tp.valid,
                                              ugc_provider=tp.ugc_provider)
        self.vtec = vtec.parse(text)
        self.headlines = self.parse_headlines()
        self.hvtec = hvtec.parse(text, nwsli_provider=tp.nwsli_provider)

        # TIME...MOT...LOC Stuff!
        self.tml_giswkt = None
        self.tml_valid = None
        self.tml_sknt = None
        self.tml_dir = None
        self.process_time_mot_loc()

        #
        self.giswkt = None
        self.sbw = self.process_latlon()

        # tags
        self.windtag = None
        self.windtagunits = None
        self.hailtag = None
        self.haildirtag = None
        self.winddirtag = None
        self.tornadotag = None
        self.tornadodamagetag = None
        self.process_tags()

        self.bullets = self.process_bullets()
Beispiel #3
0
def test_empty2():
    """Test empty."""
    initial = "/NWYI3.0.ER.000000T0000Z.000000T0000Z.000000T0000Z.OO/"
    v = hvtec.parse(initial)
    assert v[0].nwsli.id == "NWYI3"
    assert str(v[0]) == initial
Beispiel #4
0
def test_empty():
    """ check empty HVTEC Parsing """
    v = hvtec.parse(
        "/00000.0.ER.000000T0000Z.000000T0000Z.000000T0000Z.OO/")
    assert v[0].nwsli.id == "00000"
Beispiel #5
0
 def test_empty2(self):
     initial = "/NWYI3.0.ER.000000T0000Z.000000T0000Z.000000T0000Z.OO/"
     v = hvtec.parse(initial)
     self.assertEqual("NWYI3", v[0].nwsli.id)
     self.assertEqual(str(v[0]), initial)
Beispiel #6
0
 def test_empty(self):
     """ check empty HVTEC Parsing """
     v = hvtec.parse(
         "/00000.0.ER.000000T0000Z.000000T0000Z.000000T0000Z.OO/")
     self.assertEqual("00000", v[0].nwsli.id)
Beispiel #7
0
 def test_empty2(self):
     initial = "/NWYI3.0.ER.000000T0000Z.000000T0000Z.000000T0000Z.OO/"
     v = hvtec.parse(initial)
     self.assertEqual("NWYI3", v[0].nwsli.id)
     self.assertEqual(str(v[0]), initial)
Beispiel #8
0
 def test_empty(self):
     """ check empty HVTEC Parsing """
     v = hvtec.parse(
         "/00000.0.ER.000000T0000Z.000000T0000Z.000000T0000Z.OO/")
     self.assertEqual("00000", v[0].nwsli.id)