Pin matplotlib version in pyproject.toml so that the installation won’t cause issue in ROS2 setups where matplotlib has been apt-installed and hence pinned to version 3.5.1. This particular version pinning also results in a narrower numpy version range "numpy>=1.22,<2" and an end of support for python 3.7.
This PR is a WIP.
Tests done:
[x] Testing workflow: all environments in test matrix are passing except for the following three, with error messages suggesting issues noted for each :
ubuntu + python 3.7, windows + python 3.7 (numpy does not have a version for this env);
windows + python 3.11, windows + python 3.12 (matplotlib does not provide a wheel for this env);
[x] spatialmath-python pip install . (from source) recognized the existing apt-installed matplotlib and kept it without overwriting;
[x] "import spatialmath" worked when we further narrowed down numpy version range, due to TypeError: 'numpy._DTypeMeta' object is not subscriptable issue.
NOTE: the other part of the discussion, i.e. the matplotlib related imports should better be confined to sub modules where plotting is actually needed, is not resolved by this PR.
Pin matplotlib version in pyproject.toml so that the installation won’t cause issue in ROS2 setups where matplotlib has been apt-installed and hence pinned to version 3.5.1. This particular version pinning also results in a narrower numpy version range "numpy>=1.22,<2" and an end of support for python 3.7.
This PR is a WIP.
Tests done:
pip install .
(from source) recognized the existing apt-installed matplotlib and kept it without overwriting;TypeError: 'numpy._DTypeMeta' object is not subscriptable
issue.NOTE: the other part of the discussion, i.e. the matplotlib related imports should better be confined to sub modules where plotting is actually needed, is not resolved by this PR.