Skip to content

some iris 3.1.0 adjustments#493

Merged
jgriesfeller merged 7 commits intomain-devfrom
iris_3_1_fix
Oct 15, 2021
Merged

some iris 3.1.0 adjustments#493
jgriesfeller merged 7 commits intomain-devfrom
iris_3_1_fix

Conversation

@jgriesfeller
Copy link
Member

1st try for an iris 3.1.0 patch

@jgriesfeller
Copy link
Member Author

jgriesfeller commented Oct 15, 2021

Found the problems:

>>> type(cubes)
<class 'list'>

but that needs to be of type

>>> type(iris.cube.CubeList(cubes))
<class 'iris.cube.CubeList'>

for the concatenation to work.

In addition iris.cube.CubeList.concatenate_cube returns a cube now and not a cubelist.

Writing some code now...

@codecov
Copy link

codecov bot commented Oct 15, 2021

Codecov Report

Merging #493 (706770d) into main-dev (084c8b8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 706770d differs from pull request most recent head 996196b. Consider uploading reports for the commit 996196b to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##           main-dev     #493   +/-   ##
=========================================
  Coverage     76.61%   76.61%           
=========================================
  Files            97       97           
  Lines         17357    17358    +1     
=========================================
+ Hits          13298    13299    +1     
  Misses         4059     4059           
Flag Coverage Δ
unittests 76.61% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pyaerocom/helpers.py 76.32% <100.00%> (ø)
pyaerocom/io/iris_io.py 94.57% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 084c8b8...996196b. Read the comment docs.

@jgriesfeller jgriesfeller requested a review from jgliss October 15, 2021 07:17
@jgriesfeller jgriesfeller marked this pull request as ready for review October 15, 2021 07:22
@jgliss jgliss modified the milestones: v0.12.0, v0.13.0 Oct 15, 2021
Copy link
Contributor

@jgliss jgliss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To test that CI passes, I think you need to remove the upper version limit in setup.py (section install_requires) and in pyaerocom_env.yml. Right now it should still be testing iris<3.1.0

@jgriesfeller
Copy link
Member Author

I have removed the limitation of the iris version in setup.py. CI still works :-)

@jgliss jgliss linked an issue Oct 15, 2021 that may be closed by this pull request
Copy link
Contributor

@jgliss jgliss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to update iris version in file pyaerocom_env.yml

setup.py Outdated
python_requires = '>=3.7,<4',
install_requires = [
'scitools-iris>=3.0.1,<3.1.0',
'scitools-iris>=3.0.1',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

Suggested change
'scitools-iris>=3.0.1',
'scitools-iris>=3.1.0',

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should set it to 3.1.0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, although that API is not new. Has been there since at least v1.9. https://scitools.org.uk/iris/docs/v1.9.0/html/iris/iris/cube.html#iris.cube.CubeList.concatenate_cube

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pyaerocom_env.yml has been updated as well

@jgliss jgliss self-requested a review October 15, 2021 11:59
Copy link
Contributor

@jgliss jgliss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

@jgliss jgliss linked an issue Oct 15, 2021 that may be closed by this pull request
@jgriesfeller jgriesfeller merged commit 729a8f2 into main-dev Oct 15, 2021
@jgriesfeller jgriesfeller deleted the iris_3_1_fix branch October 15, 2021 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI seems to fail after yesterdays iris v3.1.0 release Dependencies in setup.py tend to mess with conda config

2 participants