Open-EO / openeo-geopyspark-integrationtests

Integrationtests for GeoPyspark backend
Apache License 2.0
0 stars 0 forks source link

failing `test_atmospheric_correction_constoverridenparams` #20

Closed soxofaan closed 3 months ago

soxofaan commented 3 months ago

In https://github.com/Open-EO/openeo-geopyspark-integrationtests/commit/b4dc2758064beff8bf54e4447686b88e5ef3cf2b I fixed the compare_xarrays() helper, which checked a lot less than it seemed: to compare the pixel values, it basically did np.testing.assert_allclose(x, x) which never fails of course :facepalm:

Note that this bug has always been there since introducing compare_xarrays in 7b7b2dc47e1c0e25f8c522530bcd882463a51150

Fixing the bug now makes test_atmospheric_correction_constoverridenparams fail

soxofaan commented 3 months ago

To add insult to injury, the tests were quite hard to debug:

and it turns out that the coordinate order of the y dimension is different: the actuals have descending y coords, while reference data have ascending y coords. This trips up numpy assert_allclose making it claim that everything is different, while there is actually no difference

soxofaan commented 3 months ago

with 524709b the tests now fail with

TypeError: The DType <class 'numpy.FloatAbstractDType'> could not be promoted by <class 'numpy.dtype[bytes]'>. This means that no common DType exists for the given inputs. For example they cannot be stored in a single array unless the dtype is object. The full list of DTypes is: (<class 'numpy.dtype[bytes_]'>, <class 'numpy._FloatAbstractDType'>)

soxofaan commented 3 months ago

test_atmospheric_correction_constoverridenparams passes again