Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement validator functions for Dict inputs in Processes #81

Open
11 tasks
Tseplyaev opened this issue Feb 21, 2020 · 1 comment
Open
11 tasks

Implement validator functions for Dict inputs in Processes #81

Tseplyaev opened this issue Feb 21, 2020 · 1 comment

Comments

@Tseplyaev
Copy link
Collaborator

The internal structure of input Dicts is checked inside a Process class. It can be done in a more elegant way by implementing validator functions. On the other hand, as it was discussed at the AiiDA Hackathon, a corresponding Dict builder can be created that can provide not only validation, but also documentation.

We have to make our choice either waiting till Dict builders will be implemented or make validation functions.

A list of Processes having no modern way of input Dict validation:

  • FleurCalculation settings
  • FleurinputgenCalculation settings
  • FleurinputgenCalculation calc_parameters
  • FleurSSDispConvWorkChain wf_param
  • FleurSSDispWorkChain wf_param
  • FleurScfWorkChain wf_param
  • FleurRelaxWorkChain wf_param
  • FleurMaeConvWorkChain wf_param
  • FleurMaeWorkChain wf_param
  • FleurEosWorkChain wf_param
  • FleirDMIWorkChain wf_param

Sometimes there are options and settings in the workchains, not sure if we need to test them.

@janssenhenning
Copy link
Contributor

janssenhenning commented Mar 15, 2022

I would say we could start implementing something similar to what aiida-quantumespresso is doing using the jsonschema library to provide type checks and also provide descriptions
https://github.com/aiidateam/aiida-quantumespresso/blob/develop/aiida_quantumespresso/workflows/pdos.py

Since this is not backwards incompatible we can start small and slowly get rid of the validate_inputs steps in many workchains, since we can also attach validator functions directly to the input ports/namespaces

https://aiida.readthedocs.io/projects/aiida-core/en/latest/topics/processes/usage.html?highlight=validator#validation-and-defaults

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants