antoinecarme / pyaf

PyAF is an Open Source Python library for Automatic Time Series Forecasting built on top of popular pydata modules.
BSD 3-Clause "New" or "Revised" License
458 stars 73 forks source link

Warning Hunt : Matplotlib wanings in travis-ci reports #94

Closed antoinecarme closed 6 years ago

antoinecarme commented 6 years ago

Following :

https://travis-ci.org/antoinecarme/pyaf

This warning occurs a lot in PyAF tests.

/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/matplotlib/legend.py:593: UserWarning: The handle <matplotlib.lines.Line2D object at 0x7f5cbc57bc50> has a label of '_Ozone_AR' which cannot be automatically added to the legend.
  'legend.'.format(handle, label))

This is not critical, but need to worry about (some changes in underlying matplotlib calls). It makes a lot of noise in non-regression tests reports.

antoinecarme commented 6 years ago

Similar issues are observed when pandas use matplotlib

https://github.com/pandas-dev/pandas/issues/18671

antoinecarme commented 6 years ago

Another matplotlib warning :

/pandas/plotting/_core.py:1716: UserWarning: Pandas doesn't allow columns to be created via a new attribute 
name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access
antoinecarme commented 6 years ago

Matplotlib does not like legend labels starting with '_' These are simply discarded after a warning.

https://github.com/matplotlib/matplotlib/blob/c928022bc7e29b5e7829f9814eb0151a2f8c73ab/lib/matplotlib/legend.py#L439

PyAF uses leading underscores for non-transformed signals,

Will simply remove the leading underscore in the legend. This has no deep impact as the semantics is the same.

antoinecarme commented 6 years ago

Matplotlib warnings are no longer present in travis-ci reports. Closing.