Adapt namelist parameter case to match aiida-quantumespresso v5 - #95
Merged
Conversation
aiida-quantumespresso 4.15.0 enforces a consistent casing convention on CalcJob `parameters` inputs (`validate_parameters`): namelist keys must be UPPERCASE and parameter keys lowercase, and unstored Dict nodes are auto-corrected in place. This broke the package against 4.15: code reading `parameters.get_dict()["inputpp"]` raised KeyError because the node had been normalized to `INPUTPP`, and every protocol builder snapshot mismatched (`inputpp`->`INPUTPP`, `DeltaE`->`deltae`). Adapt the package to emit and read the canonical casing: - Protocol YAMLs: `inputpp`->`INPUTPP`, `DeltaE`->`deltae`. - Source: read/write the QE pw2wannier90 namelist as `INPUTPP` throughout (base/pw2wannier90.py, wannier90.py, split.py, plot/bands.py). - Tests/fixtures: use `INPUTPP`/`PROJWFC` namelist keys so shared fixture nodes are not mutated out from under the test reads. - Regenerate the affected pytest-regressions snapshots; diffs are casing-only (no value changes). Alternative considered: upper-pinning aiida-quantumespresso <4.15. Rejected in favor of adapting to the new convention. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collaborator
Author
|
Note that this overlaps with #91 but additionally fixes |
Collaborator
Author
This was referenced Jul 8, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
mainfails CI becasueaiida-quantumespresso 4.15introduced a consistent casing convention for CalcJobparametersinput: namelist keys must be UPPERCASE and parameter keys lowercase, and unstoredDictnodes are auto-corrected in place with a warning. This surfaced two failure modes in this package.KeyErrors at runtime — code that readparameters.get_dict()["inputpp"]crashed because the validator had already normalized the node toINPUTPPINPUTPP/deltaevs storedinputpp/DeltaEChange
Adapt the package to emit and read the canonical casing throughout.
INPUTPP(basepw2wannier90.yaml,overrides/wannier90.yaml) and lowercasedeltae(baseprojwfc.yaml).INPUTPPeverywhereINPUTPP/PROJWFCnamelist keys so that shared unstored fixtureDictnodes are not mutated out from under the subsequent readsTesting
uv pip install -e ".[tests]" aiida-quantumespresso==4.15.0in an isolated Python 3.11 venv.pytest tests/): 161 passed, 0 failed.The full suite was additionally run against
aiida-quantumespresso 5.0.0(which hard-enforces the convention): also 161 passed, 0 failed.Snapshots were regenerated with
pytest --force-regenand the full suite reruns clean.Fixes #90