wildlife-dynamics/ecoscope

SPIKE: Lazy import ecoscope

Closed this issue · 1 comments

Taking #166 and #142 a step further, we can improve the import time of ecoscope by adding lazy imports to our __init__.pys

I think this approach suits the 'swiss army knife' style of ecoscope core and could allow some performance benefits to modules and workflows only importing what they need, rather than eagerly loading all of ecoscope.

The main issues to work through with this spike are:

  • type checking and how that looks if all our module loads are deferred
  • any dealbreaker issues with workflow/module integration

See comments on #142