This is rather a general question, as I just like to know if (and what) the Materials Project or atomate2 teams plan something in this regard.
So, I work on a workflow that heavily relies on pymatgen/atomate2 and I have some automated VASP calculations as part of the wf. In the unit tests, we need to check if VASP is running and executing the jobs properly and that’s where the mock VASP of atomate2 (conftests.py file) comes into play. Because the tests are not embedded in the src, we have for now simply copied what we need from conftest and integrated it in our unit tests, but I think it would be way more elegant to access conftest via atomate2 or pymatgen directly. So my question is: Are there plans to restructure the code, e.g. move this test module to pymatgen or so? If you need support for doing so, I also want to help you.
I really think something like this will be very handy for future workflow developments as well. Of course, there is no problem of leaving the mock VASP runs of my wf like it is for now.
Hi,
Thanks for your question. We have considered it this way.
- Test outside the source codes directory (src) is recommended for several advantages (reduce code duplication, parallelization CI tests, improve code readability). In atomate, tests are actually within src. It is easier to find and run, but a lot of code duplications arise from there. So, in atomate2, tests and src are separated.
- Atomate2 users are a subset of pymatgen users, so putting workflow tests to pymatgen is not proper as well.
Hope this helps with your situation.
Best,
Zhuoying