# Required dependency: every provider client (agent/providers/openai.py, gemini.py, claude.py,
# ollama.py, openrouter.py) and account.py import `requests` directly for all LLM API calls --
# without it, the plugin has no working provider connectivity at all. Not listed here until the
# 2026-09-14 Community-lineage classification pass flagged the gap: it had always been present in
# practice because QGIS's own bundled Python environment typically ships it already, but that's an
# unstated assumption about the host environment, not a declared dependency of this package.
requests

# Optional dependencies for Cartogen AI.
# Enables document parsing (PDF/Word/Excel attachments), web search, PDF table
# extraction, and chart generation.
# Versions intentionally left unpinned to avoid conflicting with other
# plugins' requirements in the shared QGIS Python environment.
# Installed via the qpip plugin (see metadata.txt plugin_dependencies) or
# manually in the OSGeo4W Shell: python -m pip install -r requirements.txt
pypdf
python-docx
openpyxl
pandas
# Switched from duckduckgo-search to ddgs, 2026-09-18 -- live-verified: duckduckgo-search
# (even at 8.1.1, the version this line used to pin as the "thin compat shim" floor)
# silently returns ZERO results for a real query, no error raised, nothing for
# search_web's own error handling to catch -- while ddgs (the actual current package
# the project renamed to) returns real results immediately for the identical query.
# ddgs has no official API either and the same documented history of breaking on
# upstream changes as its predecessor -- floored, not pinned to an exact version, for
# the same reason: system_tools.py's search_web is tested against this floor, and an
# unbounded upper range risks an untested future major version silently changing
# DDGS's API shape.
ddgs>=9.16.0
pdfplumber
matplotlib
folium

# --- Heavier, single-feature dependency -- only needed for
# extract_features_from_imagery (see docs/archive/SAM_IMAGERY_EXTRACTION_SPEC.md).
# Pulls in torch; expect a real download (~200MB+) plus a model checkpoint
# downloaded separately on first use. Install this line only if you plan to
# use imagery feature extraction -- everything above works without it.
#
# IMPORTANT: install this with QGIS fully closed, not while it's running.
# This group shares jinja2/markupsafe with folium (above) -- installing while
# QGIS already has that module loaded can fail on Windows with
# "PermissionError: [WinError 5] Access is denied" on a locked .pyd file.
# Confirmed in real use, not hypothetical -- see docs/archive/SAM_IMAGERY_EXTRACTION_SPEC.md.
# Close QGIS, install (qpip or OSGeo4W Shell), then reopen QGIS.
#
# LICENSE NOTE (SEC-003, 2026-09-14 audit): ultralytics is dual-licensed AGPL-3.0/commercial
# upstream -- a different, stricter license than this project's own GPL-2.0-only (LICENSE
# file). It is never bundled or distributed with this plugin -- the user installs it
# separately, at their own option, only if they want imagery-extraction. This note documents
# that fact for anyone auditing dependency licenses; it does not itself resolve whether that
# combination needs further review for a specific distribution/commercial use of this plugin --
# that judgment call belongs with whoever owns this project's licensing decisions, not here.
ultralytics
