OpenMDAO / OpenMDAO/Aviary

It is too easy to forget to pass an extended metadata dictionary into the AviaryProblem.

Open
#1,247 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

request
Dominant language
Python
Stars
287
Forks
140
Avg merge
6d 14h
Merged PRs (30d)
18

Description

Desired capability or behavior.

I have debugged a few different Aviary models where options were not getting set to the values requested in the csv file. It turned out that they weren't set because they were user-added options in the Extended Metadata, but the aviary problem/model only had access to the default metadata. In these cases, the user forgot to pass their extended metadata dictionary into the AviaryProblem constructor.

Suggested implementation.

At the end of setup, we could loop over our external subsystems and search for any aircraft:* or mission:* variables and options that aren't in the aviary group's metadata, and raise an error.

Alternatively, we could raise an error if the csv file encounters an aircraft:* or mission:* key that isn't in prob.metdata while it is looping in set_input_defaults or model_options. This would be easier to implement, but it would miss vars/options that aren't in the csv (though, in theory those wouldn't matter).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the AviaryProblem constructor and its setup flow, then trace where external subsystems, extended metadata, set_input_defaults, and model_options handle aircraft:* or mission:* keys from the CSV file. Compare the two suggested validation points and define done as raising a clear error when metadata is missing, with coverage for the chosen behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.