15 Commits

Author SHA1 Message Date
Conner Fromknecht 99efa7a9f3 Fixed catalyst tests except example tests 2017-06-19 14:43:10 -07:00
Scott Sanderson 053206327b ENH: Name overrides in preprocessor factories.
Allows ``__funcname`` to be passed to preprocessors like expect_types
and expect_dtypes to override the name displayed in error messages.
This is useful for providing clearer errors for ``__init__`` and
``__new__`` methods in classes.
2016-10-12 15:50:10 -04:00
Scott Sanderson 8cc8814b5f BUG: Fix nondeterministic failure from sorting. 2016-08-17 19:48:33 -04:00
Scott Sanderson 19963f5b02 MAINT: Clean up downsampling boilerplate.
Consolidate docs and mixin applications into one place.
2016-08-17 16:52:09 -04:00
Scott Sanderson 1245552340 DEV: Add expect_dimensions preprocessor. 2016-03-25 15:11:18 -04:00
Richard Frank d873038a7e BUG: Specify int64 instead of system int
to handle 32bit python
2016-03-23 15:26:52 -04:00
Joe Jevnik 5351b60a4c ENH: adds optionally for preprocessors 2016-01-13 15:26:37 -05:00
Joe Jevnik 5a235bdaef ENH: allows users to specify the cutoff time for data query in blaze
loaders

This allows people to set their cutoff time to the time they will
actually execute 'before_trading_start'. Currently this is just passed
to the constructor of the loader; however, I would like to make this
managed by the algorithm simulation runner. This would help keep all of
the loaders in sync and lock 'before_trading_start's execution to the
time the data is queried for.
2016-01-13 15:26:13 -05:00
llllllllll f8ab8a5159 TST: py3 compat qualname in preprocess tests 2015-12-09 12:49:59 -05:00
Scott Sanderson 8220d1ee86 ENH: Adds support for different typed adjusted arrays and adds an
EarningsCalendar loader.

- Moves most of AdjustedArray back into Python. The window iterator is
  the only part that's performance-intensive.

- Adds a bootleg templating system for creating specialized versions of
  AdjustedArrayWindow for each concrete type we care about.

- Adds support for differently dtyped terms in pipeline. This allows us
  to use datetime64s which are needed in the EarningsCalendar.

- Adds EarningsCalendar dataset for the next and previous earnings
  announcements in pipeline.

- Adds in memory loader for EarningsCalendar.

- Adds blaze loader for EarningsCalendar.
2015-12-08 20:24:06 -05:00
llllllllll 1e05a1c4ae TST: fix py2 compat for test 2015-10-19 16:35:03 -04:00
llllllllll 22ffe3fe49 ENH: adds expect_element preprocessor 2015-10-19 16:35:03 -04:00
Stewart Douglas 4e2039c9b0 ENH: Coerce user input with API method decorator
Previously we have capitalized input strings at different levels in
our code: in the user-facing API methods and in the asset finder.
This commit moves input string capitalization exclusively to the API
method to which the string was supplied. Specifically, the string is
capitalized by a preprocess API method decorator. The preprocess
decorator passes the input string to the newly defined
ensure_upper_case() method, which returns a TypeError if the argument
supplied is not a string.

ensure_upper_case() is defined in a new file, zipline/utils/input_validation.py.
The existing expect_types() method is also moved there.

Various tests in tests/test_assets.py are modified to account for the
fact that the asset finder method lookup_symol() no longer capitalizes
its supplied argument.
2015-10-08 15:41:33 -04:00
Scott Sanderson 4f2d3d783a TEST: Template in module name.
Fixes failures when tests are invoked from different paths.
2015-10-01 18:03:54 -04:00
Scott Sanderson 00c413e9d4 ENH: Add zipline.utils.preprocess.
Implements tools for preprocessing the arguments to user-facing
functions.
2015-10-01 18:03:53 -04:00