Skip to content

test_forecast failures with pandas 1.0.0 #877

Description

@cwhanse

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:

  1. 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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions