Repository navigation
Conversation
Newer pymatgen-core includes "@module"/"@Class" in JDFTXOutfile.as_dict(). When a later job took this output as input, jobflow decoded the stored parameters dict back into a JDFTXOutfile, which the dict field rejects. Strip the "@" keys so parameters stays a plain dict. Tests: add a round trip through the job store, and accept repeatable tags such as fluid-cation being read as a list. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
benrich37
marked this pull request as ready for review
November 17, 2026 20:13
benrich37
marked this pull request as draft
November 18, 2026 20:03
benrich37
marked this pull request as ready for review
November 19, 2026 20:54
This was referenced Nov 20, 2026
Open
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Required before overhaul parts 5-6 are merged (materialsproject/pymatgen-core#323 and materialsproject/pymatgen-core#324)
Summary
CalculationOutput.from_jdftxoutputnow storesJDFTXOutfile.as_dict()inparameterswithout its top-level"@module"/"@class"keys.A pending pymatgen-core change (JDFTx IO module overhaul pymatgen-core#317) adds these keys so that
JDFTXOutfileis a proper MSONable.With them, every flow that passes a JDFTx job's output (or part of it, e.g.
.calc_outputs.structure) to a later job fails:jobflow resolves the reference with
MontyDecoder, which turns the storedparametersdict back into aJDFTXOutfile,and pydantic rejects that for the
parameters: dictfield.With the currently pinned pymatgen-core (2026.10.16),
as_dict()has no@keys and this change does nothing,so it is safe to merge now and should be merged before the pymatgen-core change is released.
test_output_loads_from_storeruns a single-point job into a memory store and resolves its output referencethe way a downstream job does. With the pymatgen-core change it fails without this fix (pydantic
dict_typeerror)and passes with it.
tests/jdftx/sets/test_core.pyacceptsfluid-cationread as either a dict or a list, since the samepymatgen-core change reads repeatable tags such as
fluid-cationas a list.Checked locally: all pre-commit hooks pass, and
pytest tests/jdftxpasses with pymatgen-core 2026.10.16 (the CI pin)and with the pymatgen-core change.
Additional dependencies introduced (if any)
TODO (if any)
Checklist
The easiest way to handle this is to run the following in the correct sequence on
your local machine. Start with running
ruffandruff formaton your new code. This willautomatically reformat your code to PEP8 conventions and fix many linting issues.
Run ruff on your code.
type check your code.