Validation Manager
Manager for data validation processes.
ValidationManager
Bases: QObject
Manages the validation process including starting, cancelling or getting the status of running validation tasks.
Source code in src/cplus_plugin/lib/validation/manager.py
cancel
Cancels a validation process matching the result of the submission.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
result |
SubmitResult
|
Result of the validation submission. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if the validation task was successfully cancelled else False if the submit results status was not successful or if the validation task was not found. |
Source code in src/cplus_plugin/lib/validation/manager.py
cancel_ncs_validation
Cancel all validation processes of NCS pathway datasets.
Source code in src/cplus_plugin/lib/validation/manager.py
is_validation_complete
Checks whether the validation process, based on the given submission result, is complete.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
result |
SubmitResult
|
Result of the request for validation. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if the validation process is complete, else False if it is still in progress or has failed. |
Source code in src/cplus_plugin/lib/validation/manager.py
last_ncs_result
Gets the result of the last successful validation of NCS pathways.
Returns:
Type | Description |
---|---|
ValidationResult
|
Result of the last successful NCS pathway validation. |
Source code in src/cplus_plugin/lib/validation/manager.py
ncs_results
Gets the validation results for NCS pathways.
Returns:
Type | Description |
---|---|
list
|
A list containing the validation results for NCS pathways or an empty list if no results are found. |
Source code in src/cplus_plugin/lib/validation/manager.py
on_validation_status_changed
Slot raised when the status of a validation task has changed.
This function will emit when the validation task has started, when it has completed successfully or terminated due to an error.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task_id |
int
|
ID of the task. |
required |
status |
TaskStatus
|
New task status. |
required |
Source code in src/cplus_plugin/lib/validation/manager.py
results_by_component_type
Gets the validation results based on the model component type of the validator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
component_type |
ModelComponentType
|
Model component type e.g. NCS pathway. |
required |
Returns:
Type | Description |
---|---|
list
|
A list containing the validation results for the given model component type or an empty list if no results are found. |
Source code in src/cplus_plugin/lib/validation/manager.py
validate_ncs_pathways
Validates a set of NcsPathway datasets and returns the status of the submission.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pathways |
List[NcsPathway]
|
A list of NcsPathway objects to be validated. At least one NcsPathway is required for the validation process to be executed. |
required |
cancel_running |
bool
|
True if any running validation processes are to be cancelled else False if multiple concurrent validation processes are to be executed. |
True
|
Returns:
Type | Description |
---|---|
SubmitResult
|
Result object containing the task id and status of the submission. |
Source code in src/cplus_plugin/lib/validation/manager.py
validation_result
Gets the validation result based on the given submission result.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
result |
SubmitResult
|
Result of the request for validation. |
required |
Returns:
Type | Description |
---|---|
ValidationResult
|
Validation result if the process was complete else None if the submission or actual validation process failed. |