Closed jmmshn closed 6 months ago
Attention: 6 lines
in your changes are missing coverage. Please review.
Comparison is base (
8ae6ec9
) 99.86% compared to head (3cab74b
) 99.48%. Report is 3 commits behind head on main.
This feature should allow atomate2 to automatically assign unique ids to the tasks which (I believe) is currently unset. If the task id is set I think more of the aggregated document model in emmet can be directly used in the middle of future more complex workflows.
@utf, I think a counter for the TaskDocs
in atomate2 can be incorporated pretty easily by monkey patching the constructor method to call the counter incrementation. I tried working around this but there is a consistent convention in emmet of sorting and using the lowest numerical id of the aggregated documents to assign the id of the grouped document so I don't see a way around the issue of assigning a numerical counter. (There is an implicit assumption of that the lower ID is older so you can prevent MPID drift this way.)
Thanks @jmmshn, this is a nice implementation. As I mentioned on the atomate2 PR, the goal with jobflow is to move away from counters since they cause an issue when merging two databases. If MP need mp_id's then I suggest they be added in their ingestion pipeline. They shouldn't be needed for atomate2/jobflow.
Closing this since we are resolving it in the other PR #529
Generical global counters might be useful for some special workflows
Many of the document models in emmet are designed to deal with either
int
or"mp-"+int
type of ids for the different documents. As such, they sometimes require unique integer counters for specific downstream documents to be built properly. This feature should allow atomate2 to automatically assign unique ids to the tasks which (I believe) is currently unset. If the task id is set I think more of the aggregated document model in emmet can be directly used in the middle of future more complex workflows.An example of this problem is here: https://github.com/materialsproject/atomate2/pull/655
Where the
InsertionElectrode
document expects task_id to be set.