mathematicalmichael / mud

https://mud.dataconsistent.com
MIT License
2 stars 2 forks source link

housekeeping #71

Closed mathematicalmichael closed 9 months ago

mathematicalmichael commented 9 months ago
mathematicalmichael commented 9 months ago

numpy==1.25 and numpy==1.26 start throwing these warnings, so I'm loosening to numpy<1.27 as this should ensure they remain warnings and not errors. seems like something scipy/matplotlib need to resolve, as the error isn't coming from our code according to the stacktrace:

=================================== warnings summary ====================================
tests/test_cli.py: 28 warnings
  /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/matplotlib/text.py:1461: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    x = float(self.convert_xunits(x))

tests/test_cli.py: 28 warnings
  /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/matplotlib/text.py:1463: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    y = float(self.convert_yunits(y))

tests/test_cli.py: 56 warnings
  /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/matplotlib/text.py:566: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    posx = float(self.convert_xunits(self._x))

tests/test_cli.py: 56 warnings
  /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/matplotlib/text.py:567: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    posy = float(self.convert_yunits(self._y))

tests/test_cli.py: 28 warnings
  /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/matplotlib/text.py:753: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    posx = float(self.convert_xunits(self._x))

tests/test_cli.py: 28 warnings
  /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/matplotlib/text.py:754: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    posy = float(self.convert_yunits(self._y))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

<coverage omitted>
===================== 51 passed, 224 warnings in 170.52s (0:02:50) ======================

so they take much longer bc of the thrown warnings, a whole minute extra.

but loosening should pave the way to python 3.12, as wheels for earlier numpy don't exist for that.

mathematicalmichael commented 9 months ago

works fine in 3.12

integration tests passing (even up to 3.12. tested on 3.9-3.12)