Distributing a set of pre-configured computers and codes is a problem that needs to be solved in basically all groups who want to start using AiiDA.
Currently, the person in charge needs to write some hand-crafted python scripts (e.g. like this one) in order to automate the computer/code setup, which is tedious and extra code that needs to be maintained.
One way to improve the user experience could be the following:
- A subfolder of the
AIIDA_PATH is used to store a set of computer/code configurations (following a well-defined schema). All the user needs to do is to drop a few specific configuration files into this folder.
- When
load_computer or load_code detect that a desired code/computer is not present in the database, they first look inside this folder. If a corresponding configuration is found, the computer/code is set up on the fly (if not, NotExistent error is raised as usual)
- A
verdi config option could be used to enable/disable this feature
- It may be necessary to allow passing of template variables to
load_computer / load_code
I'll open a draft pull request against the aiida-code-registry that outlines how this could work.
It's not yet touching AiiDA core (this could be done later, if others agree that this would be a welcome feature).
Pinging @unkcpz for info
Distributing a set of pre-configured computers and codes is a problem that needs to be solved in basically all groups who want to start using AiiDA.
Currently, the person in charge needs to write some hand-crafted python scripts (e.g. like this one) in order to automate the computer/code setup, which is tedious and extra code that needs to be maintained.
One way to improve the user experience could be the following:
AIIDA_PATHis used to store a set of computer/code configurations (following a well-defined schema). All the user needs to do is to drop a few specific configuration files into this folder.load_computerorload_codedetect that a desired code/computer is not present in the database, they first look inside this folder. If a corresponding configuration is found, the computer/code is set up on the fly (if not,NotExistenterror is raised as usual)verdi configoption could be used to enable/disable this featureload_computer/load_codeI'll open a draft pull request against the aiida-code-registry that outlines how this could work.
It's not yet touching AiiDA core (this could be done later, if others agree that this would be a welcome feature).
Pinging @unkcpz for info