Skip to content

refactor(gds-examples): restructure guides/ into gds_examples/ for Pyodide compatibility#106

Merged
rororowyourboat merged 1 commit intodevfrom
worktree-gds-examples-restructure
Mar 4, 2026
Merged

refactor(gds-examples): restructure guides/ into gds_examples/ for Pyodide compatibility#106
rororowyourboat merged 1 commit intodevfrom
worktree-gds-examples-restructure

Conversation

@rororowyourboat
Copy link
Collaborator

Summary

  • Move guides/ subpackages into gds_examples/ proper so they're importable as gds_examples.getting_started, gds_examples.rosetta, etc.
  • Flatten marimo notebooks from guides/*/notebook.py into notebooks/ directory
  • Move tests into tests/ with shared conftest.py
  • Update all doc page Python snippet paths to match new structure
  • Remove stale READMEs and per-guide conftest files

Motivation

Pyodide and other environments need modules inside the installed package. Files under guides/ were siblings, not submodules of gds_examples.

Test plan

  • uv run --package gds-examples pytest packages/gds-examples -v
  • uv run mkdocs build --strict
  • Verify marimo notebooks still run: uv run marimo edit packages/gds-examples/notebooks/getting_started.py

…odide compatibility

Marimo notebooks embedded in docs fail in Pyodide/WASM with
ModuleNotFoundError because `guides` is a local workspace namespace not
available on PyPI. Moving library modules into `gds_examples/` makes them
ship with `pip install gds-examples` and importable in the browser sandbox.

- guides/*/*.py library modules → gds_examples/*/ (in wheel)
- guides/*/notebook.py → notebooks/*.py (flat, not in wheel)
- guides/*/test_*.py → tests/ (not in wheel)
- Add PEP 723 inline script metadata to all 6 notebooks
- Update pyproject.toml wheel include and mypy paths
- Update all docs markdown: embed paths, run commands, source links
- Create merged tests/conftest.py with sys.path setup
@rororowyourboat rororowyourboat merged commit b5ff90b into dev Mar 4, 2026
@rororowyourboat rororowyourboat deleted the worktree-gds-examples-restructure branch March 4, 2026 13:51
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