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

Support the passing of a time rule positionally on the date_rule arg #1221

Merged
merged 1 commit into from Jun 3, 2016

Conversation

Projects
None yet
4 participants
@lianga888
Contributor

lianga888 commented May 20, 2016

When the user calls schedule_function(func, a_time_rule), assume that the user meant to specify a time rule but no date rule, instead of a date rule and no time rule as the signature suggests

'time_rule= when calling schedule_function without '
'specifying a date_rule'
)
self.assertEqual(warning.lineno, 13 + i)

This comment has been minimized.

@llllllllll

llllllllll May 20, 2016

Member

For zipline we can just define the functions outside of a string and then pass handle_data and initalize to TradingAlgortithm. A nice side effect of this is that we can check that the filename of the warning is __file__

This comment has been minimized.

@lianga888

lianga888 May 23, 2016

Contributor

I did that at first, but then the line number in the warning was the line in the test_algorithm.py script, and not the algocode

def initialize(context):
context.done_at_open = []
context.done_at_close = []
schedule_function(do_at_open, time_rules.market_open())

This comment has been minimized.

@llllllllll

llllllllll May 20, 2016

Member

it might help to put a comment on this line saying that it is line 13 this makes the assertion below more clear.

@coveralls

This comment has been minimized.

coveralls commented May 20, 2016

Coverage Status

Coverage increased (+0.004%) to 81.69% when pulling 6bec56f on schedule_func_args into 96ec1fd on master.

@lianga888 lianga888 force-pushed the schedule_func_args branch from 6bec56f to a636e4b May 23, 2016

@lianga888 lianga888 force-pushed the schedule_func_args branch from a636e4b to 7d509c2 May 23, 2016

@jbredeche

This comment has been minimized.

Member

jbredeche commented Jun 3, 2016

@lianga888 @llllllllll what's the status of this?

Andrew Liang

@lianga888 lianga888 force-pushed the schedule_func_args branch from 7d509c2 to 1056501 Jun 3, 2016

@lianga888 lianga888 merged commit 7d1c797 into master Jun 3, 2016

2 checks passed

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

@lianga888 lianga888 deleted the schedule_func_args branch Jun 3, 2016

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