ENH: Experimental CustomBusinessDay DateOffset class. fixes #2301
Got the CustomBusinessDay DateOffset class to the point where it passes the
Pandas unit tests.
BUG: When converting from datetime a two-step conversion seems to be necessary.
First we convert to datetime64[us] and then to datetime64[D].
BUG: The previous implementation wasn't pickleable. I therefore provide custom
__getstate__ and __setstate__ methods. The main difficulty were the
busdaycalendar object and the holidays numpy.array(dtype='datetime64'). I
therefore keep only the holidays as a tuple and reconstruct the busdaycalendar
on unpickling.
BUG: The previous pickling fix caused a regression. This should fix it.
TST: Copied existing tests for BusinessDay for CustomBusinessDay to test that
the CustomBusinessDay class can be used as a drop-in replacement of the
BusinessDay class. Note that this doesn't yet test any of the additional
functionality provided by CustomBusinessDay and only tests that it functions
equivalently to BusinessDay.
BUG: Added missing objects identified by the tests added in e0f8b3d.
TST: Added tests for the holidays and weekmask functionality of the
CustomBusinessDay class.
DOC: Added notes on the CustomBusinessDay class to the release notes as well as
the TimeSeries documentation.
ENH: Added check for required version of Numpy.
ENH: Switched to more robust version check using LooseVersion. Suppressed
creation of CustomBusinessDay instances when requirements aren't met.
TST: Added checks to skip tests involving CustomBusinessDay when this class
isn't available due to numpy requirements not being met.
BUG: Fixing another CustomBusinessDay dependency identified by Travis
TST: Some of the Travis builds are failing with a NameError for not finding
nose when raising nose.SkipTest. My guess it's due to me calling nose.SkipTest
in setUp() so hopefully these changes will fix it.
BUG: Fixed obvious bug of not importing nose before trying to use it.
ENH: Changed ImportError to NotImplementedError. Incorporated other changes
suggested by @jreback.