diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f17b4405..d4c99b45 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,9 +22,9 @@ jobs: python -m pip install --upgrade uv uv venv uv pip install -e ".[test]" - uv run pytest --ignore=tests/test_browser + uv run pytest --ignore=tests/test_e2e - browser-tests: + e2e-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -51,5 +51,5 @@ jobs: - name: Install Playwright system deps if: steps.pw-cache.outputs.cache-hit == 'true' run: uv run playwright install-deps chromium - - name: Pytest (browser tests) - run: uv run pytest tests/test_browser -v + - name: Pytest (e2e tests) + run: uv run pytest tests/test_e2e -v diff --git a/agents.md b/AGENTS.md similarity index 95% rename from agents.md rename to AGENTS.md index f001bae3..db502a1c 100644 --- a/agents.md +++ b/AGENTS.md @@ -43,7 +43,6 @@ syncs back to Python. | TextCompare | `wigglystuff.text_compare.TextCompare` | `text_a`, `text_b`, `matches`, `selected_match`, `min_match_words` | Side-by-side text diff with match highlighting | | EnvConfig | `wigglystuff.env_config.EnvConfig` | `variables`, `all_valid` | Environment variable config with validation | | ModuleTreeWidget | `wigglystuff.module_tree.ModuleTreeWidget` | `tree`, `initial_expand_depth` | Interactive tree viewer for PyTorch nn.Module | -| WandbChart | `wigglystuff.wandb_chart.WandbChart` | `api_key`, `entity`, `project`, `key`, `poll_seconds`, `smoothing_kind`, `smoothing_param`, `show_slider`, `width`, `height` | Live line chart that polls wandb for metric data with smoothing | | Neo4jWidget | `wigglystuff.neo4j_widget.Neo4jWidget` | `nodes`, `relationships`, `schema`, `error`, `query_running`, `selected_nodes`, `selected_relationships`, `width`, `height` | Interactive Neo4j graph explorer with Cypher query input | | SplineDraw | `wigglystuff.spline_draw.SplineDraw` | `data`, `curve`, `curve_error`, `brushsize`, `n_classes`, `width`, `height` | Draw scatter points with Python-computed spline curve fitting | | ScatterWidget | re-exported from [`drawdata`](https://github.com/koaning/drawdata) | `data`, `brushsize`, `width`, `height`, `n_classes` | Paint multi-class 2D scatter data with brush | @@ -101,3 +100,10 @@ syncs back to Python. - When planning a new widget, always present the proposed Python API (constructor, traitlets, helper methods) during plan review so the user can sign off on the interface before implementation. +- E2E test fixtures (`tests/fixtures/*.py`, `demos/*.py` used by Playwright + tests) must live inside the project tree. The repo's `pyproject.toml` + sets `[tool.marimo.runtime] auto_instantiate = true` so cells run on + notebook open — without that, `marimo edit` shows the editor but never + produces widget output and selectors will time out. If a test needs an + isolated copy, put the copy somewhere a `pyproject.toml` walk reaches, + not under `tmp_path`. diff --git a/CHANGELOG.md b/CHANGELOG.md index 9844a2a2..bf1405d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,15 @@ All notable changes to this project will be documented in this file. -## [Unreleased] +## 0.4.0 + +### Fixed + +- `EnvConfig` no longer syncs configured secret values in its exported anywidget state, preventing marimo static HTML exports from embedding environment-loaded or manually entered secrets. + +### Removed + +- `WandbChart` widget removed due to a security concern: marimo's static HTML export embeds all anywidget traitlets, which would leak the user-supplied `api_key` into any exported notebook. ## [0.3.5] - 2026-04-23 diff --git a/CLAUDE.md b/CLAUDE.md index 47d29cb5..47dc3e3d 120000 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1 +1 @@ -agents.md \ No newline at end of file +AGENTS.md \ No newline at end of file diff --git a/README.md b/README.md index 7fe71779..356ec2a0 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,6 @@ These widgets depend on 3rd party packages. They still ship with wigglystuff but - diff --git a/demos/envconfig.py b/demos/envconfig.py index dc285b32..c5b237ae 100644 --- a/demos/envconfig.py +++ b/demos/envconfig.py @@ -8,7 +8,7 @@ import marimo -__generated_with = "0.19.4" +__generated_with = "0.23.3" app = marimo.App(width="medium") @@ -17,6 +17,7 @@ def _(): import os import marimo as mo from wigglystuff import EnvConfig + return EnvConfig, mo, os @@ -68,6 +69,12 @@ def _(mo): return +@app.cell +def _(config_validated): + "MY_API_KEY" in config_validated + return + + @app.cell def _(config_validated): config_validated["MY_API_KEY"] diff --git a/demos/sortlist.py b/demos/sortlist.py index 37e8d17b..47b97390 100644 --- a/demos/sortlist.py +++ b/demos/sortlist.py @@ -5,9 +5,10 @@ # "wigglystuff==0.3.1", # ] # /// + import marimo -__generated_with = "0.18.1" +__generated_with = "0.23.3" app = marimo.App(width="columns", sql_output="polars") @@ -15,6 +16,7 @@ def _(): import marimo as mo from wigglystuff import SortableList + return SortableList, mo diff --git a/mkdocs.yml b/mkdocs.yml index 25717dc8..abee73fc 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -57,7 +57,6 @@ nav: - ProgressBar: reference/progress-bar.md - PulsarChart: reference/pulsar-chart.md - ModuleTreeWidget: reference/module-tree.md - - WandbChart: reference/wandb-chart.md - Neo4jWidget: reference/neo4j-widget.md - ScatterWidget: reference/scatter-widget.md - DiffViewer: reference/diff-viewer.md diff --git a/mkdocs/assets/gallery/wandbchart.png b/mkdocs/assets/gallery/wandbchart.png deleted file mode 100644 index 97001a3e..00000000 Binary files a/mkdocs/assets/gallery/wandbchart.png and /dev/null differ diff --git a/mkdocs/index.md b/mkdocs/index.md index e6e7b17b..2521d4c1 100644 --- a/mkdocs/index.md +++ b/mkdocs/index.md @@ -215,11 +215,6 @@ These widgets depend on 3rd party packages. They still ship with wigglystuff but -
ModuleTreeWidget

molab · API · MD
WandbChart

molab · API · MD
Neo4jWidget

molab · API · MD
AltairWidget

molab · API · MD