Handling jinja
-style fields in yaml
files when using --config
#6294
Labels
type/feature request
status undecided
For easy setting up of computers and codes, there currently exist
aiida-code-registry
andaiida-resource-registry
. In the former repo, configuration files are explicit/specific, with most values already set (apart from things likeusername
). While in the latter repo, fields are often kept more general, and insteadjinja
variables are used, e.g. for Quantum Espresso:This is done to keep these fields dynamic, so they can then be filled in manually/graphically in
aiidalab
(if I understand correctly, the main focus of the repo so far).Now, as we are planning to replace
aiida-code-registry
, and makeaiida-resource-registry
the main hub for computer and code configuration files, they should also be compatible withaiida-core
. Currently, with the provided files,verdi
fails due to themetadata
section, and sets thejinja
variable expressions as the literal fields, e.g. labelling the computer{{ label }}
(ofc, to resolve the latter, one could just do a simple search-and-replace).Now, to make
aiida-resource-registry
easier compatible withaiida-core
we could differentiate inside the repo between files intended to be used inaiidalab
andaiida-core
, and just update and move the files fromaiida-code-registry
there (will create issues/PRs in the respective places, as well).Or, additionally, which might be a neat feature, add in
aiida-core
the functionality that whenjinja
variables are found, the user is prompted for input only on these items. Like this, fully specified files are still read in automatically byverdi
, while one is only prompted for fields such aslabel
that cannot be generalized (or could they? :3) - that is, without each person having to manually search-and-replace them in theyaml
files. Also, forgetting to replace fields wouldn't lead to things like codes labelled{{ label }}
in the database.In the short term, this seems like a small issue, but in the long term we could almost fully automate the setup of computers/codes by using the registry, such that new users basically don't have to take care of anything during their setup and configuration, as long as the files already exist in the registry (see also this PR), possibly removing another entry hurdle.
Pinging @mbercx and @unkcpz here to add their thoughts, as I brought it up to both of you.
The text was updated successfully, but these errors were encountered: