Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

Commit 2d348f3

Browse files
author
Aodhan Sweeney
committed
Doc string updates, error changes, and travis fixes
1 parent 5cd7edc commit 2d348f3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/HurricaneTracker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
66
This GUI takes data pulled from the National
77
Hurricane Center and plots specific storms and
8-
their tracks. The GUI runs using ipwidgets, and
9-
is intended to be used as an ipython notebook.
8+
their tracks. The GUI runs using ipywidgets, and
9+
is intended to be used as an Jupyter notebook.
1010
"""
1111

1212
import cartopy.crs as ccrs
@@ -77,7 +77,7 @@ def get_name_dropdown(self, storm_names):
7777
if self.filename.empty is False:
7878
self.filename = file_name[0]
7979
elif self.filename.empty is True:
80-
raise Exception('ValueError: No file name data for this year.')
80+
raise ValueError('No data for specific file name of the chosen.')
8181

8282
def get_track(self, track_button):
8383
"""

examples/SPCTracker.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class SPC_GUI:
2424
"""
2525
Graphic User Interface designed to allow users to access Storm Prediction Center data.
2626
27-
This class uses ipython widgets. NOTE: storm chosen must be after 2011 because methods
28-
of data parsing are different and will not work for dates earlier.
27+
This class uses ipython widgets. NOTE: date chosen must be from 2011 to present because
28+
methods of data parsing are different and will not work for dates earlier.
2929
"""
3030
def __init__(self):
3131
"""
@@ -71,7 +71,7 @@ def fetch_spc(self, stormpicker):
7171
one_storm_type = spc.SPCD(storm_type, self.date_string)
7272
# Storm must be after year 2011
7373
if int(self.date_string[:4]) < 2011:
74-
one_storm_type = one_storm_type.day_table[['Time', 'Start Lat', 'Start Lon']]
74+
raise ValueError('SPC GUI does not support events before 2012.')
7575
self.spc_data_table.append(one_storm_type.day_table)
7676

7777
if self.spc_data_table != []:
@@ -83,7 +83,7 @@ def fetch_spc(self, stormpicker):
8383
self.all_events = self.all_events.sort_index()
8484

8585
if self.all_events.empty:
86-
raise Exception("Value Error: Can\'t plot a storm event that doesn\'t exist.")
86+
raise ValueError('No storm reports of any type for this date.')
8787

8888
self.plot_slider = widgets.IntSlider(min=0, max=(len(self.all_events)-1),
8989
value=0, description='Event #',

0 commit comments

Comments
 (0)