Skip to content

[Feature]: yaml file as input to converter.get_metadata() #541

@bendichter

Description

@bendichter

What would you like to see added to NeuroConv?

What if NWBConverter.get_metadata() took the path of a yaml file as an optional input?

So this:

# The metadata file path
metadata_path = "general_metadata.yml"
metadata_from_yaml = load_dict_from_file(metadata_path)

# The converter that combines the input streams into a single conversion
converter = IntoTheVoidNWBConverter(source_data=source_data)

# The converter can extract relevant metadata from the source files
metadata = converter.get_metadata()
# This metadata can be updated with other relevant metadata
metadata = dict_deep_update(metadata, metadata_from_yaml)

could become this:

# The converter that combines the input streams into a single conversion
converter = IntoTheVoidNWBConverter(source_data=source_data)

# The converter can extract relevant metadata from the source files
metadata = converter.get_metadata("general_metadata.yml")

Internally, metadata would be loaded and would update the metadata object before returning.

Is your feature request related to a problem?

No response

Do you have any interest in helping implement the feature?

Yes.

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions