Clean up import statements so source of imported classes and functions is self-documented in code
We currently use a mix of import styles, such as import obspy
and from obspy import UTCDateTime
. If we just import a module, then when we use it the source of the classes and functions are clear, for example import obspy; now = obspy.UTCDateTime()
; however, if we use the from
style we end up with code like now = UTCDateTime()
and it is not clear where UTCDateTime
came from. This is far more difficult to follow in the internals of the gmprocess codebase where we have some functions at the module level. I propose we adopt the style import mymodule
rather than from mymodule import myfunc
. See https://softwareengineering.stackexchange.com/questions/187403/import-module-vs-from-module-import-function for additional discussion; it seems like there are no performance gains by doing from mymodule import myfunc
as the entire module is loaded regardless.