Skip to content

Commit c5261f9

Browse files
committed
add _ to helper function names
1 parent a5888e4 commit c5261f9

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

pvlib/tmy.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def readtmy3(filename=None, coerce_year=None, recolumn=True):
158158

159159
if filename is None:
160160
try:
161-
filename = interactive_load()
161+
filename = _interactive_load()
162162
except:
163163
raise Exception('Interactive load failed. Tkinter not supported on this system. Try installing X-Quartz and reloading')
164164

@@ -182,7 +182,7 @@ def readtmy3(filename=None, coerce_year=None, recolumn=True):
182182

183183
TMYData = pd.read_csv(filename, header=1,
184184
parse_dates={'datetime':['Date (MM/DD/YYYY)','Time (HH:MM)']},
185-
date_parser=parsedate, index_col='datetime')
185+
date_parser=_parsedate, index_col='datetime')
186186

187187
if recolumn:
188188
_recolumn(TMYData) #rename to standard column names
@@ -193,15 +193,15 @@ def readtmy3(filename=None, coerce_year=None, recolumn=True):
193193

194194

195195

196-
def interactive_load():
196+
def _interactive_load():
197197
import Tkinter
198198
from tkFileDialog import askopenfilename
199199
Tkinter.Tk().withdraw() #Start interactive file input
200200
return askopenfilename()
201201

202202

203203

204-
def parsedate(ymd, hour):
204+
def _parsedate(ymd, hour):
205205
# stupidly complicated due to TMY3's usage of hour 24
206206
# and dateutil's inability to handle that.
207207
offset_hour = int(hour[:2]) - 1
@@ -212,18 +212,6 @@ def parsedate(ymd, hour):
212212

213213

214214

215-
def parsetz(UTC):
216-
#currently not used, need to make these daylight savings unaware
217-
TZinfo = {-5:'EST',
218-
-6:'CST',
219-
-7:'MST',
220-
-8:'PST',
221-
-9:'AKST',
222-
-10:'HAST'}
223-
return TZinfo[UTC]
224-
225-
226-
227215
def _recolumn(tmy3_dataframe, inplace=True):
228216
"""
229217
Rename the columns of the TMY3 DataFrame.

0 commit comments

Comments
 (0)