OpenMDAO / Aviary

NASA's aircraft analysis, design, and optimization tool
https://openmdao.github.io/Aviary/
Other
107 stars 51 forks source link

Add default metadata to AviaryValues #382

Open jkirk5 opened 6 days ago

jkirk5 commented 6 days ago

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

jkirk5 commented 6 days ago

I would like to see defaulting of legacy code variable names to None so you don't have to explicitly specify that