Commit 5c7a4b27 authored by Christophe Benz's avatar Christophe Benz

Follow dbnomics-converters renames...

verified_value => assert_no_error
parent 9490d2ff
......@@ -35,7 +35,7 @@ import sys
from slugify import slugify
from dbnomics_converters.base import verified_value
from dbnomics_converters.base import assert_no_error
from dbnomics_converters.categories import validate_category
from dbnomics_converters.datasets import validate_dataset
from dbnomics_converters.providers import validate_provider
......@@ -397,23 +397,23 @@ def main():
def save_node(dir, node):
if node.get('category_code') is None and node.get('dataset_code') is None and node.get('key') is None:
node = verified_value(validate_provider(node, format='json'))
node = assert_no_error(validate_provider(node, format='json'))
filename = 'provider.json'
title = 'Provider {}'.format(node['name'])
elif node.get('category_code') is not None:
assert node.get('dataset_code') is None
assert node.get('key') is None
node = verified_value(validate_category(node, format='json', used_categories_code=used_categories_code))
node = assert_no_error(validate_category(node, format='json', used_categories_code=used_categories_code))
filename = 'category.json'
title = 'Category {} {}'.format(node['category_code'], node['name'])
elif node.get('dataset_code') is not None:
assert node.get('key') is None
node = verified_value(validate_dataset(node, format='json'))
node = assert_no_error(validate_dataset(node, format='json'))
filename = 'dataset.json'
title = 'Dataset {} {}'.format(node['dataset_code'], node['name'])
else:
assert node.get('key') is not None
node = verified_value(validate_series(node, format='json'))
node = assert_no_error(validate_series(node, format='json'))
filename = 'series.json'
title = 'Series {} {}'.format(node['key'], node['name'])
......
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