Some of the hosts perform operations during import that could take a significant amount of time and/or require external files. When the SPICE kernels are not stored locally and must be cached from a remote source, doing any operation with the kernels may involve lengthy remote copy operations. There should never be expensive operations during a plain import. This not only potentially requires downloading files that aren't actually going to be used, but also significantly slows down test discovery during unit testing, since all of the modules are imported at that time. Such operations should be performed inside of class initialization or in other guarded locations.
Examples:
cassini/__init__.py calls oops.spice.load_leap_seconds()
newhorizons/lorri.py calls LORRI.initialize() which ends up loading a bunch of SPICE kernels
voyager/iss.py calls ISS.initialize() which ends up loading a bunch of SPICE kernels
There may be others.
Some of the hosts perform operations during import that could take a significant amount of time and/or require external files. When the SPICE kernels are not stored locally and must be cached from a remote source, doing any operation with the kernels may involve lengthy remote copy operations. There should never be expensive operations during a plain import. This not only potentially requires downloading files that aren't actually going to be used, but also significantly slows down test discovery during unit testing, since all of the modules are imported at that time. Such operations should be performed inside of class initialization or in other guarded locations.
Examples:
cassini/__init__.pycallsoops.spice.load_leap_seconds()newhorizons/lorri.pycallsLORRI.initialize()which ends up loading a bunch of SPICE kernelsvoyager/iss.pycallsISS.initialize()which ends up loading a bunch of SPICE kernelsThere may be others.