Skip to content

Commit 8bdc5cb

Browse files
authored
Merge pull request #51 from phobson/update-ci
run CI on modern python
2 parents e1fdf59 + 5c2b50c commit 8bdc5cb

6 files changed

Lines changed: 13 additions & 10 deletions

File tree

.github/workflows/python-runtests-basic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: [3.6, 3.7, 3.8]
18+
python-version: ["3.8", "3.9", "3.10"]
1919

2020
steps:
2121
- uses: actions/checkout@v2

.github/workflows/python-runtests-img-comp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v2
18-
- name: Set up Python 3.8
18+
- name: Set up Python 3.9
1919
uses: actions/setup-python@v2
2020
with:
21-
python-version: 3.8
21+
python-version: 3.9
2222
- name: Install dependencies
2323
run: |
2424
python -m pip install --upgrade pip

cloudside/asos.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,16 @@ def datetime(self):
6868

6969
def asos_dict(self):
7070
if self.datetime is not None:
71+
wind_dir = value_or_not(self.wind_dir)
72+
if wind_dir == "VRB":
73+
wind_dir = numpy.nan
7174
return Obs(
7275
datetime=self.datetime.round("5min"),
7376
raw_precipitation=value_or_not(self.precip_1hr),
7477
temperature=value_or_not(self.temp),
7578
dew_point=value_or_not(self.dewpt),
7679
wind_speed=value_or_not(self.wind_speed),
77-
wind_direction=value_or_not(self.wind_dir),
80+
wind_direction=wind_dir,
7881
air_pressure=value_or_not(self.press),
7982
sky_cover=_process_sky_cover(self),
8083
)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
HPD0404168500HPCPHI20130100010200600 00541 0700 00392 0800 00639 0900 00410 1000 00563 1100 00560 1200 00594 1300 00718 1400 00600 1500 00397 1600 00669 1700 00335 1800 00316 1900 00359 2000 00753 2100 00704 2200 00319 2300 00705 2400 00329 2500 09903
2-
HPD0404168500HPCPHI20130100020110100 00692 0200 00186 0300 00470 0400 00429 0500 00592 0600 00351 0700 00463 0800 00436 0900 00460 1000 00102 2500 04181
1+
HPD0404168500HPCPHI20130100010200600 00541 0700 00392 0800 00639 0900 00411 1000 00563 1100 00560 1200 00594 1300 00718 1400 00600 1500 00398 1600 00670 1700 00335 1800 00316 1900 00359 2000 00753 2100 00704 2200 00319 2300 00705 2400 00329 2500 09906
2+
HPD0404168500HPCPHI20130100020110100 00692 0200 00186 0300 00470 0400 00429 0500 00592 0600 00351 0700 00463 0800 00435 0900 00460 1000 00102 2500 04180

cloudside/validate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def axes_object(ax):
2222

2323

2424
def source(source):
25-
""" checks that a *source* value is valid """
25+
"""checks that a *source* value is valid"""
2626
if source.lower() in ("wunderground", "wunder_nonairport"):
2727
raise NotImplementedError("wunderground support is borked")
2828
elif source.lower() not in ("asos",):
@@ -31,14 +31,14 @@ def source(source):
3131

3232

3333
def step(step):
34-
""" checks that a *step* value is valid """
34+
"""checks that a *step* value is valid"""
3535
if step.lower() not in ("raw", "flat", "compile"):
3636
raise ValueError('step must be one of "raw" or "flat"')
3737
return step.lower()
3838

3939

4040
def file_status(filename):
41-
""" confirms that a raw file isn't empty """
41+
"""confirms that a raw file isn't empty"""
4242
if os.path.exists(filename):
4343
with open(filename, "r") as testfile:
4444
line = testfile.readline()

cloudside/viz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def temperature(dataframe, col="temperature", freq="hourly", how="mean", ax=None
186186
187187
"""
188188

189-
ylabel = u"%s Temperature (\xB0C)" % freq.title()
189+
ylabel = "%s Temperature (\xB0C)" % freq.title()
190190
fig = _plotter(dataframe, col, ylabel, freq=freq, how=how, ax=ax)
191191
return fig
192192

0 commit comments

Comments
 (0)