As discussed in #35. That PR can be closed if this one is merged.
I had some concern at first regarding the timing of the registration of the "standard" adapters. But register_standard_adapters is called when Perpetuity.data_source is called, so the adapter class will be loaded by then. (If they weren't, then the const_get in data_source would not have worked.)
I made sure that the registration will allow re-registering an adapter, as long as it's the same class each time. That will allow us to have the standard adapters register themselves whenever we want to do that.
As discussed in #35. That PR can be closed if this one is merged.
I had some concern at first regarding the timing of the registration of the "standard" adapters. But
register_standard_adapters
is called whenPerpetuity.data_source
is called, so the adapter class will be loaded by then. (If they weren't, then theconst_get
indata_source
would not have worked.)I made sure that the registration will allow re-registering an adapter, as long as it's the same class each time. That will allow us to have the standard adapters register themselves whenever we want to do that.