Native details dialogs: a .dlg cannot read a restored key that has no widget (blocks CREST Theory, #1153)

Aperta
#1,340 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, python
Ambito
desktop

Direzione di ricerca

Start with src/wxgui/details/DetailsModel.cpp: expression evaluation at lines 55-69, find() at 96-100, restore handling at 458-481, and the description format parser at 565-695. Read cresttheory.py lines 16-61 to see the Runtype-to-Theory dependency. Done means a design for a restore-only variable is agreed, it is usable in expressions but never sent, and tests/dialogs/native_test.py gains a case that restores ES.Runtype.QCG.Solvent.

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

Descrizione

enhancement

`cresttheory.py`, in Solvation Shell mode with GUIValues, reads `ES.Runtype.QCG.Solvent` from the restore file (lines 16–25). Its CheckDependency (57–61) then sets `ES.Theory.Solvent.Name` to that solvent and disables the combo. So the Theory solvent follows the Runtype key: restore `ES.Runtype.QCG.Solvent|methanol||1|1|menu_input` and the Theory dialog shows and sends methanol.

The native engine cannot express this:

  • `src/wxgui/details/DetailsModel.cpp` 55–69: expressions see only argv variables and existing setting widgets.
  • 96–100: `find()` accepts setting widgets only, so a note cannot hold an unknown restored key.
  • 458–481: restore ignores a key that has no matching setting widget (apart from the explicit legacy aliases).
  • 565–695: the description format has no restore-only variable and no lookup into the restore file.

A hidden setting widget would add a setting that the Python dialog does not send, so exact parity with the Python anchor would be broken.

Proposed: a restore-only declaration in the .dlg format (something like `restored qcgSolvent = "ES.Runtype.QCG.Solvent" default "water"`), usable in expressions, never sent. Until then cresttheory stays on the Python dialog.

The oracle (`tests/dialogs/native_test.py`) builds its restore cases from a dialog's own widget inventory, so it would not catch this cross-dialog key. The fix needs a case that restores the runtype key.

Found by the #1153 run (CREST/MLP .dlg). Part of #411.

Lingua principale
C
Stelle
10
Fork
8
Merge medio
6h 32m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 FriendsofECCE/ECCE

Tutte le issue di FriendsofECCE/ECCE

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.