Skip to content

Ia1251 remove get option defaults - #1283

Open
hschilling wants to merge 10 commits into
OpenMDAO:mainfrom
hschilling:IA1251-remove-get-option-defaults
Open

Ia1251 remove get option defaults#1283
hschilling wants to merge 10 commits into
OpenMDAO:mainfrom
hschilling:IA1251-remove-get-option-defaults

Conversation

@hschilling

@hschilling hschilling commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

Replace get_option_defaults() in unit tests with minimal, explicit AviaryValues() seeded only with the options each component under test actually declares via add_aviary_option. This makes each test's option dependencies visible at the call site and removes hidden coupling to the global metadata defaults.

Not all tests were migrated to the new approach. This is just a large number of them. More will be done in a future PR.

Why
get_option_defaults() returns every option in _MetaData. Tests using it fail silently when defaults drift, and it's impossible to tell from the test which options actually matter.

Approach
For each migrated test:

  • Identify the subsystem tree under test (via graphify).
  • Enumerate add_aviary_option declarations across that tree.
  • Build a minimal AviaryValues() with only options the test needs to override.

Related Issues

Backwards incompatibilities

None

AI Usage

AI was used in part for all the changes in this PR.

Comment thread aviary/subsystems/aerodynamics/gasp_based/test/test_gaspaero.py
Comment thread aviary/subsystems/geometry/flops_based/test/test_prep_geom.py Outdated
Comment thread aviary/subsystems/geometry/gasp_based/test/test_wing.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants