Commit 5755e861 authored by Pierre Dittgen's avatar Pierre Dittgen

Adapt to validata-validate recent changes

parent 524bfe39
......@@ -7,9 +7,6 @@ import requests
import ujson as json
from validata_validate import validate
from goodtables import Inspector
VALIDATA_MAX_ROWS = 100000
#
......@@ -100,12 +97,10 @@ class ValidatorHelper:
checks.append({check_conf['name']: check_conf['params']})
pre_checks_conf = c_checks.get('pre_checks')
inspector = Inspector(checks=checks, row_limit=VALIDATA_MAX_ROWS)
return validate(
source=args['source'],
inspector=inspector,
schema=sc_info['schema'],
pre_checks_conf=pre_checks_conf,
checks=checks,
**{k: v for k, v in args.items() if k != 'source'}
)
......@@ -78,7 +78,8 @@ ERR_CODE_TO_CONTEXT = dict([
('minimum-constraint', 'body'),
# TODO: get it from validata_validate
('invalid-column-delimiter', 'table')
('invalid-column-delimiter', 'table'),
('missing-headers', 'table'),
# Custom checks fall in default case: body
])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment