From: Diane Trout Date: Tue, 31 Mar 2015 22:37:11 +0000 (-0700) Subject: add a docstring to validate X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=64618b8496f08eb33cf8a9097c2c2459d61187c6 add a docstring to validate --- diff --git a/htsworkflow/submission/encoded.py b/htsworkflow/submission/encoded.py index 26c07f7..40512eb 100644 --- a/htsworkflow/submission/encoded.py +++ b/htsworkflow/submission/encoded.py @@ -372,6 +372,15 @@ class ENCODED: return result def validate(self, obj, object_type=None): + """Validate an object against the ENCODED schema + + Args: + obj (dictionary): object attributes to be submitted to encoded + object_type (string): ENCODED object name. + + Raises: + ValidationError: if the object does not conform to the schema. + """ object_type = object_type if object_type else self.get_object_type(obj) schema_url = self.get_schema_url(object_type) if not schema_url: