Commit 92d9014f authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Now integrates pre-checks

parent 675bf91d
......@@ -71,7 +71,6 @@ class ValidatorHelper:
# First schema keys but 'fields'
d1 = dict([(k, v) for k, v in cls.schema_dict[schema_code]['schema'].items() if k != 'fields'])
print('D1 =', d1)
# All keys but schema* and custom_checks*
d2 = {k: v for k, v in cls.schema_dict[schema_code].items()
......@@ -94,9 +93,15 @@ class ValidatorHelper:
# Build checks configuration
checks = ['structure', 'schema']
pre_checks_conf = []
if 'custom_checks' in sc_info:
for check_conf in sc_info['custom_checks']['checks']:
c_checks = sc_info['custom_checks']
for check_conf in c_checks['checks']:
checks.append({check_conf['name']: check_conf['params']})
if 'pre_checks' in c_checks:
for check_conf in c_checks['pre_checks']:
pre_checks_conf.append({check_conf['name']: check_conf['params']})
inspector = Inspector(checks=checks, row_limit=VALIDATA_MAX_ROWS)
......@@ -104,5 +109,5 @@ class ValidatorHelper:
Supports Markdown
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