cedadev / cis

Home of the Community Intercomparison Suite.
www.cistools.net
GNU Lesser General Public License v3.0
46 stars 18 forks source link

Update iris imports #33

Closed duncanwp closed 2 years ago

duncanwp commented 2 years ago

The latest version of iris (v3.1) has changed it's import structure so that some cis functions are now broken. E.g. here

This should be easy to fix.

yaronwe commented 2 years ago

Hi. I also had issues with iris version 3.1.0 when using it with cis version 1.7.3. Got this error when running cis version: AttributeError: module 'iris' has no attribute 'cube' Installed cis with iris 3.0.4 and no error now.

adamcpovey commented 2 years ago

This is due to Iris changing what they import and I get this error when using JASMIN's jaspy environment. It can be fixed by running from iris.cube import Cube in your own code. An actual fix is replacing all the calls to it.

duncanwp commented 2 years ago

I believe this was fixed by https://github.com/cedadev/cis/commit/96d1b87617701d71023a0fcc2434f83378bed8a0 - I'll try and cut a new release ASAP

adamcpovey commented 2 years ago

What about this and this?

duncanwp commented 2 years ago

Hmm, they do look wrong too but they didn't break the unit tests. Maybe they're not covered but I'd be surprised. I'll take a closer look, thanks Adam.

duncanwp commented 2 years ago

OK, I think this is all of them now: https://github.com/cedadev/cis/commit/5cad043e57cafb39d9e713bde4b0ccf15c4a182d. I've also fixed Python 3.9 compatibility (https://github.com/cedadev/cis/commit/eddd1322d25081eedade36fbf53c7e6bd1e55bee) and cftime compatibility (https://github.com/cedadev/cis/commit/07b316fc80284060f355341d945336d41b59657f).

They all pass locally but it turns out our CI service died so I won't know for sure until I fix https://github.com/cedadev/cis/issues/35!