Open mbercx opened 1 year ago
For the validation of the settings
/parameters
, we should also decide on https://github.com/aiidateam/aiida-quantumespresso/issues/121. I am tentatively in favor of enforcing capitalization of the top-level keys, with lowercase second-level keys for the parameters
. Having to deal with both in the code will make it messy, unless we adapt the capitalization on the fly. This is also a possibility, but then we should at least raise a warning.
Having to deal with both in the code will make it messy, unless we adapt the capitalization on the fly. This is also a possibility, but then we should at least raise a warning.
This is what I love, having a warning but supporting using lower-case for namelist.
Currently a lot of validation is still done in the
prepare_for_submission()
method, for example:https://github.com/aiidateam/aiida-quantumespresso/blob/cc29488c9e450bac5af7d28ee3f79ab8bcb01b6a/src/aiida_quantumespresso/calculations/__init__.py#L445-L452
This is bad practise, since it's detrimental to user experience for two reasons:
Excepted
state:verdi process report
, and parse a difficult to read Traceback:I'm assuming this code is still from before validators were a thing. Let's move all that to validators.
To make these changes bite-sized and easy to review, I suggest we split up the work:
settings
parallelization
parameters
structure
- e.g.has_vacancies
k-points