aat icon indicating copy to clipboard operation
aat copied to clipboard

matplotlib version 3.8 results in test failure

Open ldXiao opened this issue 1 year ago • 0 comments

Describe the bug Using matplotlib 3.8 results in runtime error in calculations.py

To Reproduce Steps to reproduce the behavior:

  1. uninstall matplotlib old version and install matplotlib stable version
  2. run make tests

error message

=================== short test summary info ==================== 
FAILED aat/tests/strategy/test_offline_calculations.py::TestOfflineCalculations::test_calculations - AttributeError: 'GrouperView' object has no attribute 'join'

with some simple debug, we can trace to line 335 of aat/tests/strategy/test_offline_calculations.py:

...python
        # join all but last on x axis
        for ax in axes[:-1]:
            axes[0].get_shared_x_axes().join(axes[0], ax)
...

where newer version of matplotlib has modified the method get_shared_x_axes() to return cbook.GrouperView object which does not have an attribute join

We can either restrict the maximum version number of matplotlib or modify aat code to make it compatible

ldXiao avatar Sep 24 '23 01:09 ldXiao