materialsproject / emmet

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

Fix `TaskDoc.set_entry` #853

Closed janosh closed 10 months ago

janosh commented 10 months ago

Fixes atomate2 defect workflow test. See https://github.com/materialsproject/atomate2/pull/548#issuecomment-1758572768 for details.

janosh commented 10 months ago

Not sure why self.get_entry was required since task_id is optional in TaskDoc.get_entry:

https://github.com/materialsproject/emmet/blob/6ac53ecb4b34a1e508a32cb807fa4c864c991086/emmet-core/emmet/core/tasks.py#L594-L596

jmmshn commented 10 months ago

Also, can we add a test case to check that the entry field is populated?

PS: Notes on the behavior of TaskDoc.get_entry in a dynamic WF.

https://github.com/materialsproject/emmet/blob/6ac53ecb4b34a1e508a32cb807fa4c864c991086/emmet-core/emmet/core/tasks.py#L619C1-L626

The potcar_spec cannot be parsed since you cannot iterate through a Response object. The oxide_type cannot be properly parsed either since that function is not wrapped in a job.

janosh commented 10 months ago

Also, can we add a test case to check that the entry field is populated?

Done in daa0034.