Skip to content

Fix EnvConfig HTML export#197

Merged
koaning merged 13 commits intomainfrom
koaning/discuss-marimo-9412
Apr 29, 2026
Merged

Fix EnvConfig HTML export#197
koaning merged 13 commits intomainfrom
koaning/discuss-marimo-9412

Conversation

@koaning
Copy link
Copy Markdown
Owner

@koaning koaning commented Apr 28, 2026

Also deprecate WandbWidget. Per marimo-team/marimo#9412

Vincent D. Warmerdam and others added 13 commits April 28, 2026 16:38
The unit-test job was collecting the Playwright-based env_config test
because the path-ignore didn't reach it; switch all routing to the `e2e`
marker. Mark existing browser tests as `e2e`, change the unit job to
`pytest -m "not e2e"`, and add a third `e2e-tests` job that runs
`pytest -m e2e --ignore=tests/test_browser` with Playwright installed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Inline the initial-state loop into a list comprehension backed by a new
`_initial_status` helper, fold `_recalc_all_valid` into `_update_var`
(renamed from `_set_var_status`) since the two were always called
together, and tidy `require_valid`. On the JS side, HTML-escape
`variable.error` before injecting it into the error-tooltip `title`
attribute so validator exception strings can't break out.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pytest collects (imports) every test module before applying marker
filters, so the unit-test job's `-m "not e2e"` couldn't avoid the
ModuleNotFoundError when Playwright wasn't installed. Move all
Playwright tests under one folder and route by path:

- Rename tests/test_browser → tests/test_e2e
- Move the env_config UI download test from tests/test_env_config_export.py
  into tests/test_e2e/test_env_config_browser.py
- Drop the requires-python=>=3.14 pin from the env_config fixture
  notebook (CI runs Python 3.11; suspected cause of the e2e timeout)
- Workflow: unit job switches to `--ignore=tests/test_e2e`; the previous
  browser-tests and e2e-tests jobs collapse into a single e2e-tests job
  that runs `pytest tests/test_e2e -v`

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Drop the inline `wigglystuff==0.3.5` / `anywidget==0.11.0` pins from
`tests/fixtures/envconfig_export_notebook.py` so the e2e test exercises
the local editable install instead of a stale PyPI build that lacks the
recent EnvConfig refactor (cause of the CI-only Playwright failure).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Inline `# /// script` metadata triggers marimo's dep-resolution path
when the notebook opens, which on the CI runner takes long enough that
the widget hasn't rendered before the 10s `wait_for_selector` timeout.
The other passing fixture (`tangle_test_notebook.py`) has no metadata
block; match that.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Temporary debug: print marimo subprocess output on fixture teardown so
we can see why `.env-config-widget` never renders on the CI runner.
The test was copying the fixture notebook to `tmp_path` before launching
marimo, which left it without project context. Without the project's
`[tool.marimo.runtime] auto_instantiate = true`, marimo opens the
notebook in editor mode without running cells, so the EnvConfig widget
never renders and `wait_for_selector(.env-config-widget)` times out.

Fix: point `start_marimo` at the in-tree fixture path (matching the
sortable_list and tangle tests) and drop the unused tmp_path copy.
Also revert the temporary CI debug instrumentation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Standardize on uppercase AGENTS.md (CLAUDE.md remains a symlink).

Add a note explaining why e2e fixture notebooks must live inside the
project tree: `[tool.marimo.runtime] auto_instantiate = true` is what
makes cells run on `marimo edit` open, and that config is only picked
up when the notebook's pyproject.toml walk reaches this repo.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@koaning koaning merged commit 55fe9bb into main Apr 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant