Open mbercx opened 3 years ago
Just a small point of nuance: the change is backwards compatible, but the old entry points are deprecated and will no longer work after some time
Note that during the discussion of the changes in the entry point names, another point came to discussion. For a long time, we have been recommending new users to use the factories to load plugins, including basic data plugins that ship with aiida-core
. The main idea behind this decision was that this would protect users from import errors if the resources would be moved. However, using the factories also has downsides, for example it makes the life of static analysis tools more difficult as they cannot introspect the resources loaded by the factories. Therefore it might be better to recommend to use the direct import method for certain classes. Especially for the base data plugins of aiida-core
, e.g., Float
, Str
etc., it may be better to simply recommend to use from aiida.orm import Float
.
If we decide to change this, we should address this in all the tutorials and documentation. However, we should make sure that the factories are still properly explained and say that sometimes they are fine to be used, especially for the entry points of external plugin packages.
In https://github.com/aiidateam/aiida-core/pull/5073, the entry points of plugins that ship with
aiida-core
are prefixed withcore.
. Once this change has been released, the tutorial material must be updated to reflect this backwards incompatible change.