feat(esm-tools-plus/simcat): add esm_viz — visualization service for catalog items#1474
Draft
siligam wants to merge 6 commits into
Draft
feat(esm-tools-plus/simcat): add esm_viz — visualization service for catalog items#1474siligam wants to merge 6 commits into
siligam wants to merge 6 commits into
Conversation
siligam
added a commit
that referenced
this pull request
Jun 13, 2026
Design for reintroducing esm_catalog to release as a dependency-ordered stack of small, reviewable PRs (responding to review feedback on #1473). Rebuild-from-end-state; opening PRs mirror scan->shard->sync; MCP dropped. Covers all three parallel workstreams: esm_catalog (#1473), esm_viz (#1474), and the stac-browser fork. esm_catalog API core is the critical path; esm_viz and the browser UI run as parallel tracks off it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
Flagging before review: this PR (~5.7k lines, one commit) is getting the same treatment as #1473.
Converting to draft pending the sliced stack. Plan (§7–8): 2026-06-13-esm-catalog-pr-decomposition-design.md |
siligam
marked this pull request as draft
June 13, 2026 11:04
…talog items Introduces the esm_viz package as part of the ESM-Tools-plus/simcat initiative. Provides a FastAPI-based visualization server for rendering STAC item data (NetCDF, GRIB) with interactive previews and static plots. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Co-Authored-By: Paul Gierz <pgierz@awi.de>
The main esm-tools CI runs pytest --doctest-modules src, which picks up esm_catalog's test suite requiring optional deps (fastapi, duckdb, etc.). Excluding via norecursedirs keeps CI green without those deps installed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rom pytest The CI also runs pytest -v . which discovers tests/ subdirs. Extend norecursedirs to cover all esm_catalog/viz test directories. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
esm_viz uses Python 3.10+ union syntax (X | None) which fails at collection time on Python 3.8. Exclude it from the base CI sweep alongside esm_catalog. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The call with an empty string fails for non-editable or modern pip editable installs that don't create esm-tools.egg-link. Catch FileNotFoundError and omit the cd step from the upgrade message rather than crashing esm_master. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Python 3.8 does not support X | None union syntax or built-in generics as runtime annotations. Deferring annotation evaluation restores compatibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
siligam
force-pushed
the
esm-tools-plus/simcat/pr-esm-viz
branch
from
June 17, 2026 12:14
20cb83e to
7b4bf66
Compare
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.
Context
Part of the ESM-Tools-plus/simcat initiative.
This PR introduces
esm_viz— the visualization service that renders STAC item data as interactive previews and static plots.The companion PR #1473 introduces
esm_catalog, the catalog API that esm_viz integrates with.What's included
src/esm_viz/— the package (10 modules, ~4400 lines)app.pycli.pyesm-viz serveCLI entry pointinteractive.pystatic_preview.pycollection.pyfesom.pycompute.pycompute_routes.pyreaders.pyAPI endpoints:
GET /preview/{item_id}— static preview image for a STAC itemGET /preview/{item_id}/panel— interactive Panel app embedded in the browserGET /collection/{collection_id}/overview— collection-level overview plotGET /health— health checktests/test_esm_viz/— contract tests~500 lines of contract tests verifying the API shape and compute contract independently of a running service.
Deployment files
.github/workflows/docker-esm-viz.ymlutils/docker-compose.ymlutils/hpc-deploy.shIntegration with esm_catalog
esm_vizis configured via thevizServerURL in the STAC Browser config and linked from catalog item assets. It is not imported byesm_catalog— the two services communicate only over HTTP. Either can be deployed independently.Typical deployment:
Test plan
pytest tests/test_esm_viz/passesesm-viz serve --helpruns without errorGET /healthreturns{"status": "healthy"}GET /preview/{item_id}returns an image for a valid NetCDF itemGET /preview/{item_id}/panelreturns an embeddable Panel app🤖 Generated with Claude Code