Closed Andrew-S-Rosen closed 10 months ago
The tests pass so it certainly works, but I don't understand why. Also the numpy
import is not done properly. One way or another, the namespace inside a python_app
gets contaminated with general pytest/psiflow imports I think. It's not a problem, but I agree it's a little ugly.
When you start a pytest run, during the collection phase it imports all the modules from your tests that are accessible by the collection. So, it is possible that this is why your tests are passing. Either way, the current approach seems a bit risky. It's probably better to just add the missing imports.
https://github.com/molmod/psiflow/blob/e011c2b1712396d61550717fb6e30c7b75aec290/psiflow/utils.py#L393-L409
In the
_check_distances()
function, it looks likeNullState
is not imported and therefore not defined. Similarly,FlowAtoms
incompute_error()
is not defined.Could you provide some insight on where they are being imported, assuming it's not an error?