add interactive webgl and cesiumjs renderers for web based globe visualizations with probing support#190
Open
Hackshaven wants to merge 4 commits intostagingfrom
Conversation
Signed-off-by: Eric Hackathorn <erichackathorn@gmail.com>
Signed-off-by: Eric Hackathorn <erichackathorn@gmail.com>
- Introduced new commands for generating interactive globe bundles using webgl-sphere and cesium-globe. - Added detailed options for rendering, including texture handling, animation modes, and probe configurations. - Implemented tests for globe renderers, ensuring proper functionality with various input scenarios, including legends, remote textures, and video sources. - Enhanced testing for handling frame patterns and time-based animations. - Included support for shared gradients and NetCDF probe data in both WebGL and Cesium renderers. Signed-off-by: Eric Hackathorn <erichackathorn@gmail.com>
| if not asset_path or asset_path.endswith("/"): | ||
| relative = relative / "index.html" | ||
|
|
||
| target = (examples_root / relative).resolve() |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
| except ValueError as exc: # pragma: no cover - defensive | ||
| raise HTTPException(status_code=404, detail="Not found") from exc | ||
|
|
||
| if not target.exists() or not target.is_file(): |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
| except ValueError as exc: # pragma: no cover - defensive | ||
| raise HTTPException(status_code=404, detail="Not found") from exc | ||
|
|
||
| if not target.exists() or not target.is_file(): |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
| raise HTTPException(status_code=404, detail="Not found") | ||
|
|
||
| media_type = mimetypes.guess_type(str(target))[0] or "application/octet-stream" | ||
| return FileResponse(target, media_type=media_type) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
| """ | ||
|
|
||
| parsed = urlparse(source) | ||
| if source.startswith("vimeo:") or "vimeo.com" in parsed.netloc: |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High
…ation Signed-off-by: Eric Hackathorn <erichackathorn@gmail.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.
This pull request adds support for interactive previewing of generated globe visualization bundles in the CLI API examples page. It introduces new globe-related example configurations (including WebGL and Cesium visualizations with drought risk and seafloor datasets), enables preview iframes and status messaging in the web UI, and adds a secure API route for serving generated example assets. Additionally, it improves CLI argument handling for boolean flags and includes a minor documentation addition for sample datasets.
Globe visualization examples and preview support:
list_cli_examples(), covering WebGL and Cesium-based globes with drought risk imagery, seafloor age data, and NASA GIBS VIIRS tiles. Each example includes preview iframe configuration and warnings where necessary.API for serving generated example assets:
/examples/view/{bundle}/{asset_path}to securely serve generated example bundles and assets from theapi_examplesdirectory, resolving directory requests toindex.htmland restricting access to only the allowed path. [1] [2]CLI argument handling improvements:
_args_dict_to_argvto support explicit negation flags (e.g.,--no-probe,--no-lighting,--no-auto-rotate) for globe visualization commands.Documentation:
src/zyra/assets/samples/__init__.py.