materialsproject / emmet

Be a master builder of databases of material properties. Avoid the Kragle.
https://materialsproject.github.io/emmet/
Other
49 stars 63 forks source link

Ensure run, calc, and task types are always refreshed in TaskDoc #1033

Closed esoteric-ephemera closed 2 weeks ago

esoteric-ephemera commented 3 weeks ago

Simple changes to TaskDoc structure: during post init, the run_type, task_type and calc_type (union of the previous two) are always updated to ensure that these are consistent with subsequent bug fixes. Previously, these were only updated if task_type was None.

This change is motivated by #960, where the run_type was incorrectly determined for any non-GGA run and some discussions with @mkhorton. By re-initializing a TaskDoc from a dict, these changes would correctly populate the three fields.

The source of the bug in 960 is separately fixed in #1026. This change would also ensure that 1026 also patches fields in legacy TaskDocs

munrojm commented 2 weeks ago

Looks good to me!