You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently every public object is exposed via the top-level __init__.py. This effects the startup time when importing latticejson as library but also the startup time of the CLI (because it is a submodule and the parent package gets always executed). Maybe it would be better to use the scipy-approach: Keep the Top-level __init__.py empty and use subpackages to import functionality. But this would be somewhat inconvenient for a user...
To solve the issue for the CLI, the cli.py could be installed separately.
Maybe the __getattr__ of PEP 562 can be used to lazy load the submodules into the top-level name space of the __init__.py.
Currently every public object is exposed via the top-level
__init__.py
. This effects the startup time when importing latticejson as library but also the startup time of the CLI (because it is a submodule and the parent package gets always executed). Maybe it would be better to use the scipy-approach: Keep the Top-level__init__.py
empty and use subpackages to import functionality. But this would be somewhat inconvenient for a user...To solve the issue for the CLI, the
cli.py
could be installed separately.Maybe the
__getattr__
of PEP 562 can be used to lazy load the submodules into the top-level name space of the__init__.py
.See also:
__init__.py
in the packageThe text was updated successfully, but these errors were encountered: