A declared SA observable that RMG's core does not carry under that label is silently dropped

Aperta
#225 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start at the observable check in t3/main.py around lines 1844-1846, where get_species_by_label's result goes straight into species_requires_refinement, which returns False for None near line 3059. Read how input_species dicts are parsed and whether a species can be built from one. Done when a declared observable whose label is missing either gets built from its input block or raises an error naming the species and both attempts; a test should cover that case.

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

Descrizione

t3/main.py:1844-1846 looks an SA observable up by label and passes the result straight into
species_requires_refinement:

if (input_species['observable'] or input_species['SA_observable']) and \
        self.species_requires_refinement(species=get_species_by_label(input_species['label'],
                                                                      self.rmg_species)):

When the label is not in self.rmg_species, that lookup returns None, and
species_requires_refinement returns False for None (t3/main.py:3059-3060). So the species the
user declared as an observable is dropped from refinement with no error and no log line: the run
proceeds, the sensitivity analysis silently covers one species fewer, and the input file looks
honoured.

Asked for: when the label does not resolve, either build the species from the input block (it
carries a structure) or fail with a message naming the species and the two things that were tried.
Silence is the one outcome that should not survive.

Credit and prior art: @NaveDanan reported the symptom and proposed exactly this shape in PR #78
(2022-03-18) — fall back to constructing the species from the input dict, else raise. That PR is four
years behind main and is being closed with thanks; the defect it found is still live.

Lingua principale
Python
Stelle
16
Fork
8
Merge medio
1h 46m
PR unite (30g)
1

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun 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 ReactionMechanismGenerator/T3

Tutte le issue di ReactionMechanismGenerator/T3

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.