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
In the end, we should decide whether we use relative imports in the relevant places (e.g. when we are in atomate/abinit/..., just do something like from .fireworks import scf_fw).
Pros: more concise
Cons: less clear => sometimes difficult to know from where something is imported
The text was updated successfully, but these errors were encountered:
I think this is best handled on a case-by-case basis depending on the submodule that is doing the importing.
If it is library code that is going to be used as-is, e.g. core classes/data, then I think relative imports are preferable if the import is from within the same module. I personally prefer to stay away from e.g. from ..fireworks import scf_fw.
If it is code that could be used as a template, e.g. a user might want to create their own custom SCF workflow using the existing one as a starting point, then absolute imports are better as the code can just be reused directly. I'm not sure how common this use-case is for atomate.
In the end, we should decide whether we use relative imports in the relevant places (e.g. when we are in atomate/abinit/..., just do something like
from .fireworks import scf_fw
).Pros: more concise
Cons: less clear => sometimes difficult to know from where something is imported
The text was updated successfully, but these errors were encountered: