-
Notifications
You must be signed in to change notification settings - Fork 2
Description
commit 2ad51d1 enabled things like "from pyslice import MultisliceCalculator" instead of "from pyslice.multislice.calculators import MultisliceCalculator", because the user should not be expected to know the code structure / folder organization.
this was done by adding "from .multislice.calculators import *" and others to __init__.py
this means ALL imports occur when you do any import. where tests/00_probe.py used to only import multislice.multislice.Probe, taking a couple seconds, everything is now imported, taking up to 6 seconds.
@h-walk and I decided this is fine: okay to take a bit longer and make the code-writing experience better for the user
but if we wanted to address this, we could go through and move all the imports to inside the classes and functions (as recommended here). Then a simple import for the Probe will not import all the ase MD tools for example.