Skip to content

feat: for_vantor factory and Vantor Open Data tools#61

Merged
giswqs merged 2 commits into
mainfrom
feat/vantor-open-data-tools
May 1, 2026
Merged

feat: for_vantor factory and Vantor Open Data tools#61
giswqs merged 2 commits into
mainfrom
feat/vantor-open-data-tools

Conversation

@giswqs

@giswqs giswqs commented May 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Add for_vantor(iface, project=None, plugin=None) factory and a Vantor tools module exposing the QGIS Vantor plugin's public Open Data STAC catalog (event listing, item search, footprint display, COG loading, panel open).
  • Wire the new tool category into assemble_tools and _permission_allows_tool, gating layer mutations behind user confirmation.
  • Update README and docs/tools.md with usage notes and add tests in tests/test_vantor_tools.py plus QGIS chat dock and integration test updates.

Test plan

  • pytest tests/ -q
  • pre-commit run --all-files
  • Manual smoke test: load for_vantor in a QGIS session, list events, search items, and confirm footprint and COG layers appear after confirmation.

Adds a new for_vantor agent factory and a vantor tools module that
expose the QGIS Vantor plugin's public Open Data STAC catalog: list
events, search items, display footprints, and load COG imagery, with
confirmation gating on actions that mutate the QGIS project.
Copilot AI review requested due to automatic review settings May 1, 2026 04:28
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request May 1, 2026 04:29 Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a dedicated Vantor integration to GeoAgent, enabling QGIS workflows against the Vantor Open Data static STAC catalog (event discovery, item search, footprints, COG loading, and opening the Vantor panel), plus wiring and test/docs updates across the QGIS plugin integration.

Changes:

  • Introduces geoagent.tools.vantor with Vantor Open Data STAC browsing/search + QGIS display tools.
  • Adds for_vantor(...) factory and wires include_vantor through tool assembly and permission gating.
  • Updates OpenGeoAgent QGIS chat dock to expose “Vantor” mode and adds/updates tests and documentation.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/test_vantor_tools.py New unit tests for vantor_tools behavior and for_vantor factory wiring.
qgis_geoagent/tests/test_whitebox_integration.py Extends integration wiring tests to cover Vantor agent mode factory routing.
qgis_geoagent/tests/test_chat_tool_inputs.py Adds tests asserting Vantor mode availability and permission filtering behavior.
qgis_geoagent/open_geoagent/dialogs/chat_dock.py Adds “Vantor” agent mode, workflow prompts, permission category handling, and tool availability wiring.
geoagent/tools/vantor.py New Vantor tool implementation: STAC catalog fetch/parse, filtering, footprints GeoJSON creation, COG loading, and panel open.
geoagent/tools/init.py Exports vantor_tools from the tools package.
geoagent/core/factory.py Adds VANTOR_SYSTEM_PROMPT, include_vantor plumbing in assemble_tools, and for_vantor(...) factory.
geoagent/init.py Re-exports for_vantor at the package root.
docs/tools.md Documents for_vantor and the exposed Vantor tool surface.
README.md Adds a Vantor Open Data section describing usage and confirmation gating.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread geoagent/tools/vantor.py Outdated
Comment thread geoagent/tools/vantor.py
Comment thread geoagent/tools/vantor.py Outdated
Comment thread geoagent/tools/vantor.py Outdated
Comment thread geoagent/tools/vantor.py
Comment thread geoagent/tools/vantor.py
- Enforce HTTPS in `_fetch_json` and reject non-HTTPS schemes in `_resolve_href` so a malicious or compromised Vantor catalog cannot trigger local file reads or unexpected protocol access.
- Drop the always-`collection.json` `os.path.basename` comparison in `_resolve_event_href` and cache `_catalog_events()` in a local so event resolution does not double-fetch the root catalog.
- Narrow `_fetch_items` exception handling to URLError/JSONDecodeError/ValueError, count failures, and surface `fetch_failures` and `last_fetch_error` in `search_vantor_items` results so partial fetches are visible.
- Use a unique `uuid4`-suffixed temp filename for footprint GeoJSON to avoid clobbering or racing concurrent runs.
- Fall back to `os.path.basename(href)` when a Vantor item has no id so layers are not named "None".
@github-actions github-actions Bot temporarily deployed to pull request May 1, 2026 04:37 Inactive
@giswqs giswqs merged commit 57d056c into main May 1, 2026
9 checks passed
@giswqs giswqs deleted the feat/vantor-open-data-tools branch May 1, 2026 04:43
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 this pull request may close these issues.

2 participants