spencerahill / aospy

Python package for automated analysis and management of gridded climate data
Apache License 2.0
83 stars 12 forks source link

WIP fixes for recent CI build failures #321

Closed spencerahill closed 5 years ago

spencerahill commented 5 years ago

Closes #319

The new logic introduced in xarray v0.12 assumes the argument passed to xr.open_dataset includes a tell method. In some cases when we are populating the grid data for Model objects, we pass it a tuple of paths. Including AttributeError as one of the caught exceptions seems to do the trick.

I don't think this needs any new tests, since our existing test suite caught it (albeit crudely).

This addresses point 2 of #319. The other two points remain.

spencerahill commented 5 years ago

1a52855 addresses Point 1 of #319 (assuming it works). So only point 3 remains.

spencerahill commented 5 years ago

For point 3, i.e. that Travis was marking failing builds as passing, I'm pretty sure that the problem was that both our pytest command and the flake8 command were under the same - bullet point. So even though the pytest command returns nonzero, the next line is the flake8 command, which returns zero, and so the whole item is interpreted as a pass. So, copying xarray, I created a separate "lint" env for the flake8 check.

spencerahill commented 5 years ago

All three points from #319 have now been fixed. As such, paradoxically, I am happy to see failing tests, because those are from #320 and are at least being caught as failures!

So once we have a fix for #320 we should be back to passing tests AND for the right reasons this time.