beanlab / quest_framework

A Python framework for fault-tolerant workflows
1 stars 0 forks source link

Refactor historian.py #19

Open ABCambridge opened 9 months ago

ABCambridge commented 9 months ago

Change historian.py to a sub-package with a __init__.py file so that users can import stuff without going into inner files and directories. Use __init__.py to define what you want the rest of the world to see. We'll want to fracture historian.py into several of its parts.

You can look at the changes made by Dr. Bean for reference, as well as the __int__.py file for the quest package (inside of src/). That leads to the question: what actually goes inside of Historian? Figure out which things are sliceable. This could end up with dependency injection, where the historian owns the history, and then the historian is given various protocols that fulfil its functionality. Ideally, the protocols should really return their records (or whatever they return) and then the historian takes care of putting them in the history. step might actually make the most sense to be part of historian.