Skip to content

Commit

Permalink
Validating games.yaml schema
Browse files Browse the repository at this point in the history
  • Loading branch information
nikuda committed Oct 7, 2016
1 parent ddc62ba commit 63fa5d4
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 133 deletions.
5 changes: 4 additions & 1 deletion _ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import yaml
from cyrax import events
from pykwalify.core import Core


def abort(msg):
Expand Down Expand Up @@ -84,8 +85,10 @@ def parse_items(site, item, key):


def parse_data(site):
data = yaml.load(file(op.join(op.dirname(__file__), 'games.yaml')))
c = Core(source_file='games.yaml', schema_files=['schema.yaml'])
c.validate(raise_exception=True)

data = yaml.load(file(op.join(op.dirname(__file__), 'games.yaml')))
for item in data:
parse_items(site, item, 'clones')
parse_items(site, item, 'reimplementations')
Expand Down
Loading

0 comments on commit 63fa5d4

Please sign in to comment.