You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pandas has released v1.0.0. With pandas 1.0.0, test_forecast.test_datetime fails, as #872 shows in the test log. It is not clear if the test itself is the problem: these lines do not set a timezone.
start = datetime.now()
end = start + timedelta(days=1)
Should start and end be timezone-aware? The intent of the test is not clear to me.
To Reproduce
Steps to reproduce the behavior:
Install pandas 1.0.0
import pandas as pd
from datetime import datetime, timedelta
from pvlib.forecast import NAM
_latitude = 32.2
_longitude = -110.9
_tz = 'US/Arizona'
_start = pd.Timestamp.now(tz=_tz)
_end = _start + pd.Timedelta(days=1)
amodel = NAM()
start = datetime.now()
end = start + timedelta(days=1)
try:
amodel.get_processed_data(_latitude, _longitude, start, end)
print("Success with {}".format(pd.__version__))
except:
print("Failed with {}".format(pd.__version__))
Now run with pandas < 1.0.0 (e.g., 0.22.0)
The text was updated successfully, but these errors were encountered:
The test ensures that the function works if you use a python datetime object instead of pandas datetime object. We should check that start/end are localized and, if not, raise TypeError before issuing the query.
Yes, I should have said I'll provide a fix as soon as I get out of conda hell. Apparently I should not have run pip install pandas -U in an environment with conda-provided numpy/netcdf/hdf5. Yay python packaging.
Pandas has released v1.0.0. With pandas 1.0.0,
test_forecast.test_datetime
fails, as #872 shows in the test log. It is not clear if the test itself is the problem: these lines do not set a timezone.Should
start
andend
be timezone-aware? The intent of the test is not clear to me.To Reproduce
Steps to reproduce the behavior:
Now run with pandas < 1.0.0 (e.g., 0.22.0)
The text was updated successfully, but these errors were encountered: