projects
/
htsworkflow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe1b091
)
add a docstring to validate
author
Diane Trout
<diane@ghic.org>
Tue, 31 Mar 2015 22:37:11 +0000
(15:37 -0700)
committer
Diane Trout
<diane@ghic.org>
Tue, 31 Mar 2015 22:37:11 +0000
(15:37 -0700)
htsworkflow/submission/encoded.py
patch
|
blob
|
history
diff --git
a/htsworkflow/submission/encoded.py
b/htsworkflow/submission/encoded.py
index 26c07f7ab2c1889d60929f1844b417bad10aa07e..40512ebf6a9ee01aea6252a1c62167ec62b70e4e 100644
(file)
--- 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: