Some imports can be placed inside a function scope to ensure they do run when not needed. This will improve start-up time.
In hpcflow.sdk.core.actions, h5py is only need in these methods:
ElementActionRun.write_source
ElementActionRun._param_save
In hpcflow.sdk.persistence.utils, paramiko is only needed in the method ask_pw_on_auth_exc.
In hpcflow.sdk.app, find_packages from setuptools is only used in the method BaseApp._load_scripts, which is called by BaseApp._load_template_components, which in turn is called on demand when template components are accessed.
Some imports can be placed inside a function scope to ensure they do run when not needed. This will improve start-up time.
In
hpcflow.sdk.core.actions
,h5py
is only need in these methods:ElementActionRun.write_source
ElementActionRun._param_save
In
hpcflow.sdk.persistence.utils
,paramiko
is only needed in the methodask_pw_on_auth_exc
.In
hpcflow.sdk.app
,find_packages
fromsetuptools
is only used in the methodBaseApp._load_scripts
, which is called byBaseApp._load_template_components
, which in turn is called on demand when template components are accessed.