materialsproject / emmet

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

Correct typing of TaskDoc.transformations field #937

Closed esoteric-ephemera closed 5 months ago

esoteric-ephemera commented 5 months ago

Objects stored in TaskDoc.transformations can be serialized at init (for example, pymatgen.alchemy.materials.TransformedStructure), which leads to pydantic typing errors. This happens in atomate2 when output references are resolved, see discussion in atomate2 PR #623.

This PR allows the typing of TaskDoc.transformations to be Any, and adds tests for the new behavior.

This would close atomate2 issue #607.

codecov-commenter commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (d8d6941) 90.15% compared to head (df72990) 90.21%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #937 +/- ## ========================================== + Coverage 90.15% 90.21% +0.06% ========================================== Files 138 138 Lines 13159 13159 ========================================== + Hits 11864 11872 +8 + Misses 1295 1287 -8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

utf commented 5 months ago

Hi @munrojm, once this is merged is it possible to get a new emmet-core released?

Were't hoping this will be the final fix needed to support the latest pydantic version in atomate2.

munrojm commented 5 months ago

Yup! Looks good to me.