Creating new CodeNode in Aiida

Dear All,

I used to have all my external codes stored as old CodeNodes. Recently, I started moving everything to core.code.*, as suggested by deprecation warnings. I installed my new codes as, following example:

verdi code create core.code.containerized --config pq2.yaml

However, I still getting this error:

/.../aiida-qp2/lib/python3.9/site-packages/aiida/orm/nodes/data/code/legacy.py:42: 
AiidaDeprecationWarning: The `Code` class is deprecated. To create an instance, use the 
`aiida.orm.nodes.data.code.installed.InstalledCode` or 
`aiida.orm.nodes.data.code.portable.PortableCode` for a "remote" or "local" code, respectively. If you are using this class to compare type, e.g. in `isinstance`, use 
`aiida.orm.nodes.data.code.abstract.AbstractCode`. (this will be removed in v3)

Am I doing it right? I would not want to do it again.

It is possible that these warnings are red herrings. To keep backwards compatibility, the new code classes still had to subclass the deprecated Code class. Unfortunately, this means that the warning is displayed even when using a new code class. You can check the output of verdi code list. If the new codes have the type string core.code.installed, core.code.portable or core.code.containerized, you should be good.

Thank you that was my suspicion.