Skip to content

Add default metadata to AviaryValues #382

@jkirk5

Description

@jkirk5

Desired capability or behavior.

Refactor behavior of AviaryValues to take default metadata, which will avoid the need to set metadata explicitly.

Courtesy of @dlcaldwelljr-ama-inc:

aviary_options = AviaryValues()  # avoid a meta_data kwarg here; AviaryValues uses kwargs like dict uses them
aviary_options.meta_data = MyMetaData  # internal default would be core meta data
aviary_options.set_val(key, val, units)  # default meta data is reference found at self.meta_data
aviary_options.set_val(key, val, units, meta_data=OtherMetaData)  # use explicitly specified meta data

Is your feature request related to a problem? Please describe.

No response

Associated Bug Report

No response

Metadata

Metadata

Labels

code cleanupCode cleanup, refactoring, or similar helpful reorganizationhelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions