Skip to content

Commit ef11ee0

Browse files
Douglas Blankclaude
andcommitted
docs: link examples/ from panel and dashboard enhancements README
Adds a pointer near the top and a Runnable Examples section listing each script in examples/ with what it demonstrates. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 7674778 commit ef11ee0

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

README-panel-and-dashboard-enhancements.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ This document covers the new and updated methods in `cometx.api.API` for managin
44
code panels and dashboards programmatically, plus the `cometx.views` module for
55
building dashboard layouts.
66

7+
For runnable end-to-end scripts, see [`./examples/`](./examples/) — summarized in
8+
[Runnable Examples](#runnable-examples) below.
9+
710
## Uploading a Panel
811

912
### `upload_panel_code(workspace, panel_name, code, template_id=None)`
@@ -396,3 +399,21 @@ api.update_dashboard(
396399
panels=[panel_id, "another-panel-id"],
397400
)
398401
```
402+
403+
---
404+
405+
## Runnable Examples
406+
407+
The [`./examples/`](./examples/) directory holds seven scripts that exercise everything
408+
above against a live workspace. See [`examples/README.md`](./examples/README.md) for the
409+
full walkthrough. Scripts 04, 05 and 06 are dry-run by default; pass `--apply` to write.
410+
411+
| Script | Demonstrates |
412+
| --- | --- |
413+
| [`00_seed_demo_project.py`](./examples/00_seed_demo_project.py) | Logs six small runs — metrics, params, an image and a CSV table — so every panel type in the later scripts has real data to draw. |
414+
| [`01_inspect_views.py`](./examples/01_inspect_views.py) | Reading views in both scopes (`API.get_views` and `APIExperiment.get_views`), how `view_source` distinguishes dashboard from chart templates, and what the `include_workspace_views` flags widen to. `--json` dumps every field with the serialized blobs unpacked. |
415+
| [`02_build_project_dashboard.py`](./examples/02_build_project_dashboard.py) | The widest `cometx.views` demo: scalar tiles, multi-metric line charts, log-scale axes, a legend keyed on a hyperparameter, a locked panel, bar/box plots, 2D and 3D scatter, parallel coordinates, an image grid, a table panel, a saved OR-of-AND filter, a configured experiment table, and dashboard-wide smoothing/sampling. |
416+
| [`03_build_experiment_view.py`](./examples/03_build_experiment_view.py) | The same sections in the experiment scope via `build_experiment_view()`, plus `--all` to stamp one layout onto every run in a project. |
417+
| [`04_migrate_views.py`](./examples/04_migrate_views.py) | Copying views between projects, workspaces or accounts (`--dst-api-key`), with `--match` filtering and `"Unsaved Changes"` views skipped by default. |
418+
| [`05_standardize_workspace.py`](./examples/05_standardize_workspace.py) | Pushing one house dashboard across a whole workspace, building each project's panels from the metrics that project actually logs. `--update` rewrites in place (the lower-level `upsert_view` route) instead of adding a duplicate. |
419+
| [`06_harvest_panels.py`](./examples/06_harvest_panels.py) | Custom JavaScript and Python panels reference existing panel instances, so their ids can't be invented — this scans existing views for them and rebuilds them into a new view. |

0 commit comments

Comments
 (0)