Skip to content

Lazy-import optional deps and pin Python <3.14 - #163

Open
Never-lab wants to merge 1 commit into
marceloprates:mainfrom
Never-lab:feat/lazy-optional-imports
Open

Never-lab wants to merge 1 commit into
marceloprates:mainfrom
Never-lab:feat/lazy-optional-imports

Conversation

@Never-lab

@Never-lab Never-lab commented Aug 29, 2026

Copy link
Copy Markdown

Summary

  • Move cv2, vsketch, thefuzz, and the elevation stack (elevation/rioxarray/rasterio/skimage) to lazy imports so import prettymaps works without those packages loaded up front.
  • Raise ImportError with install hints when hillshade, plotter mode, keypoints, or elevation paths actually need them.
  • Set python_requires=">=3.12,<3.14" so metadata matches vsketch.

Fixes #157
Fixes #156

Test plan

  • python -m pytest tests/test_lazy_imports.py
  • CI green on this PR
  • Optional smoke: python -c "import prettymaps" with deps installed

@Never-lab
Never-lab force-pushed the feat/lazy-optional-imports branch from 26451fd to d6f28f6 Compare August 29, 2026 14:26
Importing prettymaps no longer requires cv2/vsketch/elevation stack at module load; python_requires matches vsketch's supported range (fixes upstream marceloprates#157/marceloprates#156).
@Never-lab
Never-lab force-pushed the feat/lazy-optional-imports branch from d6f28f6 to f3a732c Compare August 29, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant