add a docstring to validate
authorDiane Trout <diane@ghic.org>
Tue, 31 Mar 2015 22:37:11 +0000 (15:37 -0700)
committerDiane Trout <diane@ghic.org>
Tue, 31 Mar 2015 22:37:11 +0000 (15:37 -0700)
htsworkflow/submission/encoded.py

index 26c07f7ab2c1889d60929f1844b417bad10aa07e..40512ebf6a9ee01aea6252a1c62167ec62b70e4e 100644 (file)
@@ -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: