New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Add BarReader base class for both minute and session readers #1486

Merged
merged 1 commit into from Sep 14, 2016

Conversation

Projects
None yet
3 participants
@jbredeche
Member

jbredeche commented Sep 14, 2016

No functional changes.

@@ -0,0 +1,123 @@
from abc import ABCMeta, abstractmethod, abstractproperty

This comment has been minimized.

@ehebert

ehebert Sep 14, 2016

Member

Missing copyright notice.

This comment has been minimized.

@jbredeche

jbredeche Sep 14, 2016

Member

no longer!

----------
sid : int
The asset identifier.
session : pd.Timestamp

This comment has been minimized.

@ehebert

ehebert Sep 14, 2016

Member

Now that it is generalized, this should be dt not session.

Returns
-------
last_traded : pd.Timestamp
The minute of the last trade for the given asset, using the input

This comment has been minimized.

@ehebert

ehebert Sep 14, 2016

Member

s/minute/dt/g

@@ -525,6 +525,9 @@ def last_available_dt(self):
def first_trading_day(self):
return self._minute_bar_reader.first_trading_day
def get_last_traded_dt(self, asset, dt):

This comment has been minimized.

@ehebert

ehebert Sep 14, 2016

Member

Could you add a basic test to test_resample to cover this?

e.g.:

    def test_get_last_traded_dt(self):
        self.assertEqual(self.END_DATE,
                                   self.session_bar_reader.get_last_traded_dt)

This comment has been minimized.

@jbredeche
@coveralls

This comment has been minimized.

coveralls commented Sep 14, 2016

Coverage Status

Coverage increased (+0.008%) to 86.667% when pulling 23cbe2d on all-the-readers-unite into fb0981e on master.

@coveralls

This comment has been minimized.

coveralls commented Sep 14, 2016

Coverage Status

Coverage increased (+0.02%) to 86.675% when pulling a385016 on all-the-readers-unite into fb0981e on master.

1 similar comment
@coveralls

This comment has been minimized.

coveralls commented Sep 14, 2016

Coverage Status

Coverage increased (+0.02%) to 86.675% when pulling a385016 on all-the-readers-unite into fb0981e on master.

@jbredeche jbredeche force-pushed the all-the-readers-unite branch from a385016 to a5693d0 Sep 14, 2016

@coveralls

This comment has been minimized.

coveralls commented Sep 14, 2016

Coverage Status

Coverage increased (+0.02%) to 86.675% when pulling a5693d0 on all-the-readers-unite into fb0981e on master.

2 similar comments
@coveralls

This comment has been minimized.

coveralls commented Sep 14, 2016

Coverage Status

Coverage increased (+0.02%) to 86.675% when pulling a5693d0 on all-the-readers-unite into fb0981e on master.

@coveralls

This comment has been minimized.

coveralls commented Sep 14, 2016

Coverage Status

Coverage increased (+0.02%) to 86.675% when pulling a5693d0 on all-the-readers-unite into fb0981e on master.

@jbredeche jbredeche merged commit 5e52d29 into master Sep 14, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jbredeche jbredeche deleted the all-the-readers-unite branch Sep 14, 2016

bartosh pushed a commit to bartosh/zipline that referenced this pull request Sep 27, 2016

Merge pull request quantopian#1486 from quantopian/all-the-readers-unite
MAINT: Add BarReader base class for both minute and session readers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment