Commit Graph

2 Commits

Author SHA1 Message Date
Joe Jevnik 3c37704a5b ENH: Adds a new api method schedule_function.
schedule_function takes a date rule, a time rule, and a function and
will call the function, passing context and data only when the two rules
fire. This allows for code that is conditional to the datetime of the
algo.

This is implemented internally with `Event` objects which are pairings
of `EventRule`s and callbacks.

handle_data becomes a special event with a rule that always fires. This
makes the logic for handling events more complete and compact.
2014-10-06 13:42:36 -04:00
Joe Jevnik 4db4256cfe MAINT: Adds a tests/utils/ directory and renames test_utils.py
to utils/test_factory.py
2014-09-29 12:57:39 -04:00