holoviz / spatialpandas

Pandas extension arrays for spatial/geometric operations
BSD 2-Clause "Simplified" License
308 stars 24 forks source link

Extension array fixes #88

Closed ianthomas23 closed 2 years ago

ianthomas23 commented 2 years ago

This PR fixes the errors related to ragged arrays being pandas extension arrays which have had extra tests added. The "fixes" are all to disable those tests as the functionality does not apply to our ragged arrays.

Also temporarily limited github actions to only run testing on Python 3.8 on Linux until I have dealt with all of the current errors.

ianthomas23 commented 2 years ago

I am not an expert on pandas extension arrays, but it looks like we are using them in the recommended way by defining test classes that inherit from the pandas extension array test classes and these naturally run all the tests defined in both classes. So we have to identify the tests we don't want to run and override them to be skipped. I can't see how pandas could be altered to work how we want it too.

One possible approach would be to implement some sort of filter on pytest's automatic finding of all tests so that we only run tests that are in some specified whitelist.

ianthomas23 commented 2 years ago

The pyarrow import errors are masking the fixes here, but locally this PR removes the extension array errors so I will merge and continue with the next set of errors.

jbednar commented 2 years ago

Seems like Pandas ExtensionArray tests could be broken into a minimal or at least static set of tests, with other tests or new tests implemented in a subclass, so that we could safely invoke the standard tests without having to guard against all new tests that might be added someday?

ianthomas23 commented 2 years ago

Yes, but wouldn't changes to Pandas itself require either persuading Pandas devs to do this for us, or one of us to volunteer to do the work ourselves?