Coverage raises warnings when running in multiprocessing
coverage data file: cannot unpack non-iterable NoneType object
Coverage.py warning: Data file '/home/gfz-fe/scheffler/python/findr_homo/.coverage.geoms.1279091.080330' doesn't seem to be a coverage data file: Couldn't use data file '/home/gfz-fe/scheffler/python/findr_homo/.coverage.geoms.1279091.080330': no such table: coverage_schema
Coverage.py warning: Couldn't use data file '/home/gfz-fe/scheffler/python/findr_homo/.coverage.geoms.1274268.063192': database disk image is malformed
For example, in this pipeline.
Solution: Properly close and join multiprocessing.Pool like this:
with multiprocessing.Pool() as pool:
pool.map(func, args)
pool.close()
pool.join()
This has to be done in the EnPT code (!60 (6ffec51a)) AND ALL EXTERNAL LIBRARIES where multiprocessing.Pool is called, i.e., in arosics, spechomo, sicor, sensormapgeo, ...
Another way is to make coverage exclude external packages by adding this to the .coveragerc:
[run]
omit = */site-packages/*,*/tests/*,*/.eggs/*