Skip to content

refactor: migrate to pixi + marimo + nxviz plotly backend#477

Open
ericmjl wants to merge 4 commits into
mainfrom
refactor/pixi-marimo-nxviz-plotly
Open

refactor: migrate to pixi + marimo + nxviz plotly backend#477
ericmjl wants to merge 4 commits into
mainfrom
refactor/pixi-marimo-nxviz-plotly

Conversation

@ericmjl

@ericmjl ericmjl commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Summary

Rearchitects the tutorial to use pixi for dependency management with marimo notebooks and nxviz plotly backend.

Changes

pyproject.toml

  • All Python deps moved into [project] (installed via pypi editable): marimo>=0.14, nxviz>=0.9.0, plotly>=5.0, etc.
  • Added pixi run notebook task → marimo edit --no-token notebooks/
  • Updated [tool.pixi.project][tool.pixi.workspace] (newer pixi format)
  • Removed jupyter/ipykernel conda deps (no longer needed)

nams package

  • Removed render_html() from nams/functions.py (no longer needed)
  • Updated solution modules (paths, structures, bipartite) to return/print plain strings instead

All 16 notebooks

  • Removed # /// script inline metadata (pixi handles deps)
  • Added backend="plotly" to all nxviz calls (nv.circos, nv.arc, nv.matrix, nv.hive, nv.geo)
  • Removed annotate.* calls and plt.show() after nxviz (plotly handles rendering)
  • Kept plt.show() for pure matplotlib (nx.draw, plt.hist, plt.scatter)
  • Updated setup instructions to use pixi instead of uv
  • Solutions included at bottom of each notebook

Usage

pixi install
pixi run notebook

Verification

All 16 notebooks pass marimo check (0 errors, markdown indentation warnings only).

ericmjl added 4 commits June 9, 2026 08:26
- Move all Python deps into [project] dependencies (pypi via editable install)
- Add marimo>=0.14, nxviz>=0.9.0, plotly>=5.0 to project deps
- Switch all nxviz calls to use backend='plotly'
- Remove inline script metadata from all notebooks (pixi handles deps)
- Add pixi task 'notebook' -> marimo edit --no-token notebooks/
- Remove render_html from nams.functions, update solutions modules
- Update setup instructions to use pixi instead of uv
- Update [tool.pixi.project] -> [tool.pixi.workspace]
- Remove jupyter/ipykernel conda deps (no longer needed)
…bottom

- Move marimo import to a single cell that returns mo, all other cells
  reference it via marimo's reactive dependency system
- Wrap intentional G.edges[15,16] KeyError in try/except in 02-networkx-intro
- Delete empty cell in 02-networkx-intro
- Cosmetic reformatting from marimo auto-save in 01-setup
…-save

- Standardize mo.md() call formatting (single-line vs multi-line)
- Add __generated_with version marker
- Remove backend='plotly' from some nxviz calls in 01-hubs
- Return nv from nxviz import cell for downstream use
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