GPlates / gplately

GPlately is a Python package to interrogate tectonic plate reconstructions.
https://gplates.github.io/gplately/
GNU General Public License v2.0
55 stars 12 forks source link

Correct circular imports for PTT #138

Closed brmather closed 7 months ago

brmather commented 7 months ago

Conda was failing because of circular imports.

Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/gplately_1699874743383/test_tmp/run_test.py", line 2, in <module>
    import gplately
  File "/home/conda/feedstock_root/build_artifacts/gplately_1699874743383/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.11/site-packages/gplately/__init__.py", line 176, in <module>
    from . import (
  File "/home/conda/feedstock_root/build_artifacts/gplately_1699874743383/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.11/site-packages/gplately/grids.py", line 40, in <module>
    from .reconstruction import PlateReconstruction as _PlateReconstruction
  File "/home/conda/feedstock_root/build_artifacts/gplately_1699874743383/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.11/site-packages/gplately/reconstruction.py", line 11, in <module>
    from . import ptt
ImportError: cannot import name 'ptt' from partially initialized module 'gplately' (most likely due to a circular import) (/home/conda/feedstock_root/build_artifacts/gplately_1699874743383/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.11/site-packages/gplately/__init__.py)
WARNING: Tests failed for gplately-1.2.1-pyhd8ed1ab_0.conda - moving package to /home/conda/feedstock_root/build_artifacts/broken
TESTS FAILED: gplately-1.2.1-pyhd8ed1ab_0.conda
##[error]Bash exited with code '1'.