Storage Configuration requires Kernel Restart
In trying to configure a custom storage location using kadlu.storage_cfg(setdir=PATH/HERE)
I encountered some unexpected behaviour.
I added a line to my notebook that set the storage location using kadlu.storage_cfg(setdir=PATH/HERE)
and then tried to run the rest of the notebook using the new specified location. However, for the location change to take effect, I had to restart the notebook kernel. Otherwise, it continued to use the previous (default) storage location despite subsequent calls to kadlu.storage_cfg()
returning the updated storage location.
When I dug into the code, it seems like this behaviour is happening b/c the db
& conn
objects (in era5.py
, etc) are instantiated when kadlu is originally imported and don't have a chance to adjust to the newly configured storage location.