Skip to content
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

shapely>=2.0 is incompatible with pymt #164

Closed
mdpiper opened this issue Feb 3, 2023 · 2 comments · Fixed by #174
Closed

shapely>=2.0 is incompatible with pymt #164

mdpiper opened this issue Feb 3, 2023 · 2 comments · Fixed by #174

Comments

@mdpiper
Copy link
Member

mdpiper commented Feb 3, 2023

shapely had a major release recently, and it looks like the geometry types changed, which causes pymt to fail:

 ______________________ ERROR collecting pymt/grids/map.py ______________________
Traceback (most recent call last):
  File "/Users/runner/work/pymt/pymt/pymt/grids/map.py", line 49, in <module>
    from shapely.geometry import Point, asLineString, asPoint, asPolygon
ImportError: cannot import name 'asLineString' from 'shapely.geometry' (/usr/local/miniconda/envs/test/lib/python3.8/site-packages/shapely/geometry/__init__.py)
@mdpiper
Copy link
Member Author

mdpiper commented Feb 3, 2023

Requiring shapely<2 works.

The solution might be as simple as changing the asLineString type to LineString.

@mdpiper
Copy link
Member Author

mdpiper commented Oct 2, 2024

This is blocking building pymt on Python 3.12.

mdpiper added a commit to mdpiper/pymt that referenced this issue Oct 2, 2024
The subsequent call to `mamba install` updates *shapely* to 2.0,
which breaks the <1.9 requirement from csdms#164.
mcflugen pushed a commit that referenced this issue Oct 3, 2024
The subsequent call to `mamba install` updates *shapely* to 2.0,
which breaks the <1.9 requirement from #164.
mdpiper added a commit that referenced this issue Oct 10, 2024
* Remove duplicate install of testing dependencies

* Require latest version of model_metadata

* Remove obsolete esmpy requirement

* Don't install components for testing

The subsequent call to `mamba install` updates *shapely* to 2.0,
which breaks the <1.9 requirement from #164.

* import UnitSystem from gimli.units

* remove redundant gimli.units unit tests

* checkout gimli.units raises UdunitsError

* Consolidate requirements in one install step

* Fix typos

* Roll back model_metadata for older models

---------

Co-authored-by: mcflugen <[email protected]>
mdpiper added a commit that referenced this issue Oct 11, 2024
* Remove duplicate install of testing dependencies

* Require latest version of model_metadata

* Remove obsolete esmpy requirement

* Don't install components for testing

The subsequent call to `mamba install` updates *shapely* to 2.0,
which breaks the <1.9 requirement from #164.

* import UnitSystem from gimli.units

* remove redundant gimli.units unit tests

* checkout gimli.units raises UdunitsError

* Consolidate requirements in one install step

* Fix typos

* Roll back model_metadata for older models

* Remove shapely version cap

* Convert shapely proxy object to geometries

See https://shapely.readthedocs.io/en/stable/migration.html#other-deprecated-functionality

* Remove scipy version cap

* Mark fail when extrapolating with previous and next methods

See scipy/scipy#16997 (comment)

* Check for AssertionError instead of ValueError

* Revert "Don't install components for testing"

This reverts commit bfb47fc.
The shapely version issue is resolved.

* Limit numpy<2

See #173.

* Set numpy print options to legacy=1.21

Without this setting, the value of legacy=1.25 was being inherited
from Landlab, which isn't allowed in the installed version of numpy<2
(currently 1.26.4).

* Add python=3.11 to tests

* Switch from Mambaforge to Miniforge

* Switch from mamba to conda

* Update versions of packaged actions

* install requirements with pip

* turn off fail-fast

* switch back to conda to install requirements

---------

Co-authored-by: mcflugen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant