diff --git a/src/neuroconv/tools/yaml_conversion_specification/_yaml_conversion_specification.py b/src/neuroconv/tools/yaml_conversion_specification/_yaml_conversion_specification.py index 244cd5013..9c4600d5f 100644 --- a/src/neuroconv/tools/yaml_conversion_specification/_yaml_conversion_specification.py +++ b/src/neuroconv/tools/yaml_conversion_specification/_yaml_conversion_specification.py @@ -84,12 +84,8 @@ def run_conversion_from_yaml( specification_schema = load_dict_from_file(file_path=schema_folder / "yaml_conversion_specification_schema.json") metadata_schema = load_dict_from_file(file_path=schema_folder / "metadata_schema.json") - # Create registry and add schemas - registry = ( - Registry() - .with_resource("metadata_schema.json", Resource.from_contents(metadata_schema)) - .with_resource("yaml_conversion_specification_schema.json", Resource.from_contents(specification_schema)) - ) + # The yaml specification references the metadata schema, so we need to load it into the registry + registry = Registry().with_resource("metadata_schema.json", Resource.from_contents(metadata_schema)) # Validate using the registry validate( diff --git a/tests/test_on_data/test_yaml/test_yaml_conversion_specification.py b/tests/test_on_data/test_yaml/test_yaml_conversion_specification.py index 93d9f0f56..e46e25352 100644 --- a/tests/test_on_data/test_yaml/test_yaml_conversion_specification.py +++ b/tests/test_on_data/test_yaml/test_yaml_conversion_specification.py @@ -32,7 +32,7 @@ def test_validate_example_specifications(fname): specification_schema = load_dict_from_file(file_path=schema_folder / "yaml_conversion_specification_schema.json") metadata_schema = load_dict_from_file(file_path=schema_folder / "metadata_schema.json") - # Create registry and add schemas + # The yaml specification references the metadata schema, so we need to load it into the registry registry = Registry().with_resource("metadata_schema.json", Resource.from_contents(metadata_schema)) yaml_file_path = path_to_test_yml_files / fname