NCAS-CMS / cf-python

A CF-compliant Earth Science data analysis library
http://ncas-cms.github.io/cf-python
MIT License
127 stars 19 forks source link

Override `del_construct` to update cyclic axes set when due #763

Closed sadielbartholomew closed 7 months ago

sadielbartholomew commented 7 months ago

Fix #758 and #756 (the former being the underlying issue and the latter a specific bug as a downstream effect) by overriding the del_construct inherited from cfdm to account for and update the store of cyclic axes. Previously we used the inherited method as-is so cyclic axes weren't updated and could get out of sync, notably contain axes which no longer existed due to deletion.

Note:

sadielbartholomew commented 7 months ago

Just going to add one commit to fix a few style/formatting issues detected by the CI linting.

sadielbartholomew commented 7 months ago

Thanks for your feedback @davidhassell. I'll update the PR shortly according to your excellent suggestions, though I will get the halo PR review in first, so do it after that.

sadielbartholomew commented 7 months ago

All ready for your re-review, @davidhassell. Thanks.

sadielbartholomew commented 7 months ago

Thanks David. In that case, merging!