Skip to content

Commit

Permalink
simpler attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Nov 15, 2024
1 parent 7cb15e3 commit 722d179
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 722d179

Please sign in to comment.