config_validation#

catlas.config_validation.validate_element(field, value, error)#

Check if the input in a given field is an element according to Pymatgen.

Parameters
  • field (tuple) – a Cerberus field

  • value (str) – an element to check

  • error (Callable) – the Cerberus-type error raised if the input is not an element.

catlas.config_validation.validate_folder_exists(field, value, error)#

Check if the filepath in a given field has a valid enclosing folder, regardless of whether the file exists.

Parameters
  • field (tuple) – a Cerberus field

  • value (str) – a file path to check

  • error (Callable) – the Cerberus-type error raised if the folder does not exist.

catlas.config_validation.validate_path_exists(field, value, error)#

Check if the filepath in a given field exists.

Parameters
  • field (tuple) – a Cerberus field

  • value (str) – a file path to check

  • error (Callable) – the Cerberus-type error raised if the folder does not exist.