gcubed.validator

This module contains the Validator classes that check that the model configuration is runnable.

class Validator(gcubed.base.Base):

Overview

Checks that the given model, identified by its version and build is runnable.

Validator(sym_data: gcubed.sym_data.SymData)

Constructor

Initialises the model validator. This is a base class only and should not be used directly.

Arguments

sym_data: The model SYM data.

Exceptions

Raises an exception if the sym_data argument is None or not the right type.

Returns the sym data.

Returns the model configuration.

def validate(self) -> None:

Overview

Checks that the given model configuration is allowed to be run.

This validator should never be used. It is a base class for other validators.

Exceptions

Raises an exception always. No models can be run.

class AllModelsValidator(Validator):

Overview

Checks that the given model is allowed to be run.

def validate(self) -> None:

Overview

This validator does not rule out any of the model versions or builds.

Exceptions

No exceptions are thrown by this validator. All models can be run.

class TeachingModelValidator(Validator):

Overview

Checks that the model being run is the teaching model.

def validate(self) -> None:

Overview

Checks that the given model configuration is a G-Cubed teaching model.

Exceptions

Throws an exception if the model is not the teaching model.