clowder.yaml.validation package

Submodules

clowder.yaml.validation.defaults module

clowder.yaml defaults validation

clowder.yaml.validation.defaults.validate_yaml_defaults(defaults, yaml_file)

Validate defaults in clowder loaded from yaml file

Parameters:
  • defaults (dict) – Parsed YAML python object for defaults
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.defaults.validate_yaml_defaults_import(defaults, yaml_file)

Validate clowder.yaml defaults with an import

Parameters:
  • defaults (dict) – Parsed YAML python object for defaults
  • yaml_file (str) – Path to yaml file

clowder.yaml.validation.forks module

clowder.yaml forks validation

clowder.yaml.validation.forks.validate_yaml_fork(fork, yaml_file)

Validate fork in clowder loaded from yaml file

Parameters:
  • fork (dict) – Parsed YAML python object for fork
  • yaml_file (str) – Path to yaml file

clowder.yaml.validation.groups module

clowder.yaml groups validation

clowder.yaml.validation.groups.validate_yaml_groups(groups, yaml_file)

Validate groups in clowder loaded from yaml file

Parameters:
  • groups (dict) – Parsed YAML python object for groups
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.groups.validate_yaml_groups_import(groups, yaml_file)

Validate groups in clowder loaded from yaml file with import

Parameters:
  • groups (dict) – Parsed YAML python object for groups
  • yaml_file (str) – Path to yaml file

clowder.yaml.validation.projects module

clowder.yaml projects validation

clowder.yaml.validation.projects.validate_yaml_projects(projects, yaml_file)

Validate projects in clowder loaded from yaml file

Parameters:
  • projects (dict) – Parsed YAML python object for projects
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.projects.validate_yaml_projects_import(projects, yaml_file)

Validate projects in clowder loaded from yaml file import

Parameters:
  • projects (dict) – Parsed YAML python object for projects
  • yaml_file (str) – Path to yaml file

clowder.yaml.validation.sources module

clowder.yaml sources validation

clowder.yaml.validation.sources.validate_yaml_sources(sources, yaml_file)

Validate sources in clowder loaded from yaml file

Parameters:
  • sources (dict) – Parsed YAML python object for sources
  • yaml_file (str) – Path to yaml file

clowder.yaml.validation.util module

clowder.yaml utilities

clowder.yaml.validation.util.validate_clowder_yaml_contains_value(parsed_yaml, value, yaml_file)

Check whether yaml file contains value

Parameters:
  • parsed_yaml (dict) – Parsed YAML python object
  • value (str) – Name of entry to check
  • yaml_file (str) – Path to yaml file
Raises:

ClowderYAMLError

clowder.yaml.validation.util.validate_depth(dictionary, yaml_file)

Validate depth

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.util.validate_dict_contains_value(dictionary, dict_name, value, yaml_file)

Check whether yaml file contains value

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • dict_name (str) – Name of dict to print if missing
  • value (str) – Name of entry to check
  • yaml_file (str) – Path to yaml file
Raises:

ClowderYAMLError

clowder.yaml.validation.util.validate_empty(collection, name, yaml_file)

Check whether collection is not empty

Parameters:
  • collection – Parsed YAML python object
  • name (str) – Name of collection to print if empty
  • yaml_file (str) – Path to yaml file
Raises:

ClowderYAMLError

clowder.yaml.validation.util.validate_not_empty(collection, name, yaml_file)

Check whether collection is empty

Parameters:
  • collection – Parsed YAML python object
  • name (str) – Name of collection to print if empty
  • yaml_file (str) – Path to yaml file
Raises:

ClowderYAMLError

clowder.yaml.validation.util.validate_optional_bool(dictionary, value, yaml_file)

Check whether yaml file contains optional boolean

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • value (str) – Name of entry to check
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.util.validate_optional_dict(dictionary, value, func, yaml_file)

Check whether yaml file contains optional value

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • value (str) – Name of entry to check
  • func (callabel) – Function to call to validate dictionary
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.util.validate_optional_protocol(dictionary, yaml_file)

Check whether protocol type is valid

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.util.validate_optional_ref(dictionary, yaml_file)

Check whether ref type is valid

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.util.validate_optional_string(dictionary, value, yaml_file)

Check whether yaml file contains optional string

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • value (str) – Name of entry to check
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.util.validate_protocol_type(dictionary, yaml_file)

Check whether protocol type is valid

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • yaml_file (str) – Path to yaml file
Raises:

ClowderYAMLError

clowder.yaml.validation.util.validate_ref_type(dictionary, yaml_file)

Check whether ref type is valid

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • yaml_file (str) – Path to yaml file
Raises:

ClowderYAMLError

clowder.yaml.validation.util.validate_required_dict(dictionary, value, func, yaml_file)

Check whether yaml file contains required value

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • value (str) – Name of entry to check
  • func (callable) – Function to call to validate dict entries
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.util.validate_required_protocol(dictionary, yaml_file)

Check for required protocol value

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.util.validate_required_ref(dictionary, yaml_file)

Check for required ref value

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.util.validate_required_string(dictionary, dict_name, value, yaml_file)

Check whether yaml file contains required value

Parameters:
  • dictionary (dict) – Parsed YAML python object
  • dict_name (str) – Name of dict to print if missing
  • value (str) – Name of entry to check
  • yaml_file (str) – Path to yaml file
clowder.yaml.validation.util.validate_type(value, name, classinfo, type_name, yaml_file)

Validate value type

Parameters:
  • value – Value to check
  • name (str) – Name of value to print if invalid
  • classinfo (type) – Type to check
  • type_name (str) – Name of type to print if invalid
  • yaml_file (str) – Path to yaml file
Raises:

ClowderYAMLError

clowder.yaml.validation.util.validate_type_depth(value, yaml_file)

Validate depth value

Parameters:
  • value (int) – Integer depth value
  • yaml_file (str) – Path to yaml file
Raises:

ClowderYAMLError

Module contents