Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pytest-remote-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:

- name: Upload coverage to Codecov
if: matrix.python-version == 3.7 && matrix.suffix == ''
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
verbose: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:

- name: Upload coverage to Codecov
if: matrix.python-version == 3.7 && matrix.suffix == '' && matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda'
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
verbose: true
Expand Down
1 change: 0 additions & 1 deletion pvlib/tests/test_atmosphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def test_kasten96_lt():
)
lt = atmosphere.kasten96_lt(*np.meshgrid(amp, pwat, aod_bb))
assert np.allclose(lt, lt_expected, 1e-3)
return lt


def test_angstrom_aod():
Expand Down
1 change: 0 additions & 1 deletion pvlib/tests/test_clearsky.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,4 +808,3 @@ def test_bird():
[Eb3, Ebh3, Gh3, Dh3],
testdata2[['Direct Beam', 'Direct Hz', 'Global Hz', 'Dif Hz']].iloc[11],
rtol=1e-3)
return pd.DataFrame({'Eb': Eb, 'Ebh': Ebh, 'Gh': Gh, 'Dh': Dh}, index=times)
14 changes: 7 additions & 7 deletions pvlib/tests/test_solarposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def test_sun_rise_set_transit_spa(expected_rise_set_spa, golden):
result_rounded = pd.DataFrame(index=result.index)
# need to iterate because to_datetime does not accept 2D data
# the rounding fails on pandas < 0.17
for col, data in result.iteritems():
for col, data in result.items():
result_rounded[col] = data.dt.round('1s')

assert_frame_equal(frame, result_rounded)
Expand All @@ -176,7 +176,7 @@ def test_sun_rise_set_transit_spa(expected_rise_set_spa, golden):
# round to nearest minute
result_rounded = pd.DataFrame(index=result.index)
# need to iterate because to_datetime does not accept 2D data
for col, data in result.iteritems():
for col, data in result.items():
result_rounded[col] = data.dt.round('s').tz_convert('MST')

assert_frame_equal(expected_rise_set_spa, result_rounded)
Expand All @@ -191,7 +191,7 @@ def test_sun_rise_set_transit_ephem(expected_rise_set_ephem, golden):
temperature=11, horizon='-0:34')
# round to nearest minute
result_rounded = pd.DataFrame(index=result.index)
for col, data in result.iteritems():
for col, data in result.items():
result_rounded[col] = data.dt.round('min').tz_convert('MST')
assert_frame_equal(expected_rise_set_ephem, result_rounded)

Expand Down Expand Up @@ -227,7 +227,7 @@ def test_sun_rise_set_transit_ephem(expected_rise_set_ephem, golden):
horizon='-0:34')
# round to nearest minute
result_rounded = pd.DataFrame(index=result.index)
for col, data in result.iteritems():
for col, data in result.items():
result_rounded[col] = data.dt.round('min').tz_convert('MST')
assert_frame_equal(expected, result_rounded)

Expand Down Expand Up @@ -259,22 +259,22 @@ def test_sun_rise_set_transit_ephem(expected_rise_set_ephem, golden):
altitude=golden.altitude, pressure=0, temperature=11, horizon='-0:34')
# round to nearest minute
result_rounded = pd.DataFrame(index=result.index)
for col, data in result.iteritems():
for col, data in result.items():
result_rounded[col] = data.dt.round('min').tz_convert('MST')
assert_frame_equal(expected, result_rounded)

# test with different timezone
times = times.tz_convert('UTC')
expected = expected.tz_convert('UTC') # resuse result from previous
for col, data in expected.iteritems():
for col, data in expected.items():
expected[col] = data.dt.tz_convert('UTC')
result = solarposition.sun_rise_set_transit_ephem(
times,
golden.latitude, golden.longitude, next_or_previous='previous',
altitude=golden.altitude, pressure=0, temperature=11, horizon='-0:34')
# round to nearest minute
result_rounded = pd.DataFrame(index=result.index)
for col, data in result.iteritems():
for col, data in result.items():
result_rounded[col] = data.dt.round('min').tz_convert(times.tz)
assert_frame_equal(expected, result_rounded)

Expand Down