Feature/track uploaded image status - #302
Open
AlexeyTrekin wants to merge 39 commits into
Open
Conversation
…o feature/planned-processing-templates
…e. Search imagery capture time is left at UTC (#286)
* Set up host-independent test runtime in Docker
Three tiers under tests/{functional,qgis,ui} all run inside the
official qgis/qgis:release-3_28 Docker image with real PyQGIS — the
directory split is taxonomy (intent) rather than runtime separation.
Drivers: Makefile (docker-build, test-functional, test-qgis, test-ui,
test) and a GitHub Actions workflow that runs the same Make targets
as three jobs.
CI scope is pinned to Linux + QGIS 3.28 LTR; cross-OS and non-LTR QGIS
versions are manual-smoke (documented in README, tests/README,
spec/004_stack).
Existing tests are preserved via agent-git mv. Four pre-existing
content failures surface now that the suite actually runs — out of
scope for this chore, logged in WAL_8.md as follow-ups.
* fix tests
* chore: update instructions to include tests; remove plans for implemented features
---------
Co-authored-by: A T <a.trekin@mapflow.ai>
Three tiers under tests/{functional,qgis,ui} all run inside the
official qgis/qgis:release-3_28 Docker image with real PyQGIS — the
directory split is taxonomy (intent) rather than runtime separation.
Drivers: Makefile (docker-build, test-functional, test-qgis, test-ui,
test) and a GitHub Actions workflow that runs the same Make targets
as three jobs.
CI scope is pinned to Linux + QGIS 3.28 LTR; cross-OS and non-LTR QGIS
versions are manual-smoke (documented in README, tests/README,
spec/004_stack).
Existing tests are preserved via agent-git mv. Four pre-existing
content failures surface now that the suite actually runs — out of
scope for this chore, logged in WAL_8.md as follow-ups.
Co-authored-by: odinkomnogim <136620754+odinkomnogim@users.noreply.github.com>
… show correct error if this happened
…earch adding the seach results as a (hidden) layer
…e on double click; not rerender the table between fetching templates and processings
…ost request if area < minAreaSqKm for the known provider
ruff (pyproject.toml) runs pyflakes F + bugbear B to catch unused code and real-bug patterns; pyright (pyrightconfig.json) in basic mode adds the flow analysis ruff cannot do — possibly-unbound and undefined-name — while its type-completeness reports stay muted until the codebase is annotated. Lint runs on the host via the project venv (ruff is AST-only, pyright is lenient), so it needs no QGIS runtime, unlike the Docker-based tests. 'make lint' wires both. F401 is ignored in __init__.py (intentional re-exports); the rule set starts narrow on purpose and can be broadened once the baseline is clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- DEFAULT_HIDDEN_COLUMNS was a generator expression referencing the class-scope PROCESSING_TABLE_COLUMNS from its own (inaccessible) scope, which would raise NameError whenever iterated; make it a tuple of direct .index() calls. It is currently unused, so this is a latent-bug fix. - display_mosaic_info raised UnboundLocalError on empty mosaics because local_created_at was bound only inside 'if images:'; hoist it out since it derives from mosaic, not images. - Remove a duplicate is_terminal property and duplicate schema imports. - Chain re-raised exceptions with 'from' (B904), drop dead locals (datetime/cloud column indices, unused test var), and remove unused imports across the tree (ruff --fix; __init__ re-exports preserved). - Keep plugin_icon as an explicit re-export (redundant alias) so ruff does not strip it from processing_dialog — image_dialog/processing_details import it from there. Deferred (need a design decision or wider blast radius, tracked by the remaining lint baseline): MaxarProvider/SentinelProvider reference an undefined image id; B008/B006 call/mutable argument defaults; star imports. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a third navigation level (Projects -> Processings -> Template). Double-click or the forward arrow enters a template; the table shows its AOIs grouped with their processings (and a 'No AOI' section for unbound ones), the map gets a per-AOI subgroup (blue AOI + green processing footprints) with search footprints below, and selecting an AOI filters the search results (deselect restores all). - Parse/send named AOIs (searchParams.aoiDetails); rename/add/delete AOIs via context menu. - AOI status aggregates its processings; template status: Searching/Created/Updated/Failed. - Add TemplateProcessingSchema for the v1 /processings shape (flat params); fix AOI update to POST; support DELETE-with-body in http. - Spec 002_F updated; tests added/updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…view-layer + polling optimizations - Named colors in dialogs/colors.py; ProcessingView uses them. - Template/AOI table_status and labels go through QCoreApplication.translate. - Split schema/processing.py -> schema/template.py (one-directional imports). - Preview fixes: remove stale mosaic boundary layer; de-duplicate image previews (move existing to top); in-template layer precedence AOIs > previews > search. - Always send searchParams.aoiDetails on template creation (plain aoi deprecated); names optional, single unnamed feature for image/mosaic extents. - Polling: in-template tick is a single /processings request (no get_template/images), slower cadence; table rebuild blocks selection signals so it no longer re-triggers the AOI search filter / map rebuild; AOI status synced from polled processings. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n exit - Template/AOI action error handlers parse the QNetworkReply body via the error registry instead of formatting the raw reply (which showed an empty box); add a translatable message for BAD_REQUEST 'maximum number of active templates'. - Reset template search-results pagination on _load_template_search and on leaving the template, so it is not preserved on re-open. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Template /images can omit per-image providerName, so the imagery-search source params
had no dataProvider and the backend rejected cost/start ('Attempt to decode value on
failed cursor at params.sourceParams.imagerySearch.dataProvider'). Backfill the footprint
providerName from the template's searchParams.dataProviders when it searches a single
provider.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Surface preprocessing/failed uploads that the plain image list hides
(it returns only data_available images) by merging GET /mosaic/{id}/status.
- Mosaic table: status_summary counts (ready/preprocessing/failed) from the
existing list response — no extra request.
- Image list: non-ready rows flagged "Preprocessing"/"Preprocessing failed";
preview/download/info/rename disabled, delete works for any status.
- Auto-poll /status while pending, skipping re-render when unchanged to keep
the user's selection/preview stable.
- Mosaic-level "Delete failed" (DELETE /mosaic/{id}/failed).
- Setting hideUnprocessedImages (default show) gates the non-ready rows.
- Graceful fallback to ready-only when /status is unavailable.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review round 1: - Mosaic/image Status columns are fixed-width (sized to the full status line) so they no longer jump when a segment appears/disappears on status changes. - Status cells are non-selectable and row controls always anchor to the name column, so clicking the status column no longer relocates the controls. - Flag per-image rows by preprocessing_status (matching the mosaic badge buckets) and dedupe the ready list, so a data_available-but-PENDING image shows once as a flagged row and the mosaic 🕑/✗ counts match the rows. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
selected_image() can now return a non-ready ImageStatusSchema (no footprint), which crashed the area calculator and AOI-from-imagery code with AttributeError: 'ImageStatusSchema' object has no attribute 'footprint'. Add selected_ready_image() (first selected ready image, else None) and use it wherever imagery geometry/footprint is needed, so a preprocessing/failed selection falls back to the mosaic extent instead of crashing. Tests cover opening mosaics that are only-failed, only-in_progress, mixed, and empty, plus selected_ready_image ignoring non-ready selections. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Log a Mapflow warning when GET /mosaic/{id}/status fails or can't be parsed
(the silent fallback to ready-only hid why the image Status column was empty).
Failures surface in QGIS Log Messages Panel → "Mapflow".
- Make /status parsing resilient (bad response → ready-only, not a broken render).
- Shrink the fixed Status-column width (2-digit sample, smaller pad); the width
helpers _mosaic_status_width / _image_status_width carry TWEAK comments.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A mosaic with only ready images left the image Status column blank, which read as broken even though it was correct (nothing to flag). Every row now carries a status: ✓ Ready (green), 🕑 Preprocessing (orange), ✗ Preprocessing failed (red), so the column is always populated and consistent with the mosaic badge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Replace placeholder glyphs with ok-circle / clock-five / close-circle SVGs. Mosaic cell composes the 3 counts into one pixmap (set as the item icon, so it survives sorting unlike a cell widget); image rows use a single icon + label. - Handle load_data "loading" images (data_available=False, status NONE) that were previously invisible: partition non-ready by usability (available AND status ready), so loading images show a "Loading" flag. Poll while anything is in flight (loading or preprocessing), not just PENDING/IN_PROGRESS. - Empty mosaics (0 images) show plain "Empty" instead of a "ok 0" badge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.