a-hurst / klibs

A simple Python framework for writing cognitive psychology experiments
7 stars 1 forks source link

Revise and improve EventManager #26

Closed a-hurst closed 1 year ago

a-hurst commented 1 year ago

PR Description

This PR cleans up the interface for the EventManager class, adding a new friendly add_event method and deprecating TrialEventTicket and register_ticket. The start_clock and stop_clock methods have also been renamed to start and reset, respectively. The docs have also been heavily revised for clarity.

Basically, this rewrites the EventManager class so that it's simpler and more useful/understandable as a stand-alone class. It's more-or-less what I'd write for an event manager class if I started fresh, except for methods/aliases keeping compatibility with existing code. Unit tests have also been added for the EventManager class to ensure nothing obvious was broken by the cleanup and revisions here.

Minor fixes/cleanup to the KLTime module have been made here as well.

Added:

Deprecated:

Removed:

Merge Checklist