-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with mpl v3.9.2 (latest) #459
base: master
Are you sure you want to change the base?
Conversation
|
Awesome job @cvanelteren!! Excited for @lukelbd to merge this in when he has time. In the meantime will broadcast on old issues and PRs to install this way. |
Hey, this is wonderful! Very happy to be able to update soon. I tried this out quickly and there seems to be a problem with the integration with cartopy. For instance: fig, ax = pplt.subplots(proj="pcarree") works as expected, but trying a few different projections such as Click to expand traceTypeError Traceback (most recent call last) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/proplot/axes/geo.py:1326, in _CartopyAxes.get_tightbbox(self, renderer, *args, **kwargs) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/proplot/axes/base.py:2780, in Axes.get_tightbbox(self, renderer, *args, **kwargs) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py:499, in GeoAxes.get_tightbbox(self, renderer, *args, **kwargs) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/matplotlib/_api/deprecation.py:457, in make_keyword_only..wrapper(*args, **kwargs) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/matplotlib/axes/_base.py:4499, in _AxesBase.get_tightbbox(self, renderer, call_axes_locator, bbox_extra_artists, for_layout_only) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/cartopy/mpl/gridliner.py:1243, in Gridliner.get_tightbbox(self, renderer) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/cartopy/mpl/gridliner.py:1243, in (.0) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/matplotlib/artist.py:365, in Artist.get_tightbbox(self, renderer) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/matplotlib/collections.py:311, in Collection.get_window_extent(self, renderer) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/matplotlib/collections.py:270, in Collection.get_datalim(self, transData) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/matplotlib/collections.py:270, in (.0) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/matplotlib/transforms.py:2445, in CompositeGenericTransform.transform_path_non_affine(self, path) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py:175, in InterProjectionTransform.transform_path_non_affine(self, src_path) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/cartopy/mpl/patch.py:210, in path_to_geos(path, force_ccw) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/shapely/geometry/multilinestring.py:60, in MultiLineString.new(self, lines) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/shapely/decorators.py:77, in multithreading_enabled..wrapped(*args, **kwargs) File ~/miniforge3/envs/ppl_dev/lib/python3.11/site-packages/shapely/creation.py:393, in multilinestrings(geometries, indices, out, **kwargs) TypeError: ufunc 'create_collection' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe'' |
@Holmgren825 I cannot reproduce this error here locally. It also points to a shapely issue rather than proplot. I have cartopy 0.23.0 installed, what version are you running? For shapely the version is 2.0.5. |
The projections in the docs also point to it working fine (see https://proplot--459.org.readthedocs.build/en/459/projections.html). The environment is currently rather unconstrained and would love to add the information in there to prevent a build issue like yours from happening. |
Wierd. I had the same versions (0.23.0 and 2.0.5). But if I upgrade to shapely 2.0.6 things work. Edit: ufunc in the error should be a hint. 2.0.6 (released last night) is a compatibility release for numpy 2.1 (which I had installed). |
Ah thanks for reminding me. Numpy should be held back due to some dependency issues with xarray. Fixed in latest commit |
cannot install:
|
@huddao huddao I don't see any errors? |
@cvanelteren The version is 'proplot==0.9.5.post425', I'm not sure this is the correct version. |
The correct version should be tagged as
|
@cvanelteren Thanks! |
Working for me! Thank you cvanelteren. |
Any update on this? I'm posting analysis code for a paper and it would be great to reference the main proplot branch in the requirements. |
Nothing that I've seen @austin-hoover. Still waiting on @lukelbd to come in and merge, as he is the only one with permissions. For now you will have to point to @cvanelteren's branch. You can always update your code repo linked to the paper at a later point and point back to a main release here. |
Any movement on this @lukelbd? |
Also PyPI doesn't allow direct links to GitHub repos, so projects on PyPI can't list working proplot version as a dependency right now. |
I wanted to address the current status of proplot's development. With the recent lack of movement on this project, there's a genuine concern about potentially losing our valuable contributors. To prevent this, I'm proposing we restructure the project under a more collaborative, organization-based framework that would:
Beginning in the new year, I'm prepared to take on a more active leadership role in this initiative. My plan includes forking the repository to maintain development momentum, but I'm committed to keeping communication channels open with @lukelbd and other stakeholders. I'd like to extend an invitation to all interested contributors to join this effort. If you're passionate about proplot's future and want to be part of its continued development, please reach out to discuss how we can collaborate effectively. Together, we can ensure proplot remains a vibrant and well-maintained project that serves its community's needs. |
Please keep us posted when you fork out and launch the project. My job has severely limited the time I have to directly contribute, but I can continue with scoping as I did here. Might have some opportunities to contribute directly as well. Thanks @cvanelteren and enjoy your well-earned vacation! |
@cvanelteren count me in on helping with dev as I can and I'd like to be a part of the effort. Also, I am cross-referencing the issue currently open on more sustainable development (#452). From the point of view of shipping a fork on conda-forge, it will be by far the easiest if the forked project gets a new name. |
Yes I agree @beckermr -- I already have a logo for it ;-). I will be in touch in the new year! |
@cvanelteren I am willing to help wherever I can. I like proplot, and it would be nice to see a continuous development along with the latest matplotlib. |
Continuation of #458 and #450. This PR makes it up-to-date with the latest mpl version.
It passes the generate unittests from #458, I will do some finalize testing since the colormaps are the major change in the last couple of mpl versions.