Updated usage example
This commit is contained in:
parent
47f052bb9c
commit
97eab72b78
1 changed files with 6 additions and 1 deletions
|
@ -40,12 +40,17 @@ validator = Validator("funpdbe_resource_name") # Same as in the JSON
|
||||||
validator.load_schema("data/funpdbe_schema.json")
|
validator.load_schema("data/funpdbe_schema.json")
|
||||||
validator.load_json("data/funpdbe_data.json")
|
validator.load_json("data/funpdbe_data.json")
|
||||||
|
|
||||||
|
|
||||||
if validator.basic_checks() and validator.validate_against_schema():
|
if validator.basic_checks() and validator.validate_against_schema():
|
||||||
# Passed data validations
|
# Passed data validations
|
||||||
|
print('Passed schema validation')
|
||||||
residue_indexes = ResidueIndexes(validator.json_data)
|
residue_indexes = ResidueIndexes(validator.json_data)
|
||||||
if residue_indexes.check_every_residue():
|
if residue_indexes.check_every_residue():
|
||||||
# Passed the index validation
|
# Passed the index validation
|
||||||
return True
|
print('Passed index validation')
|
||||||
|
else:
|
||||||
|
print('Failed schema validation')
|
||||||
|
print(validator.error_log)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running the tests
|
### Running the tests
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue