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

ENH: Add a classmethod to TradingAlgorithm to get all API methods. #333

Merged
merged 2 commits into from May 14, 2014

Conversation

Projects
None yet
2 participants
@ssanderson
Member

ssanderson commented May 14, 2014

In the api_method decorator, tag registered methods as being part of the zipline api.
In TradingAlgorithm, add an all_api_methods that returns all the methods so-tagged.

@twiecki

This comment has been minimized.

Contributor

twiecki commented May 14, 2014

Sorry, what's the purpose of this?

@ssanderson

This comment has been minimized.

Member

ssanderson commented May 14, 2014

It allows you to programmatically get access to Zipline API methods. The immediate use-case is for an ast static-analysis tool that detects invalid parameters to API methods in algorithm scripts.

@twiecki

This comment has been minimized.

Contributor

twiecki commented May 14, 2014

Cool. Code looks good to me.

@ssanderson ssanderson merged commit 2be999e into master May 14, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@ssanderson ssanderson deleted the api_methods_method branch May 14, 2014

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