File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed
Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -142,11 +142,11 @@ def convert(self, work_dir):
142142
143143 # validate json
144144 with open (join (SCHEMAS_PATH , INVESTIGATION_SCHEMA )) as json_fp :
145- #investigation_schema = json.load(json_fp)
146- #schema = DRAFT4.create_resource(investigation_schema)
147- #registry = Registry.with_resource(investigation_schema['id'], schema)
148- #validator = Draft4Validator(investigation_schema, registry=registry)
149- #validator.validate(isa_json)
145+ # investigation_schema = json.load(json_fp)
146+ # schema = DRAFT4.create_resource(investigation_schema)
147+ # registry = Registry.with_resource(investigation_schema['id'], schema)
148+ # validator = Draft4Validator(investigation_schema, registry=registry)
149+ # validator.validate(isa_json)
150150
151151 resources = []
152152 schemas_dir = Path (SCHEMAS_PATH )
Original file line number Diff line number Diff line change 44Don't forget to read the ISA-JSON spec:
55https://isa-specs.readthedocs.io/en/latest/isajson.html
66"""
7+
78from __future__ import absolute_import
89
910import glob
@@ -545,7 +546,6 @@ def check_utf8(fp):
545546 raise SystemError ()
546547
547548
548-
549549def check_isa_schemas (isa_json , investigation_schema_path ):
550550 """Used for rule 0003 and 4003"""
551551 try :
Original file line number Diff line number Diff line change @@ -359,9 +359,11 @@ def test_validate_testdata_sampleassayplan_json(self):
359359 sample_assay_plan_schema = json .load (fp )
360360
361361 resources = []
362- res_path = pathlib .Path (
363- "file://" , self .v2_create_schemas_path , "sample_assay_plan_schema.json"
364- ).resolve ().as_uri ()
362+ res_path = (
363+ pathlib .Path ("file://" , self .v2_create_schemas_path , "sample_assay_plan_schema.json" )
364+ .resolve ()
365+ .as_uri ()
366+ )
365367 schemas_dir = pathlib .Path ("file://" , self .v2_create_schemas_path )
366368 for p in sorted (schemas_dir .glob ("*.json" )):
367369 contents = json .loads (p .read_text (encoding = "utf-8" ))
@@ -374,7 +376,6 @@ def test_validate_testdata_sampleassayplan_json(self):
374376 validator = Draft4Validator (schema_ref , registry = registry , format_checker = FormatChecker ())
375377 validator .validate (json .load (test_case_fp ))
376378
377-
378379 def test_validate_testdata_sampleassayplan_qc_json (self ):
379380 with open (os .path .join (utils .JSON_DATA_DIR , "create" , "sampleassayplan_qc_test.json" )) as test_case_fp :
380381 with open (os .path .join (self .v2_create_schemas_path , "sample_assay_plan_schema.json" )) as fp :
You can’t perform that action at this time.
0 commit comments