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

Aperta
#1,247 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 7 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

Inizia dal costruttore di AviaryProblem e dal relativo flusso di configurazione, quindi traccia dove i sottosistemi esterni, i metadati estesi, set_input_defaults e model_options gestiscono le chiavi aircraft:* o mission:* dal file CSV. Confronta i due punti di validazione suggeriti e definisci come completamento il sollevamento di un errore chiaro quando mancano metadati, con una copertura per il comportamento scelto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

request
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).

Lingua principale
Python
Stelle
303
Fork
152
Merge medio
7g 14h
PR unite (30g)
10

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenMDAO/Aviary

Tutte le issue di OpenMDAO/Aviary

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.