Validation App¶
validation.helpers¶
validation.helpers module contents¶
Created on Tue Feb 19 16:15:35 2019
@author: Paolo Cozzi <cozzi@ibba.cnr.it>
-
class
validation.helpers.MetaDataValidation(ruleset_filename='/home/docs/checkouts/readthedocs.org/user_builds/image-injecttool/conda/latest/lib/python3.6/site-packages/image_validation/sample_ruleset_v3a0ee76.json')[source]¶ Bases:
objectA class to deal with IMAGE-ValidationTool ruleset objects
-
__init__(ruleset_filename='/home/docs/checkouts/readthedocs.org/user_builds/image-injecttool/conda/latest/lib/python3.6/site-packages/image_validation/sample_ruleset_v3a0ee76.json')[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
check_biosample_id_target(biosample_id, record_id, record_result)[source]¶ Check if a target biosample_id exists or not. If it is present, ok. Otherwise a ValidationResultColumn with a warning
- Parameters
- Returns
an updated image_validation object
- Return type
ValidationResult.ValidationResultRecord
-
check_relationship(record, record_result)[source]¶ Check relationship for an Animal/Sample record and return a list of dictionaries (to_biosample() objects) of related object
- Parameters
record (dict) – An Animal/Sample.to_biosample() dictionary object
record_result (ValidationResult.ValidationResultRecord) – an image_validation result object
- Returns
a list of dictionaries of relate objects ValidationResult.ValidationResultRecord: an updated image_validation object
- Return type
-
ruleset= None¶
-
-
exception
validation.helpers.OntologyCacheError[source]¶ Bases:
ExceptionIdentifies temporary issues with EBI servers and image_validation.use_ontology.OntologyCache objects
-
validation.helpers.construct_validation_message(submission)[source]¶ Function will return dict with all the data required to construct validation message
- Parameters
submission (uid.models.Submission) – submission to get data from
- Returns
dictionary with all required data for validation message or None if database objects do not exist
- Return type
validation.models¶
validation.models module contents¶
Created on Mon Jan 28 11:09:02 2019
@author: Paolo Cozzi <cozzi@ibba.cnr.it>
-
class
validation.models.ValidationResult(id, submission, content_type, object_id, status, messages)[source]¶ Bases:
django.db.models.base.Model-
exception
DoesNotExist¶
-
exception
MultipleObjectsReturned¶
-
animals¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
content_object¶ Provide a generic many-to-one relation through the
content_typeandobject_idfields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
content_type¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
content_type_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
messages¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name_limit= <Q: (OR: (AND: ('app_label', 'uid'), ('model', 'animal')), (AND: ('app_label', 'uid'), ('model', 'sample')))>¶
-
object_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
samples¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
status¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
submission¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
submission_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
validation.models.ValidationSummary(id, submission, all_count, validation_known_count, issues_count, pass_count, warning_count, error_count, type, messages)[source]¶ Bases:
django.db.models.base.Model-
exception
DoesNotExist¶
-
exception
MultipleObjectsReturned¶
-
all_count¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
error_count¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
issues_count¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
messages¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <django.db.models.manager.Manager object>¶
-
pass_count¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
submission¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
-
submission_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
type¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
validation_known_count¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
warning_count¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception