earthlab / matplotcheck

A python package for checking and testing matplotlib plots. We use this for autograding student assignments but there are many other potential use cases including package testing (for packages with plots)!
https://matplotcheck.readthedocs.io
BSD 3-Clause "New" or "Revised" License
18 stars 8 forks source link

Time series issues #74

Closed lwasser closed 4 years ago

lwasser commented 5 years ago

warning upone converting to datetime

hw_plot1.assert_xydata(xy_expected=monthly_max.reset_index(),
                       xtime=True, 
                       xcol="datetime",
                       ycol="17663_00060_00003",
                       m="oops - you messed up")

out

/anaconda3/envs/earth-analytics-python/lib/python3.6/site-packages/numpy/core/numeric.py:2586: FutureWarning: Converting timezone-aware DatetimeArray to timezone-naive ndarray with 'datetime64[ns]' dtype. In the future, this will return an ndarray with 'object' dtype where each element is a 'pandas.Timestamp' with the correct 'tz'.
    To accept the future behavior, pass 'dtype=object'.
    To keep the old behavior, pass 'dtype="datetime64[ns]"'.
  a1, a2 = asarray(a1), asarray(a2)
lwasser commented 4 years ago

i am going to close this issue. we decided that trying to mess with conversions is not a good use of effort because it's fragile. instead we will pull the data from the expected plot using a get_data method and then test that way