aiidateam / aiida-tutorials

AiiDA tutorials web site
http://aiida-tutorials.readthedocs.org
23 stars 37 forks source link

👌 IMPROVE: Use `load_code` as a way to load `Code` objects #337

Closed sphuber closed 2 years ago

sphuber commented 3 years ago

I have seen multiple uses of various outdated ways of loading Code objects. E.g.

Code.get_from_string(codename)
Code.get(label='pw-6.3', machinename='TheHive')

although these still (might) work, I don't think we should be teaching them and should actually deprecate them as they are leftovers of AiiDA v0.x. Instead, we should encourage to use

load_code('pw-6.3@computer')

The reason is that this matches all other loaders, load_node, load_group etc. and it is the smartest as it can also be used to use a PK or UUID.

ltalirz commented 2 years ago

Just grepped get_from_string in branch tutorial-2021-intro and got zero results.